From nobody Mon Feb 9 18:48:23 2026 Delivered-To: importer@patchew.org Received-SPF: none (zohomail.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; Authentication-Results: mx.zohomail.com; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1578503757; cv=none; d=zohomail.com; s=zohoarc; b=QVUAIv/8nTYjj5CvaafvnZEKnAkzqIF0sMoCLYq2g6vw5oG8HwhqYkdi5/xhfsZRyy2k/gA81h0kkTQwmR+vUeAhbQT27Tzr36dZVFQKUHc/1wBwfp4agLtAhe4qwrpB+M+Wi+zQ1AmxB/ENmZW3+Zh1mQwqKez9jHWHVBeKwLU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1578503757; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=zDUUYFZB1bkPMbiv3VlBuQxbhGlj+hxBxScQ7TPgBRk=; b=KaupWyjdXMe4oN+FZdqa6yv9Ok810j9yRYgH5u8/7mn4YgXnHlEoKUuBoFBc54wPNpUPtLz+baggTrh1F/EJFZ3pVm3/Y/vdWE62lhzFV0WYqGLEJw2kPxlNMtxx2mjU7YZykIyGKbNUa1Go7FDUX3iAmbSSfofXH/Y3h0Uy+kQ= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1578503757388255.3022380909406; Wed, 8 Jan 2020 09:15:57 -0800 (PST) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1ipEve-0001I4-MH; Wed, 08 Jan 2020 17:15:34 +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 1ipEvd-0001HF-RK for xen-devel@lists.xenproject.org; Wed, 08 Jan 2020 17:15:33 +0000 Received: from mga14.intel.com (unknown [192.55.52.115]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 602c589a-323a-11ea-b85f-12813bfff9fa; Wed, 08 Jan 2020 17:14:49 +0000 (UTC) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Jan 2020 09:14:48 -0800 Received: from tlengyel-mobl2.amr.corp.intel.com (HELO localhost.localdomain) ([10.251.132.23]) by orsmga005.jf.intel.com with ESMTP; 08 Jan 2020 09:14:47 -0800 X-Inumbo-ID: 602c589a-323a-11ea-b85f-12813bfff9fa X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,410,1571727600"; d="scan'208";a="395806170" From: Tamas K Lengyel To: xen-devel@lists.xenproject.org Date: Wed, 8 Jan 2020 09:14:13 -0800 Message-Id: <56311d173a54c545fe33bc621d5f109255371a88.1578503483.git.tamas.lengyel@intel.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 Subject: [Xen-devel] [PATCH v4 16/18] xen/mem_access: Use __get_gfn_type_access in set_mem_access 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: Petre Pircalabu , Tamas K Lengyel , Tamas K Lengyel , Wei Liu , George Dunlap , Andrew Cooper , Jan Beulich , Alexandru Isaila , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Use __get_gfn_type_access instead of p2m->get_entry to trigger page-forking when the mem_access permission is being set on a page that has not yet been copied over from the parent. Signed-off-by: Tamas K Lengyel --- xen/arch/x86/mm/mem_access.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/xen/arch/x86/mm/mem_access.c b/xen/arch/x86/mm/mem_access.c index 320b9fe621..9caf08a5b2 100644 --- a/xen/arch/x86/mm/mem_access.c +++ b/xen/arch/x86/mm/mem_access.c @@ -303,11 +303,10 @@ static int set_mem_access(struct domain *d, struct p2= m_domain *p2m, ASSERT(!ap2m); #endif { - mfn_t mfn; p2m_access_t _a; p2m_type_t t; - - mfn =3D p2m->get_entry(p2m, gfn, &t, &_a, 0, NULL, NULL); + mfn_t mfn =3D __get_gfn_type_access(p2m, gfn_x(gfn), &t, &_a, + P2M_ALLOC, NULL, false); rc =3D p2m->set_entry(p2m, gfn, mfn, PAGE_ORDER_4K, t, a, -1); } =20 --=20 2.20.1 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel