All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] p2m: move p2m-common.h inclusion point
@ 2018-10-05 10:14 Jan Beulich
  2018-10-05 10:21 ` Paul Durrant
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Jan Beulich @ 2018-10-05 10:14 UTC (permalink / raw)
  To: xen-devel
  Cc: Stefano Stabellini, Wei Liu, Konrad Rzeszutek Wilk,
	George Dunlap, Andrew Cooper, Ian Jackson, Tim Deegan,
	Julien Grall, Paul Durrant

The header is (hence its name) supposed to be a helper for the per-arch
p2m.h files. It was never supposed to be included directly, and for the
purpose of putting common function declarations into the common header
it is more helpful if things like p2m_t are already available at the
inclusion point.

Take the opportunity and also ditch a duplicate public/memory.h from the
ARM header.

Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/xen/drivers/vpci/header.c
+++ b/xen/drivers/vpci/header.c
@@ -17,12 +17,12 @@
  * License along with this program; If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <xen/p2m-common.h>
 #include <xen/sched.h>
 #include <xen/softirq.h>
 #include <xen/vpci.h>
 
 #include <asm/event.h>
+#include <asm/p2m.h>
 
 #define MAPPABLE_BAR(x)                                                 \
     ((x)->type == VPCI_BAR_MEM32 || (x)->type == VPCI_BAR_MEM64_LO ||   \
--- a/xen/include/asm-arm/p2m.h
+++ b/xen/include/asm-arm/p2m.h
@@ -7,8 +7,6 @@
 #include <xen/mem_access.h>
 #include <public/vm_event.h> /* for vm_event_response_t */
 #include <public/memory.h>
-#include <xen/p2m-common.h>
-#include <public/memory.h>
 
 #define paddr_bits PADDR_BITS
 
@@ -144,6 +142,12 @@ typedef enum {
                             (P2M_RAM_TYPES | P2M_GRANT_TYPES |  \
                              p2m_to_mask(p2m_map_foreign)))
 
+/* All common type definitions should live ahead of this inclusion. */
+#ifdef _XEN_P2M_COMMON_H
+# error "xen/p2m-common.h should not be included directly"
+#endif
+#include <xen/p2m-common.h>
+
 static inline
 void p2m_altp2m_check(struct vcpu *v, uint16_t idx)
 {
--- a/xen/include/asm-x86/p2m.h
+++ b/xen/include/asm-x86/p2m.h
@@ -27,7 +27,6 @@
 #define _XEN_ASM_X86_P2M_H
 
 #include <xen/paging.h>
-#include <xen/p2m-common.h>
 #include <xen/mem_access.h>
 #include <asm/mem_sharing.h>
 #include <asm/page.h>    /* for pagetable_t */
@@ -368,6 +367,12 @@ struct p2m_domain {
 /* get host p2m table */
 #define p2m_get_hostp2m(d)      ((d)->arch.p2m)
 
+/* All common type definitions should live ahead of this inclusion. */
+#ifdef _XEN_P2M_COMMON_H
+# error "xen/p2m-common.h should not be included directly"
+#endif
+#include <xen/p2m-common.h>
+
 /*
  * Updates vCPU's n2pm to match its np2m_base in VMCx12 and returns that np2m.
  */





_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] p2m: move p2m-common.h inclusion point
  2018-10-05 10:14 [PATCH] p2m: move p2m-common.h inclusion point Jan Beulich
@ 2018-10-05 10:21 ` Paul Durrant
  2018-10-05 10:26   ` Jan Beulich
  2018-11-06 16:41   ` Jan Beulich
  2018-10-05 10:27 ` Julien Grall
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 7+ messages in thread
From: Paul Durrant @ 2018-10-05 10:21 UTC (permalink / raw)
  To: 'Jan Beulich', xen-devel
  Cc: Stefano Stabellini, Wei Liu, Konrad Rzeszutek Wilk,
	Andrew Cooper, Tim (Xen.org),
	George Dunlap, Julien Grall, Ian Jackson

> -----Original Message-----
> From: Jan Beulich [mailto:JBeulich@suse.com]
> Sent: 05 October 2018 11:14
> To: xen-devel <xen-devel@lists.xenproject.org>
> Cc: Julien Grall <julien.grall@arm.com>; Andrew Cooper
> <Andrew.Cooper3@citrix.com>; Paul Durrant <Paul.Durrant@citrix.com>; Wei
> Liu <wei.liu2@citrix.com>; George Dunlap <George.Dunlap@citrix.com>; Ian
> Jackson <Ian.Jackson@citrix.com>; Stefano Stabellini
> <sstabellini@kernel.org>; Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>;
> Tim (Xen.org) <tim@xen.org>
> Subject: [PATCH] p2m: move p2m-common.h inclusion point
> 
> The header is (hence its name) supposed to be a helper for the per-arch
> p2m.h files. It was never supposed to be included directly, and for the
> purpose of putting common function declarations into the common header
> it is more helpful if things like p2m_t are already available at the
> inclusion point.
> 
> Take the opportunity and also ditch a duplicate public/memory.h from the
> ARM header.
> 
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

I suppose you could now drop the 'forward enum declaration' part of my patch now that it is no longer forwards (depending on which is committed first of course).

Reviewed-by: Paul Durrant <paul.durrant@citrix.com>

> 
> --- a/xen/drivers/vpci/header.c
> +++ b/xen/drivers/vpci/header.c
> @@ -17,12 +17,12 @@
>   * License along with this program; If not, see
> <http://www.gnu.org/licenses/>.
>   */
> 
> -#include <xen/p2m-common.h>
>  #include <xen/sched.h>
>  #include <xen/softirq.h>
>  #include <xen/vpci.h>
> 
>  #include <asm/event.h>
> +#include <asm/p2m.h>
> 
>  #define MAPPABLE_BAR(x)                                                 \
>      ((x)->type == VPCI_BAR_MEM32 || (x)->type == VPCI_BAR_MEM64_LO ||   \
> --- a/xen/include/asm-arm/p2m.h
> +++ b/xen/include/asm-arm/p2m.h
> @@ -7,8 +7,6 @@
>  #include <xen/mem_access.h>
>  #include <public/vm_event.h> /* for vm_event_response_t */
>  #include <public/memory.h>
> -#include <xen/p2m-common.h>
> -#include <public/memory.h>
> 
>  #define paddr_bits PADDR_BITS
> 
> @@ -144,6 +142,12 @@ typedef enum {
>                              (P2M_RAM_TYPES | P2M_GRANT_TYPES |  \
>                               p2m_to_mask(p2m_map_foreign)))
> 
> +/* All common type definitions should live ahead of this inclusion. */
> +#ifdef _XEN_P2M_COMMON_H
> +# error "xen/p2m-common.h should not be included directly"
> +#endif
> +#include <xen/p2m-common.h>
> +
>  static inline
>  void p2m_altp2m_check(struct vcpu *v, uint16_t idx)
>  {
> --- a/xen/include/asm-x86/p2m.h
> +++ b/xen/include/asm-x86/p2m.h
> @@ -27,7 +27,6 @@
>  #define _XEN_ASM_X86_P2M_H
> 
>  #include <xen/paging.h>
> -#include <xen/p2m-common.h>
>  #include <xen/mem_access.h>
>  #include <asm/mem_sharing.h>
>  #include <asm/page.h>    /* for pagetable_t */
> @@ -368,6 +367,12 @@ struct p2m_domain {
>  /* get host p2m table */
>  #define p2m_get_hostp2m(d)      ((d)->arch.p2m)
> 
> +/* All common type definitions should live ahead of this inclusion. */
> +#ifdef _XEN_P2M_COMMON_H
> +# error "xen/p2m-common.h should not be included directly"
> +#endif
> +#include <xen/p2m-common.h>
> +
>  /*
>   * Updates vCPU's n2pm to match its np2m_base in VMCx12 and returns that
> np2m.
>   */
> 
> 
> 


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] p2m: move p2m-common.h inclusion point
  2018-10-05 10:21 ` Paul Durrant
