Skip to contentSkip to conversation

x86: put vcpumask_to_pcpumask under CONFIG_PV

PATCH In review Wei Liu 2 participants 3 messages Nov 2, 2018 – Nov 5, 2018

lore
Share & tools
lore

Wei Liu

author
#0 lore raw

PATCH 1/1 x86: put vcpumask_to_pcpumask under CONFIG_PV

This function is used by PV code only. This issue is discovered by clang build.

---
 xen/arch/x86/mm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
xen/arch/x86/mm.c +1 -1
index f96678f46d..01ec6aa2bf 100644
@@ -3057,6 +3057,7 @@ int new_guest_cr3(mfn_t mfn)
 #endif
 }
 
+#ifdef CONFIG_PV
 static inline int vcpumask_to_pcpumask(
     struct domain *d, XEN_GUEST_HANDLE_PARAM(const_void) bmap, cpumask_t *pmask)
 {
@@ -3099,7 +3100,6 @@ static inline int vcpumask_to_pcpumask(
     }
 }
 
-#ifdef CONFIG_PV
 static struct domain *get_pg_owner(domid_t domid)
 {
     struct domain *pg_owner = NULL, *curr = current->domain;
Signature · 7 lines
2.11.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Reviewed-by on v1 1/1
#1 lore raw
Quoted 2 lines · Wei Liu

This function is used by PV code only. This issue is discovered by clang build.

Indeed.  It is only used by two PV hypercalls.

Quoted 11 lines
---
 xen/arch/x86/mm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
xen/arch/x86/mm.c +0 -0
index f96678f46d..01ec6aa2bf 100644

xen/arch/x86/mm.c int new_guest_cr3(mfn_t mfn) · line 3061

Quoted 5 lines
xen/arch/x86/mm.c +1 -0
@@ -3057,6 +3057,7 @@ int new_guest_cr3(mfn_t mfn)
 #endif
 }
 
+#ifdef CONFIG_PV
 static inline int vcpumask_to_pcpumask(

Mind dropping this spurious inline while you're at it?

xen/arch/x86/mm.c static inline int vcpumask_to_pcpumask( · line 3105

Quoted 10 lines
xen/arch/x86/mm.c +0 -1
     struct domain *d, XEN_GUEST_HANDLE_PARAM(const_void) bmap, cpumask_t *pmask)
 {
@@ -3099,7 +3100,6 @@ static inline int vcpumask_to_pcpumask(
     }
 }
 
-#ifdef CONFIG_PV
 static struct domain *get_pg_owner(domid_t domid)
 {
     struct domain *pg_owner = NULL, *curr = current->domain;

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

author
#2 lore raw
Quoted 20 lines · Andrew Cooper
Quoted 2 lines · Wei Liu

This function is used by PV code only. This issue is discovered by clang build.

Indeed.  It is only used by two PV hypercalls.

Quoted 14 lines
---
 xen/arch/x86/mm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
xen/arch/x86/mm.c +0 -0
index f96678f46d..01ec6aa2bf 100644
@@ -3057,6 +3057,7 @@ int new_guest_cr3(mfn_t mfn)
 #endif
 }
 
Quoted 4 lines

xen/arch/x86/mm.c int new_guest_cr3(mfn_t mfn) · line 3061

Quoted 2 lines
xen/arch/x86/mm.c +1 -0
+#ifdef CONFIG_PV
 static inline int vcpumask_to_pcpumask(

Mind dropping this spurious inline while you're at it?

Will do.

Quoted 2 lines

Thanks.

Quoted 7 lines
Quoted 7 lines
xen/arch/x86/mm.c +0 -0
     struct domain *d, XEN_GUEST_HANDLE_PARAM(const_void) bmap, cpumask_t *pmask)
 {
@@ -3099,7 +3100,6 @@ static inline int vcpumask_to_pcpumask(
     }
 }
 
Quoted 5 lines

xen/arch/x86/mm.c static inline int vcpumask_to_pcpumask( · line 3105

Quoted 4 lines
xen/arch/x86/mm.c +0 -1
-#ifdef CONFIG_PV
 static struct domain *get_pg_owner(domid_t domid)
 {
     struct domain *pg_owner = NULL, *curr = current->domain;

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel