[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen master] x86/CPUID: suppress IOMMU related hypervisor leaf data



commit f5cfa09856732b1d78ff6a21ca3dc33a010da951
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Tue Nov 10 14:39:30 2020 +0100
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Tue Nov 10 14:39:30 2020 +0100

    x86/CPUID: suppress IOMMU related hypervisor leaf data
    
    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@xxxxxxxx>
    Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
 xen/arch/x86/traps.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/xen/arch/x86/traps.c b/xen/arch/x86/traps.c
index bc5b8f8ea3..c27dd4cd43 100644
--- a/xen/arch/x86/traps.c
+++ b/xen/arch/x86/traps.c
@@ -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;
--
generated by git-patchbot for /home/xen/git/xen.git#master



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.