iommu: fix arm build after e9be34be5
PATCH 1/1 iommu: fix arm build after e9be34be5
The function iommu_share_p2m_table is used by both ARM and x86 but hap_enabled macro is x86 only. Put the ASSERT under CONFIG_X86.
--- xen/drivers/passthrough/iommu.c | 2 ++ 1 file changed, 2 insertions(+)
xen/drivers/passthrough/iommu.c +2 -0
@@ -505,7 +505,9 @@ int iommu_do_domctl(void iommu_share_p2m_table (struct domain * d) { +#ifdef CONFIG_X86 ASSERT (hap_enabled (d)); +#endif /* * iommu_use_hap_pt(d) cannot be used here because during domain * construction need_iommu(d) will always return false here.
Signature · 7 lines
2.11.0 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 4 lines · Wei Liu
The function
iommu_share_p2m_tableis used by both ARM and x86 buthap_enabledmacro is x86 only. Put the ASSERT underCONFIG_X86.Signed-off-by Wei Liu <[email protected]>
I had a patch to just remove the ASSERT, but that's fine also.
Thanks!
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 11 lines
-----Original Message-----
From: Xen-devel [mailto:[email protected]] On Behalf Of Wei Liu
Sent: 09 October 2018 19:58
To: [email protected]
Cc: Wei Liu <[email protected]>; Jan Beulich <[email protected]>; Roger Pau Monne <[email protected]>
Subject: [Xen-devel] [PATCH] iommu: fix arm build aftere9be34be5The function
iommu_share_p2m_tableis used by both ARM and x86 buthap_enabledmacro is x86 only. Put the ASSERT underCONFIG_X86.
Would it be unreasonable to make hap_enabled() common and define it to true for ARM?
Paul
Quoted 25 lines
Signed-off-by Wei Liu <[email protected]>--- xen/drivers/passthrough/iommu.c | 2 ++ 1 file changed, 2 insertions(+)xen/drivers/passthrough/iommu.c +2
-1@@ -505,7 +505,9 @@ int iommu_do_domctl(void iommu_share_p2m_table (struct domain * d) { +#ifdef CONFIG_X86 ASSERT (hap_enabled (d)); +#endif /* * iommu_use_hap_pt(d) cannot be used here because during domain * construction need_iommu(d) will always return false here. -- 2.11.0
Quoted 4 lines
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 9 lines · Paul Durrant
Quoted 9 lines
-----Original Message-----
From: Xen-devel [mailto:[email protected]] On Behalf Of Wei Liu
Sent: 09 October 2018 19:58
To: [email protected]
Cc: Wei Liu <[email protected]>; Jan Beulich <[email protected]>; Roger Pau Monne <[email protected]>
Subject: [Xen-devel] [PATCH] iommu: fix arm build aftere9be34be5
Quoted 4 lines
Quoted 2 lines
The function
iommu_share_p2m_tableis used by both ARM and x86 buthap_enabledmacro is x86 only. Put the ASSERT underCONFIG_X86.Would it be unreasonable to make
hap_enabled()common and define it to true for ARM?
I assumed hap_enabled was hardcoded to true for ARM, but it's only used in x86 code and vm_event so far (and here now), so I'm not sure if it's worth it.
In any case, I think this should go in as it fixes the build, and adding hap_enabled for ARM can be done later.
Roger.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 24 lines
-----Original Message-----
From: Roger Pau Monne
Sent: 10 October 2018 10:13
To: Paul Durrant <[email protected]>
Cc: Wei Liu <[email protected]>; [email protected]; Jan Beulich <[email protected]>
Subject: Re: [Xen-devel] [PATCH] iommu: fix arm build aftere9be34be5Quoted 2 lines · Paul Durrant
Quoted 2 lines
-----Original Message-----
From: Xen-devel [mailto:[email protected]] OnBehalf
Quoted 4 lines
Quoted 4 lines
Of Wei Liu
Sent: 09 October 2018 19:58
To: [email protected]
Cc: Wei Liu <[email protected]>; Jan Beulich <[email protected]>;Roger
Quoted 7 lines
Quoted 5 lines
Pau Monne <[email protected]>
Subject: [Xen-devel] [PATCH] iommu: fix arm build aftere9be34be5The function
iommu_share_p2m_tableis used by both ARM and x86 buthap_enabledmacro is x86 only. Put the ASSERT underCONFIG_X86.Would it be unreasonable to make
hap_enabled()common and define it to
Quoted 9 lines
true for ARM?
I assumed
hap_enabledwas hardcoded to true for ARM, but it's only used in x86 code andvm_eventso far (and here now), so I'm not sure if it's worth it.In any case, I think this should go in as it fixes the build, and adding
hap_enabledfor ARM can be done later.
Oh yes. It can certainly be tidied later.
Paul
Quoted 1 line
Roger.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 5 lines
Quoted 1 line
Quoted 1 line · On 09.10.18 at 20:58, <[email protected]> wrote:
The function
iommu_share_p2m_tableis used by both ARM and x86 buthap_enabledmacro is x86 only. Put the ASSERT underCONFIG_X86.Signed-off-by Wei Liu <[email protected]>
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel