From nobody Tue May 7 20:10:00 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1566315572; cv=none; d=zoho.com; s=zohoarc; b=EuYUmliIw5yOzjtrFl1udjX9orf/vDWlPUjM+itlsgVOUZVaig+c8fQW6G4s32ZCRmGQjVdEQZgGgkJDKzIclqJC9ipRUCKFpwW8c4ieNOc1Ez3AMkHDq0t2UhG9Fvo52GEiSXvTXvDCkCSe+ryM9Pl7hpRXlCb90hRwhWu4s4E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1566315572; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=CVOPELqZl00dfp/T1ks1qNzSuG2YrRfoQwDYtZXsfoM=; b=Z0pbQvUq2sPMhTnM41EFkebDf6Azcxr99w03rQNPgQFWXO4Meyp8yKdfNc4Emfh+11fCPad0/X0Lwt5KI0wPJ8O9mnsVf/3kp3r+ytLjW3u3q3eSxsfr65QZJYbQ6cgam1Clmj4OLx9kxA6nqCH0oap37tVUUghl2WDop7POpho= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1566315572285580.263907141642; Tue, 20 Aug 2019 08:39:32 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1i06D8-0008PD-MO; Tue, 20 Aug 2019 15:38:14 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1i06D7-0008P8-Lv for xen-devel@lists.xenproject.org; Tue, 20 Aug 2019 15:38:13 +0000 Received: from esa1.hc3370-68.iphmx.com (unknown [216.71.145.142]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 83aff735-c360-11e9-adb7-12813bfff9fa; Tue, 20 Aug 2019 15:38:12 +0000 (UTC) X-Inumbo-ID: 83aff735-c360-11e9-adb7-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1566315492; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=h3Ez3V9lq8Hc7+lj2Q7W7saYrXfFIYnXS9qxck2i//4=; b=ff2Wgi4QwfhuE97jrHgyNZIwrp8jK3anpPyWJ4JmkKOj/wiHJxsYEAXh /B0U8GoKHjVlIxw12lm4u0BoT7OfG7aHgIZxSSAuOyT1Rl3k357erw4MT bUyEiGGp08ZlnHLEMwAC6TplXxaLBdOvEl8c8Mh3vZThpOdQLvnK/294y 4=; Authentication-Results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=roger.pau@citrix.com; spf=Pass smtp.mailfrom=roger.pau@citrix.com; spf=None smtp.helo=postmaster@mail.citrix.com Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: None (esa1.hc3370-68.iphmx.com: no sender authenticity information available from domain of roger.pau@citrix.com) identity=pra; client-ip=162.221.158.21; receiver=esa1.hc3370-68.iphmx.com; envelope-from="roger.pau@citrix.com"; x-sender="roger.pau@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa1.hc3370-68.iphmx.com: domain of roger.pau@citrix.com designates 162.221.158.21 as permitted sender) identity=mailfrom; client-ip=162.221.158.21; receiver=esa1.hc3370-68.iphmx.com; envelope-from="roger.pau@citrix.com"; x-sender="roger.pau@citrix.com"; x-conformance=sidf_compatible; x-record-type="v=spf1"; x-record-text="v=spf1 ip4:209.167.231.154 ip4:178.63.86.133 ip4:195.66.111.40/30 ip4:85.115.9.32/28 ip4:199.102.83.4 ip4:192.28.146.160 ip4:192.28.146.107 ip4:216.52.6.88 ip4:216.52.6.188 ip4:162.221.158.21 ip4:162.221.156.83 ~all" Received-SPF: None (esa1.hc3370-68.iphmx.com: no sender authenticity information available from domain of postmaster@mail.citrix.com) identity=helo; client-ip=162.221.158.21; receiver=esa1.hc3370-68.iphmx.com; envelope-from="roger.pau@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: rgd8xEl9LLmyeFnI+ZpqQ+PNkQjmoHF0E/RejMvuAI4WGFRtOyvvc9MNNpwb7b6Wgn8026jukM 4CnY45Qm3pawBNZ+tvcVAxL/clt2KDrgU5L1SlzwbU/7EClaZuTSHbzHKDgg9O7MXuTyAkOgK2 cO1vrLEANQpX8Zcj8G12V6lbq42II5+iG78S7R6iN7CBinmo7Uenj4KxvslxX/SFElbUrQ9y9c oxy6ManJuJfrVYO7QsrnBQIAnMFc4nwMW9zUrerDnTCTDKymDQdAsCm+tfLFn8Qsyh9tQr+CHi OJY= X-SBRS: 2.7 X-MesageID: 4530990 X-Ironport-Server: esa1.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.64,408,1559534400"; d="scan'208";a="4530990" From: Roger Pau Monne To: Date: Tue, 20 Aug 2019 17:37:45 +0200 Message-ID: <20190820153745.40103-1-roger.pau@citrix.com> X-Mailer: git-send-email 2.22.0 MIME-Version: 1.0 Subject: [Xen-devel] [PATCH] p2m/ept: pass correct level to atomic_write_ept_entry in ept_invalidate_emt X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Sergey Dyasli , Kevin Tian , Jun Nakajima , Wei Liu , George Dunlap , Andrew Cooper , Paul Durrant , Jan Beulich , Roger Pau Monne Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) The level passed to ept_invalidate_emt corresponds to the EPT entry passed as the mfn parameter, which is a pointer to an EPT page table, hence the entries in that page table will have one level less than the parent. Fix the call to atomic_write_ept_entry to pass the correct level, ie: one level less than the parent. Fixes: 50fe6e73705 ('pvh dom0: add and remove foreign pages') Signed-off-by: Roger Pau Monn=C3=A9 Reviewed-by: Kevin Tian . --- Cc: Jun Nakajima Cc: Kevin Tian Cc: George Dunlap Cc: Jan Beulich Cc: Andrew Cooper Cc: Wei Liu Cc: Sergey Dyasli Cc: Paul Durrant --- xen/arch/x86/mm/p2m-ept.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/x86/mm/p2m-ept.c b/xen/arch/x86/mm/p2m-ept.c index 6b8468c793..23ae6e9da3 100644 --- a/xen/arch/x86/mm/p2m-ept.c +++ b/xen/arch/x86/mm/p2m-ept.c @@ -367,7 +367,7 @@ static bool_t ept_invalidate_emt(struct p2m_domain *p2m= , mfn_t mfn, e.emt =3D MTRR_NUM_TYPES; if ( recalc ) e.recalc =3D 1; - rc =3D atomic_write_ept_entry(p2m, &epte[i], e, level); + rc =3D atomic_write_ept_entry(p2m, &epte[i], e, level - 1); ASSERT(rc =3D=3D 0); changed =3D 1; } --=20 2.22.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel