* [PATCH] xen/arm: livepatch: Include xen/mm.h rather than asm/mm.h
@ 2021-01-15 19:29 Julien Grall
2021-01-15 19:57 ` Konrad Rzeszutek Wilk
2021-01-18 9:26 ` Jan Beulich
0 siblings, 2 replies; 4+ messages in thread
From: Julien Grall @ 2021-01-15 19:29 UTC (permalink / raw)
To: xen-devel
Cc: andrew.cooper3, Julien Grall, Konrad Rzeszutek Wilk,
Ross Lagerwall, Stefano Stabellini, Julien Grall,
Volodymyr Babchuk
From: Julien Grall <jgrall@amazon.com>
Livepatch fails to build on Arm after commit ced9795c6cb4 "mm: split
out mfn_t / gfn_t / pfn_t definitions and helpers":
In file included from livepatch.c:13:0:
/oss/xen/xen/include/asm/mm.h:32:28: error: field ‘list’ has incomplete type
struct page_list_entry list;
^~~~
/oss/xen/xen/include/asm/mm.h:53:43: error: ‘MAX_ORDER’ undeclared here (not in a function); did you mean ‘PFN_ORDER’?
unsigned long first_dirty:MAX_ORDER + 1;
^~~~~~~~~
PFN_ORDER
/oss/xen/xen/include/asm/mm.h:53:31: error: bit-field ‘first_dirty’ width not an integer constant
unsigned long first_dirty:MAX_ORDER + 1;
^~~~~~~~~~~
This is happening because asm/mm.h is included directly by livepatch.c.
Yet it depends on xen/mm.h to be included first so MAX_ORDER is defined.
Resolve the build failure by including xen/mm.h rather than asm/mm.h.
Fixes: ced9795c6cb4 ("mm: split out mfn_t / gfn_t / pfn_t definitions and helpers")
Signed-off-by: Julien Grall <jgrall@amazon.com>
---
xen/arch/arm/livepatch.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xen/arch/arm/livepatch.c b/xen/arch/arm/livepatch.c
index 915e9d926a11..75e8adcfd6a1 100644
--- a/xen/arch/arm/livepatch.c
+++ b/xen/arch/arm/livepatch.c
@@ -6,11 +6,11 @@
#include <xen/lib.h>
#include <xen/livepatch_elf.h>
#include <xen/livepatch.h>
+#include <xen/mm.h>
#include <xen/vmap.h>
#include <asm/cpufeature.h>
#include <asm/livepatch.h>
-#include <asm/mm.h>
/* Override macros from asm/page.h to make them work with mfn_t */
#undef virt_to_mfn
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] xen/arm: livepatch: Include xen/mm.h rather than asm/mm.h
2021-01-15 19:29 [PATCH] xen/arm: livepatch: Include xen/mm.h rather than asm/mm.h Julien Grall
@ 2021-01-15 19:57 ` Konrad Rzeszutek Wilk
2021-01-15 20:06 ` Stefano Stabellini
2021-01-18 9:26 ` Jan Beulich
1 sibling, 1 reply; 4+ messages in thread
From: Konrad Rzeszutek Wilk @ 2021-01-15 19:57 UTC (permalink / raw)
To: Julien Grall
Cc: xen-devel, andrew.cooper3, Julien Grall, Ross Lagerwall,
Stefano Stabellini, Volodymyr Babchuk
On Fri, Jan 15, 2021 at 07:29:47PM +0000, Julien Grall wrote:
> From: Julien Grall <jgrall@amazon.com>
>
> Livepatch fails to build on Arm after commit ced9795c6cb4 "mm: split
> out mfn_t / gfn_t / pfn_t definitions and helpers":
>
> In file included from livepatch.c:13:0:
> /oss/xen/xen/include/asm/mm.h:32:28: error: field ‘list’ has incomplete type
> struct page_list_entry list;
> ^~~~
> /oss/xen/xen/include/asm/mm.h:53:43: error: ‘MAX_ORDER’ undeclared here (not in a function); did you mean ‘PFN_ORDER’?
> unsigned long first_dirty:MAX_ORDER + 1;
> ^~~~~~~~~
> PFN_ORDER
> /oss/xen/xen/include/asm/mm.h:53:31: error: bit-field ‘first_dirty’ width not an integer constant
> unsigned long first_dirty:MAX_ORDER + 1;
> ^~~~~~~~~~~
>
> This is happening because asm/mm.h is included directly by livepatch.c.
> Yet it depends on xen/mm.h to be included first so MAX_ORDER is defined.
>
> Resolve the build failure by including xen/mm.h rather than asm/mm.h.
>
> Fixes: ced9795c6cb4 ("mm: split out mfn_t / gfn_t / pfn_t definitions and helpers")
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Thank you!
> Signed-off-by: Julien Grall <jgrall@amazon.com>
> ---
> xen/arch/arm/livepatch.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/xen/arch/arm/livepatch.c b/xen/arch/arm/livepatch.c
> index 915e9d926a11..75e8adcfd6a1 100644
> --- a/xen/arch/arm/livepatch.c
> +++ b/xen/arch/arm/livepatch.c
> @@ -6,11 +6,11 @@
> #include <xen/lib.h>
> #include <xen/livepatch_elf.h>
> #include <xen/livepatch.h>
> +#include <xen/mm.h>
> #include <xen/vmap.h>
>
> #include <asm/cpufeature.h>
> #include <asm/livepatch.h>
> -#include <asm/mm.h>
>
> /* Override macros from asm/page.h to make them work with mfn_t */
> #undef virt_to_mfn
> --
> 2.17.1
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] xen/arm: livepatch: Include xen/mm.h rather than asm/mm.h
2021-01-15 19:57 ` Konrad Rzeszutek Wilk
@ 2021-01-15 20:06 ` Stefano Stabellini
0 siblings, 0 replies; 4+ messages in thread
From: Stefano Stabellini @ 2021-01-15 20:06 UTC (permalink / raw)
To: Konrad Rzeszutek Wilk
Cc: Julien Grall, xen-devel, andrew.cooper3, Julien Grall,
Ross Lagerwall, Stefano Stabellini, Volodymyr Babchuk
[-- Attachment #1: Type: text/plain, Size: 2212 bytes --]
On Fri, 15 Jan 2021, Konrad Rzeszutek Wilk wrote:
> On Fri, Jan 15, 2021 at 07:29:47PM +0000, Julien Grall wrote:
> > From: Julien Grall <jgrall@amazon.com>
> >
> > Livepatch fails to build on Arm after commit ced9795c6cb4 "mm: split
> > out mfn_t / gfn_t / pfn_t definitions and helpers":
> >
> > In file included from livepatch.c:13:0:
> > /oss/xen/xen/include/asm/mm.h:32:28: error: field ‘list’ has incomplete type
> > struct page_list_entry list;
> > ^~~~
> > /oss/xen/xen/include/asm/mm.h:53:43: error: ‘MAX_ORDER’ undeclared here (not in a function); did you mean ‘PFN_ORDER’?
> > unsigned long first_dirty:MAX_ORDER + 1;
> > ^~~~~~~~~
> > PFN_ORDER
> > /oss/xen/xen/include/asm/mm.h:53:31: error: bit-field ‘first_dirty’ width not an integer constant
> > unsigned long first_dirty:MAX_ORDER + 1;
> > ^~~~~~~~~~~
> >
> > This is happening because asm/mm.h is included directly by livepatch.c.
> > Yet it depends on xen/mm.h to be included first so MAX_ORDER is defined.
> >
> > Resolve the build failure by including xen/mm.h rather than asm/mm.h.
> >
> > Fixes: ced9795c6cb4 ("mm: split out mfn_t / gfn_t / pfn_t definitions and helpers")
> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
> Thank you!
> > Signed-off-by: Julien Grall <jgrall@amazon.com>
> > ---
> > xen/arch/arm/livepatch.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/xen/arch/arm/livepatch.c b/xen/arch/arm/livepatch.c
> > index 915e9d926a11..75e8adcfd6a1 100644
> > --- a/xen/arch/arm/livepatch.c
> > +++ b/xen/arch/arm/livepatch.c
> > @@ -6,11 +6,11 @@
> > #include <xen/lib.h>
> > #include <xen/livepatch_elf.h>
> > #include <xen/livepatch.h>
> > +#include <xen/mm.h>
> > #include <xen/vmap.h>
> >
> > #include <asm/cpufeature.h>
> > #include <asm/livepatch.h>
> > -#include <asm/mm.h>
> >
> > /* Override macros from asm/page.h to make them work with mfn_t */
> > #undef virt_to_mfn
> > --
> > 2.17.1
> >
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] xen/arm: livepatch: Include xen/mm.h rather than asm/mm.h
2021-01-15 19:29 [PATCH] xen/arm: livepatch: Include xen/mm.h rather than asm/mm.h Julien Grall
2021-01-15 19:57 ` Konrad Rzeszutek Wilk
@ 2021-01-18 9:26 ` Jan Beulich
1 sibling, 0 replies; 4+ messages in thread
From: Jan Beulich @ 2021-01-18 9:26 UTC (permalink / raw)
To: Julien Grall
Cc: andrew.cooper3, Julien Grall, Konrad Rzeszutek Wilk,
Ross Lagerwall, Stefano Stabellini, Volodymyr Babchuk, xen-devel
On 15.01.2021 20:29, Julien Grall wrote:
> From: Julien Grall <jgrall@amazon.com>
>
> Livepatch fails to build on Arm after commit ced9795c6cb4 "mm: split
> out mfn_t / gfn_t / pfn_t definitions and helpers":
>
> In file included from livepatch.c:13:0:
> /oss/xen/xen/include/asm/mm.h:32:28: error: field ‘list’ has incomplete type
> struct page_list_entry list;
> ^~~~
> /oss/xen/xen/include/asm/mm.h:53:43: error: ‘MAX_ORDER’ undeclared here (not in a function); did you mean ‘PFN_ORDER’?
> unsigned long first_dirty:MAX_ORDER + 1;
> ^~~~~~~~~
> PFN_ORDER
> /oss/xen/xen/include/asm/mm.h:53:31: error: bit-field ‘first_dirty’ width not an integer constant
> unsigned long first_dirty:MAX_ORDER + 1;
> ^~~~~~~~~~~
>
> This is happening because asm/mm.h is included directly by livepatch.c.
> Yet it depends on xen/mm.h to be included first so MAX_ORDER is defined.
>
> Resolve the build failure by including xen/mm.h rather than asm/mm.h.
>
> Fixes: ced9795c6cb4 ("mm: split out mfn_t / gfn_t / pfn_t definitions and helpers")
> Signed-off-by: Julien Grall <jgrall@amazon.com>
Thanks for the quick fix, and I'm sorry for the breakage. I'll
try to make sure I'll also check building with livepatch enabled
down the road.
Jan
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-01-18 9:27 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-15 19:29 [PATCH] xen/arm: livepatch: Include xen/mm.h rather than asm/mm.h Julien Grall
2021-01-15 19:57 ` Konrad Rzeszutek Wilk
2021-01-15 20:06 ` Stefano Stabellini
2021-01-18 9:26 ` Jan Beulich
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.