@ 2018-10-05 10:26   ` Jan Beulich
  2018-11-06 16:41   ` Jan Beulich
  1 sibling, 0 replies; 7+ messages in thread
From: Jan Beulich @ 2018-10-05 10:26 UTC (permalink / raw)
  To: Paul Durrant
  Cc: Stefano Stabellini, Wei Liu, Konrad Rzeszutek Wilk,
	Andrew Cooper, Tim Deegan, george.dunlap, Julien Grall,
	xen-devel, Ian Jackson

>>> On 05.10.18 at 12:21, <Paul.Durrant@citrix.com> wrote:
>>  -----Original Message-----
>> From: Jan Beulich [mailto:JBeulich@suse.com]
>> Sent: 05 October 2018 11:14
>> To: xen-devel <xen-devel@lists.xenproject.org>
>> Cc: Julien Grall <julien.grall@arm.com>; Andrew Cooper
>> <Andrew.Cooper3@citrix.com>; Paul Durrant <Paul.Durrant@citrix.com>; Wei
>> Liu <wei.liu2@citrix.com>; George Dunlap <George.Dunlap@citrix.com>; Ian
>> Jackson <Ian.Jackson@citrix.com>; Stefano Stabellini
>> <sstabellini@kernel.org>; Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>;
>> Tim (Xen.org) <tim@xen.org>
>> Subject: [PATCH] p2m: move p2m-common.h inclusion point
>> 
>> The header is (hence its name) supposed to be a helper for the per-arch
>> p2m.h files. It was never supposed to be included directly, and for the
>> purpose of putting common function declarations into the common header
>> it is more helpful if things like p2m_t are already available at the
>> inclusion point.
>> 
>> Take the opportunity and also ditch a duplicate public/memory.h from the
>> ARM header.
>> 
>> Signed-off-by: Jan Beulich <jbeulich@suse.com>
> 
> I suppose you could now drop the 'forward enum declaration' part of my patch 
> now that it is no longer forwards (depending on which is committed first of 
> course).

