From nobody Mon Feb 9 12:29:08 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=1579629063; cv=none; d=zohomail.com; s=zohoarc; b=MyWuzcvCNGIlg6owIiSzJLXdpB8F6iqk6CuqdWkKoC+YtHVIHbxyZaN/DXuSWVc42MXOqXDUxL2M0cNNw9Rhh9XqnjHzi0LsoZ3DeipI1XBGUovTCfH2c90bdaT4r6cAvT2Bq7PbhR7z3xRgz1JaLQdHCAip7eWc6iUtn4tf7V4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1579629063; 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=6mxys18yd4X2KQe69QGFXiILjkV0RBtmnn69KC8rfdQ=; b=UH5mkAhaa1TsRCrm04da1wqfS4PA8hnlo85lHwW4/G7dVDgPbfNw3ULc57KMiDevFgO7pTk5C5XxwM5Ggt8kBF8eMIJBX6pMzZjcE2zOllnG4WnpDLUFo7HYDsMkFKPNtLt06P5M2dx7owFicD+Zs+W1uFyg2kN30/ZZS1yphe0= 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 1579629063398330.40074224714976; Tue, 21 Jan 2020 09:51:03 -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 1itxfU-0004hG-LG; Tue, 21 Jan 2020 17:50:24 +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 1itxfT-0004gL-Ao for xen-devel@lists.xenproject.org; Tue, 21 Jan 2020 17:50:23 +0000 Received: from mga04.intel.com (unknown [192.55.52.120]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 74ea095a-3c76-11ea-bb21-12813bfff9fa; Tue, 21 Jan 2020 17:50:07 +0000 (UTC) Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Jan 2020 09:50:02 -0800 Received: from tlengyel-mobl2.amr.corp.intel.com (HELO localhost.localdomain) ([10.251.23.127]) by orsmga006.jf.intel.com with ESMTP; 21 Jan 2020 09:50:01 -0800 X-Inumbo-ID: 74ea095a-3c76-11ea-bb21-12813bfff9fa X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,346,1574150400"; d="scan'208";a="228929150" From: Tamas K Lengyel To: xen-devel@lists.xenproject.org Date: Tue, 21 Jan 2020 09:49:38 -0800 Message-Id: <841623e5c8bb2f88c3eb5329f2898c081d831e94.1579628566.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 v5 05/18] x86/mem_sharing: drop flags from mem_sharing_unshare_page 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: Stefano Stabellini , Tamas K Lengyel , Wei Liu , Konrad Rzeszutek Wilk , George Dunlap , Andrew Cooper , Ian Jackson , Julien Grall , =?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" All callers pass 0 in. Signed-off-by: Tamas K Lengyel Reviewed-by: Wei Liu Acked-by: George Dunlap --- xen/arch/x86/hvm/hvm.c | 2 +- xen/arch/x86/mm/p2m.c | 5 ++--- xen/common/memory.c | 2 +- xen/include/asm-x86/mem_sharing.h | 8 +++----- 4 files changed, 7 insertions(+), 10 deletions(-) diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c index 651998e783..55bf7353c9 100644 --- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c @@ -1898,7 +1898,7 @@ int hvm_hap_nested_page_fault(paddr_t gpa, unsigned l= ong gla, if ( npfec.write_access && (p2mt =3D=3D p2m_ram_shared) ) { ASSERT(p2m_is_hostp2m(p2m)); - sharing_enomem =3D mem_sharing_unshare_page(currd, gfn, 0); + sharing_enomem =3D mem_sharing_unshare_page(currd, gfn); rc =3D 1; goto out_put_gfn; } diff --git a/xen/arch/x86/mm/p2m.c b/xen/arch/x86/mm/p2m.c index fdeb742707..43dd46a32f 100644 --- a/xen/arch/x86/mm/p2m.c +++ b/xen/arch/x86/mm/p2m.c @@ -515,7 +515,7 @@ mfn_t __get_gfn_type_access(struct p2m_domain *p2m, uns= igned long gfn_l, * Try to unshare. If we fail, communicate ENOMEM without * sleeping. */ - if ( mem_sharing_unshare_page(p2m->domain, gfn_l, 0) < 0 ) + if ( mem_sharing_unshare_page(p2m->domain, gfn_l) < 0 ) mem_sharing_notify_enomem(p2m->domain, gfn_l, false); mfn =3D p2m->get_entry(p2m, gfn, t, a, q, page_order, NULL); } @@ -899,8 +899,7 @@ guest_physmap_add_entry(struct domain *d, gfn_t gfn, mf= n_t mfn, { /* Do an unshare to cleanly take care of all corner cases. */ int rc; - rc =3D mem_sharing_unshare_page(p2m->domain, - gfn_x(gfn_add(gfn, i)), 0); + rc =3D mem_sharing_unshare_page(p2m->domain, gfn_x(gfn_add(gfn= , i))); if ( rc ) { p2m_unlock(p2m); diff --git a/xen/common/memory.c b/xen/common/memory.c index 309e872edf..c7d2bac452 100644 --- a/xen/common/memory.c +++ b/xen/common/memory.c @@ -352,7 +352,7 @@ int guest_remove_page(struct domain *d, unsigned long g= mfn) * might be the only one using this shared page, and we need to * trigger proper cleanup. Once done, this is like any other page. */ - rc =3D mem_sharing_unshare_page(d, gmfn, 0); + rc =3D mem_sharing_unshare_page(d, gmfn); if ( rc ) { mem_sharing_notify_enomem(d, gmfn, false); diff --git a/xen/include/asm-x86/mem_sharing.h b/xen/include/asm-x86/mem_sh= aring.h index af2a1038b5..cf7848709f 100644 --- a/xen/include/asm-x86/mem_sharing.h +++ b/xen/include/asm-x86/mem_sharing.h @@ -69,10 +69,9 @@ int __mem_sharing_unshare_page(struct domain *d, uint16_t flags); =20 static inline int mem_sharing_unshare_page(struct domain *d, - unsigned long gfn, - uint16_t flags) + unsigned long gfn) { - int rc =3D __mem_sharing_unshare_page(d, gfn, flags); + int rc =3D __mem_sharing_unshare_page(d, gfn, 0); BUG_ON(rc && (rc !=3D -ENOMEM)); return rc; } @@ -115,8 +114,7 @@ static inline unsigned int mem_sharing_get_nr_shared_mf= ns(void) return 0; } =20 -static inline int mem_sharing_unshare_page(struct domain *d, unsigned long= gfn, - uint16_t flags) +static inline int mem_sharing_unshare_page(struct domain *d, unsigned long= gfn) { ASSERT_UNREACHABLE(); return -EOPNOTSUPP; --=20 2.20.1 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel