]> xenbits.xensource.com Git - people/pauldu/xen.git/commitdiff
x86/CPUID: suppress IOMMU related hypervisor leaf data
authorJan Beulich <jbeulich@suse.com>
Tue, 10 Nov 2020 13:39:30 +0000 (14:39 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 10 Nov 2020 13:39:30 +0000 (14:39 +0100)
Now that the IOMMU for guests can't be enabled "on demand" anymore,
there's also no reason to expose the related CPUID bit "just in case".

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/traps.c

index bc5b8f8ea3975a28e86b27f0aa7f68a5a17e6fbe..c27dd4cd4390b345875e1d558f9ec64d63ea1383 100644 (file)
@@ -1050,7 +1050,8 @@ void cpuid_hypervisor_leaves(const struct vcpu *v, uint32_t leaf,
          * Indicate that memory mapped from other domains (either grants or
          * foreign pages) has valid IOMMU entries.
          */
-        res->a |= XEN_HVM_CPUID_IOMMU_MAPPINGS;
+        if ( is_iommu_enabled(d) )
+            res->a |= XEN_HVM_CPUID_IOMMU_MAPPINGS;
 
         /* Indicate presence of vcpu id and set it in ebx */
         res->a |= XEN_HVM_CPUID_VCPU_ID_PRESENT;