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

[PATCH] hvm/mtrr: remove unnecessary is_hvm_domain check


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • Date: Tue, 23 Mar 2021 12:29:00 +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=AS+XhQJ/OeI9zJkeGx8nS0NK3z03BOORSOXTHp1QKnk=; b=ZofZqpyzFeiPia7AwmtQupQGU7rUECY08b/0f2+OQe+awb0byLabJtg9B4csIUnLM+47xLdmHYHGZf/9ZmhJVpps1BWk7lPauUiJ9LmEygLPF2V162XKqtg3+R1BY68ibAPni24vZyHO7lmXmq8weNdX8FF9+LJmSEIcgNXHlx7Vkwo7PvVgMaUjun/Vb5ivW5rKV5vGAaDAOXOwL7pvsMHYMbQeyMVr+tMfU/5kMhyxQohKUvEmLvIgjIaJedRMbz7F0NnuYdWp0i2YLKGR3Mh6uTUYvrqE9v9SIPi4cwyshQXhnzcFraZvRlX/YwJOFo86aCD3NiidM9pT9UaIWQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XHtUgSQ3L2eCDLD8uqsXMoj5mZJJ11b9WTeFo1rpv7VZjGxPjQ9P1s1WdqVWlorEyzhHHXxW2YEPa6keoqlHZYfPjClT0RfgFWuBLPywsExQuefl9dWKqO1hlQ4XXaLen2tmBgEZ/tXwlc0iE/vkw3LUIt2S52todPpuxreJD2GAZ3QlAT3b/aX9Jx0Rk4tsMawq/8AHAX4cYxfYZRuaIjOo49lnxRX0B0qIkdQywf2+kKrZPviwmWJ02etkgs94aQad319OzS9R8D5I7shBprshAOOwsIZCTAyUPnc8L5EZGL+pWZK2mg49D5Bjpg/PTLW2WWWfkzaymq4BZYJMiQ==
  • 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: Tue, 23 Mar 2021 11:29:58 +0000
  • Ironport-hdrordr: A9a23:EcQ/i6kqvxtzx1Kfqpf1NN5Zj2TpDfN8iWdD5ilNYBxZY6Wkvu ql9c5rtyPcojAXRX0mhJS8KLCNKEmsi6JdzKswGfOZXAfgsHa1N40K1+Hf6hDpBiGWzJ856Y 5OaK57YeeRMXFbid/9+xSxFNwtqeP3iZyApeCb9Ht1SBEvVqcI1WZEIyK6NmEzewVcH5o+E/ Onl616jh6tY24eYMj+JnRtZZm1m/TxmJjrYQELCnccgWHk4F/GhoLSKBSW0gwTVDlC294ZgA 74ujb04b+irvGlygLNvlWji6h+osfryddIGaW3+74oAwjr4zzYB7hJavmuvCo+pemu7Fom+e O83ysIDoBSwFeUVl7wjDfR9yPc8BAIgkWSu2OwsD/Ciui8bA1/NOZ7v6J+VXLimj8dleA58I lum1iBv55yCx7dmSjmo+LDUQpnjCOP0AofuN9Wr1d6FbEGYLt0q4EC+U9OVKgNBzj77oc8ed Mef/301bJ1fV+CVXzfowBUsaaRd0V2OzKgZFQescqI1DU+pgEF82IogOgWnnIN7/sGOuJ5zt WBC79pkqpPU99+V9MEOM4xBfKtDGrDWBTNN3/XG03uEOU9N3rWrZmf2sR82MiaPKUSyp08gZ LAV04dim4oZ1irNsGUxp1M9Xn2MSyAdAWo9+ZzyLRnsrjhTKfmPES4OS8Tutrlqf4eD6TgKo eOEYMTCfT7JXDjHptI0mTFKu1vFUU=
  • Ironport-sdr: FcKmANCDRKhTvWpykVbRCe2zOaj4T2YZDC3GwJvLY9s5tsPfpQeUh6XJ2N48IbBnAmlxdIGAO7 X1oe7/vwp7NyWXwCr79zTbmJRknU+Tz7QE99ia+hBwKSMh8+xq+BWjiF4PKiwGOZ86+gi4asxA O4DkgOsDfYjNg64tEx8H0q/abQ5JNWi2y+xNEjymTuJSHO6JAZOOoDIyIYE9ZSWM39fUBBEFzL OosO/Y7TZ6BEBvC18/o4HcoVFxCaNWxY0u5yr5stH3B7fIxW+jzm/RIJsp2AyVCvyty56r8H43 gtY=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

epte_get_entry_emt will only be called for HVM domains, so the
is_hvm_domain check is unnecessary. It's a remnant of PVHv1.

Shouldn't result in any functional change.

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

diff --git a/xen/arch/x86/hvm/mtrr.c b/xen/arch/x86/hvm/mtrr.c
index fb051d59c3f..82ded1635c3 100644
--- a/xen/arch/x86/hvm/mtrr.c
+++ b/xen/arch/x86/hvm/mtrr.c
@@ -851,10 +851,8 @@ int epte_get_entry_emt(struct domain *d, unsigned long 
gfn, mfn_t mfn,
     if ( gmtrr_mtype == -EADDRNOTAVAIL )
         return -1;
 
-    gmtrr_mtype = is_hvm_domain(d) && v ?
-                  get_mtrr_type(&v->arch.hvm.mtrr,
-                                gfn << PAGE_SHIFT, order) :
-                  MTRR_TYPE_WRBACK;
+    gmtrr_mtype = v ? get_mtrr_type(&v->arch.hvm.mtrr, gfn << PAGE_SHIFT, 
order)
+                    : MTRR_TYPE_WRBACK;
     hmtrr_mtype = get_mtrr_type(&mtrr_state, mfn_x(mfn) << PAGE_SHIFT, order);
     if ( gmtrr_mtype < 0 || hmtrr_mtype < 0 )
         return -1;
-- 
2.30.1




 


Rackspace

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