Yeah, that's the purpose of the patch. I have a respective note in
here, for the case that yours goes in further (I mean to see whether
I can commit more of your series later today, but for now I'm fighting
build problems after Wei's CONFIG_HVM disable series).

> Reviewed-by: Paul Durrant <paul.durrant@citrix.com>

Thanks.

Jan



_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] p2m: move p2m-common.h inclusion point
  2018-10-05 10:14 [PATCH] p2m: move p2m-common.h inclusion point Jan Beulich
  2018-10-05 10:21 ` Paul Durrant
@ 2018-10-05 10:27 ` Julien Grall
  2018-11-06 16:43 ` Ping: " Jan Beulich
  2018-11-06 16:51 ` George Dunlap
  3 siblings, 0 replies; 7+ messages in thread
From: Julien Grall @ 2018-10-05 10:27 UTC (permalink / raw)
  To: Jan Beulich, xen-devel
  Cc: Stefano Stabellini, Wei Liu, Konrad Rzeszutek Wilk,
	George Dunlap, Andrew Cooper, Ian Jackson, Tim Deegan,
	Paul Durrant

Hi,

On 10/05/2018 11:14 AM, Jan Beulich wrote:
> The header is (hence its name) supposed to be a helper for the per-arch
> p2m.h files. It was never supposed to be included directly, and for the
> purpose of putting common function declarations into the common header
> it is more helpful if things like p2m_t are already available at the
> inclusion point.
> 
> Take the opportunity and also ditch a duplicate public/memory.h from the
> ARM header.
> 
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Acked-by: Julien Grall <julien.grall@arm.com>

Cheers,

-- 
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] p2m: move p2m-common.h inclusion point
  2018-10-05 10:21 ` Paul Durrant
  2018-10-05 10:26   ` Jan Beulich
