x86/mem_sharing: gate enabling on cpu_has_vmx

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 <tamas@tklengyel.com>
Reviewed-by: Wei Liu <wl@xen.org>
This commit is contained in:
Tamas K Lengyel authored and Jan Beulich committed 2020-05-27 09:50:55 +02:00
1 parent 93401e28a8
commit b66e28226d
1 file changed
+1 -1
+1 -1
View File
@@ -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)) )
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.