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

[PATCH] x86/CPUID: unconditionally set XEN_HVM_CPUID_IOMMU_MAPPINGS


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • Date: Fri, 15 Jan 2021 16:01:38 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=I8a0oZZtkRzO4sGC69PGNOrswxQ3kIqY/+dQJSecbxY=; b=miSCLxtatulA9GwbO1gJzjXu9ePLuiBDxpNIZ5SIyVdXub/nz26hNJV691bSDk3lPAmAvAR3FTImyHtIAqovz0vt9J9dw7KpvOqUVuBgw+NHPgwJzasBH7ODE1XZovvXwKBbWpRmv0R2qCziKJ/Xd0O96C8YBkp2dqol+Yqy7rEZ7XG9vluE8nDlztkdZ8dop9x29cLcHarWpkU4+IiiR9qQ+VfEl8Ox6tA7eXwq1iy9lAfaW9IwlU2sLI0hCjHROB0onx3uG2JpQ4XEOX85vadY+aYspcwTFFe6/l3kUQ+EU6U/3C5qikeIIERUmu4M8H7JHtinjZ0iLWKpDNorGQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NZHTZ/H7QOjRE5BdT+sywK9urRzwoLM68+Ov9wTBhT+vSDbrSqiuoSoGCF1rO+okdUTbOd5DFr+9u8tODFgRsbJVY1hqGHvx3GMsYqeiTCxBdUDJLQ9e7In6W4CvX0ShnV6G1E9ar4x6Z4yNS7Ky2+AXb53yXTK+Z0Gn347VZJ9xvAlUxFYi83yTDwWRPiuCh53RM+1dkIRYjEplarVwnR1xzGD8rQT0/PX3txZBWzsmLzUOhEAc9aJBYajBYLPNUavzrFlDjXufSppoI0OSOlEd6sH3XD8LjRnHWstEkX04RxGik1oHY3o3y1qb5lJOezWxyBzkxk1qvvHFCWqLVQ==
  • Authentication-results: esa1.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: Roger Pau Monne <roger.pau@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Fri, 15 Jan 2021 15:01:52 +0000
  • Ironport-sdr: ky8z+JyekCDkVUfBcvWCVnlr3B95zXzJsU1w9RRFFWXYdJn9o6mGfWzMFARpvM81L5BXq9WSFr QeFU2vZwmLDFSVp6adFCvZedMAAFvqzjnKyq0BQ6zEgdJKSNHy3GTy+suYvykiHIVUbeQJxHfB U+O8oBK2S64o8ixO4z9qMT281Bl6QWY9cfgboM0CAP1EKaM7ruzMnwvGFIJNJko2RgVrWOKHcg vhNsL7WC1L8k0TEr3hkeckDzE5hf0zf8AzPQTpH8LvFtS5erHwc0ZVhP6st+SoKELiHqMOiSnj muM=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

This is a revert of f5cfa0985673 plus a rework of the comment that
accompanies the setting of the flag so we don't forget why it needs to
be unconditionally set: it's indicating whether the version of Xen has
the original issue fixed and IOMMU entries are created for
grant/foreign maps.

Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
---
 xen/arch/x86/traps.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/xen/arch/x86/traps.c b/xen/arch/x86/traps.c
index 4bd2cb6a1a..d491b1741e 100644
--- a/xen/arch/x86/traps.c
+++ b/xen/arch/x86/traps.c
@@ -1049,11 +1049,10 @@ void cpuid_hypervisor_leaves(const struct vcpu *v, 
uint32_t leaf,
             res->a |= XEN_HVM_CPUID_X2APIC_VIRT;
 
         /*
-         * Indicate that memory mapped from other domains (either grants or
-         * foreign pages) has valid IOMMU entries.
+         * Unconditionally set the flag to indicate this version of Xen has
+         * been fixed to create IOMMU mappings for grant/foreign maps.
          */
-        if ( is_iommu_enabled(d) )
-            res->a |= XEN_HVM_CPUID_IOMMU_MAPPINGS;
+        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;
-- 
2.29.2




 


Rackspace

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