@ 2018-11-06 16:41   ` Jan Beulich
  1 sibling, 0 replies; 7+ messages in thread
From: Jan Beulich @ 2018-11-06 16:41 UTC (permalink / raw)
  To: Paul Durrant
  Cc: Stefano Stabellini, Wei Liu, Konrad Rzeszutek Wilk,
	Andrew Cooper, Tim Deegan, george.dunlap, Julien Grall,
	xen-devel, Ian Jackson

>>> On 05.10.18 at 12:21, <Paul.Durrant@citrix.com> wrote:
>>  -----Original Message-----
>> From: Jan Beulich [mailto:JBeulich@suse.com]
>> Sent: 05 October 2018 11:14
>> To: xen-devel <xen-devel@lists.xenproject.org>
>> Cc: Julien Grall <julien.grall@arm.com>; Andrew Cooper
>> <Andrew.Cooper3@citrix.com>; Paul Durrant <Paul.Durrant@citrix.com>; Wei
>> Liu <wei.liu2@citrix.com>; George Dunlap <George.Dunlap@citrix.com>; Ian
>> Jackson <Ian.Jackson@citrix.com>; Stefano Stabellini
>> <sstabellini@kernel.org>; Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>;
>> Tim (Xen.org) <tim@xen.org>
>> Subject: [PATCH] p2m: move p2m-common.h inclusion point
>> 
>> The header is (hence its name) supposed to be a helper for the per-arch
>> p2m.h files. It was never supposed to be included directly, and for the
>> purpose of putting common function declarations into the common header
>> it is more helpful if things like p2m_t are already available at the
>> inclusion point.
>> 
>> Take the opportunity and also ditch a duplicate public/memory.h from the
>> ARM header.
>> 
>> Signed-off-by: Jan Beulich <jbeulich@suse.com>
> 
> I suppose you could now drop the 'forward enum declaration' part of my patch 
> now that it is no longer forwards (depending on which is committed first of 
> course).

Could you remind me which patch and/or header this was in?
I can't seem to be able to locate it ...

Jan



_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Ping: [PATCH] p2m: move p2m-common.h inclusion point
  2018-10-05 10:14 [PATCH] p2m: move p2m-common.h inclusion point Jan Beulich
  2018-10-05 10:21 ` Paul Durrant
  2018-10-05 10:27 ` Julien Grall
@ 2018-11-06 16:43 ` Jan Beulich
  2018-11-06 16:51 ` George Dunlap
  3 siblings, 0 replies; 7+ messages in thread
From: Jan Beulich @ 2018-11-06 16:43 UTC (permalink / raw)
  To: Andrew Cooper, George Dunlap
  Cc: Stefano Stabellini, Wei Liu, Konrad Rzeszutek Wilk, Tim Deegan,
	Ian Jackson, Julien Grall, Paul Durrant, xen-devel

>>> On 05.10.18 at 12:14, <JBeulich@suse.com> wrote:
> The header is (hence its name) supposed to be a helper for the per-arch
> p2m.h files. It was never supposed to be included directly, and for the
> purpose of putting common function declarations into the common header
> it is more helpful if things like p2m_t are already available at the
> inclusion point.
> 
> Take the opportunity and also ditch a duplicate public/memory.h from the
> ARM header.
> 
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Can I get an ack or otherwise from one of you two, please?

Thanks, Jan



_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] p2m: move p2m-common.h inclusion point
  2018-10-05 10:14 [PATCH] p2m: move p2m-common.h inclusion point Jan Beulich
                   ` (2 preceding siblings ...)
  2018-11-06 16:43 ` Ping: " Jan Beulich
@ 2018-11-06 16:51 ` George Dunlap
  3 siblings, 0 replies; 7+ messages in thread
From: George Dunlap @ 2018-11-06 16:51 UTC (permalink / raw)
  To: Jan Beulich, xen-devel
  Cc: Stefano Stabellini, Wei Liu, Konrad Rzeszutek Wilk,
	George Dunlap, Andrew Cooper, Ian Jackson, Tim Deegan,
	Julien Grall, Paul Durrant

On 10/05/2018 11:14 AM, Jan Beulich wrote:
> The header is (hence its name) supposed to be a helper for the per-arch
> p2m.h files. It was never supposed to be included directly, and for the
> purpose of putting common function declarations into the common header
> it is more helpful if things like p2m_t are already available at the
> inclusion point.
> 
> Take the opportunity and also ditch a duplicate public/memory.h from the
> ARM header.
> 
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Acked-by: George Dunlap <george.dunlap@citrix.com>

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-11-06 16:51 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-05 10:14 [PATCH] p2m: move p2m-common.h inclusion point Jan Beulich
2018-10-05 10:21 ` Paul Durrant
2018-10-05 10:26   ` Jan Beulich
2018-11-06 16:41   ` Jan Beulich
2018-10-05 10:27 ` Julien Grall
2018-11-06 16:43 ` Ping: " Jan Beulich
2018-11-06 16:51 ` George Dunlap

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.