x86/mem_sharing: gate enabling on cpu_has_vmx
PATCH 1/1 x86/mem_sharing: gate enabling on cpu_has_vmx
From: Tamas K Lengyel <[email protected]>
It is unclear whether mem_sharing was ever made to work on other architectures but at this time the only verified platform for it is vmx. No plans to support or maintain it on other architectures. Make this explicit by checking during initialization.
Signed-off-by Tamas K Lengyel <[email protected]>
--- xen/arch/x86/mm/mem_sharing.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
xen/arch/x86/mm/mem_sharing.c +1 -1
@@ -1444,7 +1444,7 @@ static inline int mem_sharing_control(struct domain *d, bool enable, {if ( enable ) { -if (unlikely (!is_hvm_domain (d)) ) +if (unlikely (!is_hvm_domain (d) || !cpu_has_vmx) )return -EOPNOTSUPP ;if (unlikely (!hap_enabled (d)) )
Signature · 1 line
2.26.1
Quoted 8 lines · Tamas K Lengyel
From: Tamas K Lengyel <[email protected]>
It is unclear whether
mem_sharingwas ever made to work on other architectures but at this time the only verified platform for it is vmx. No plans to support or maintain it on other architectures. Make this explicit by checking during initialization.Signed-off-by Tamas K Lengyel <[email protected]>
Reviewed-by Wei Liu <[email protected]>