From nobody Mon Feb 9 09:00:33 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=1578503718; cv=none; d=zohomail.com; s=zohoarc; b=Y2N1niER1MYApyggZdQ9gjma5Cu11rm8glkyirJkD7m9vLr9Pa22kxg1781QHR2fERpxrgLcWlfcHZhH+cUanIliYOuOIutUr57CtOqJSCSEeQvWv2pm7pQ1/DvI2iGAwQ2Vd9XFytMvMz7cBYOhw9r9GGqZ7FMU1pnwGtC+kjw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1578503718; 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=SkYurhwVBTXv4rZknEA1HqJde5ntnfWNgzyLiAE+rzs=; b=nMFjzcuw+tgy5KVCGayG5xfwU45SitW2syJzjv+Ge9QdR3cFw2eb3pyuJg342uvhN/MAW1jrUPHEVj2mOJVxXjwlNhaASt41AAxvuu2VJIISTpmV5wQZ4quBuig7XNwyaq1oU3hcQ36DBt4gPVk0F1DVOAkUI9b7ubsj22FoBRM= 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 1578503718352147.7757132441136; Wed, 8 Jan 2020 09:15:18 -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 1ipEuk-0000T9-Vs; Wed, 08 Jan 2020 17:14:38 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1ipEuj-0000Sw-JJ for xen-devel@lists.xenproject.org; Wed, 08 Jan 2020 17:14:37 +0000 Received: from mga14.intel.com (unknown [192.55.52.115]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 580c60b0-323a-11ea-8599-bc764e2007e4; Wed, 08 Jan 2020 17:14:36 +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:35 -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:33 -0800 X-Inumbo-ID: 580c60b0-323a-11ea-8599-bc764e2007e4 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="395806082" From: Tamas K Lengyel To: xen-devel@lists.xenproject.org Date: Wed, 8 Jan 2020 09:14:01 -0800 Message-Id: X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 Subject: [Xen-devel] [PATCH v4 04/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 , Jan Beulich , 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 --- 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 24f08d7043..38e9006c92 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 3119269073..baea632acc 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); } @@ -896,8 +896,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