From nobody Tue Nov 11 08:31:26 2025 Delivered-To: importer@patchew.org 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; Authentication-Results: mx.zohomail.com; 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; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1569426663; cv=none; d=zoho.com; s=zohoarc; b=g9nXWMN8wP9/Z9muiw0Jw9M2D8WWcXvxa9gReXGuJtnBEvirJSV5glvE/9VXz8vWFPM1e0I6z/i52UpSYWFVJUfU0lIiA43uSJE2PrONCKGBZFnJNIMETQL3A+H46cz2AlmrY7w3rw7I3wP7rn7W7PeFYVXqWYy1H0dN0Gbxueg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569426663; 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:ARC-Authentication-Results; bh=frOgqk5Aas5aNOGmEJkH6tYFsbqLmh3uped4i9k9kIM=; b=XnP79tZkTcQs9y0erqDeGeuzudslFElY2PU/n9iRWJNvM3xMIHxnhmIPnuh6hxPmaa+ll2kbAlq32eaYaBh6suCh7uU2sKMYrpnEe9XASxFr5wjAQ+yeHQ4l6PtnGTZWKCAX0Wvp8hlimayP8oU0aIxFkmAQaHwqZmCKEyFj5aE= ARC-Authentication-Results: i=1; mx.zoho.com; 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; 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 1569426663895432.6371213393603; Wed, 25 Sep 2019 08:51:03 -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 1iD9Y9-0000zg-CS; Wed, 25 Sep 2019 15:49:53 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iD9Y7-0000yP-NH for xen-devel@lists.xenproject.org; Wed, 25 Sep 2019 15:49:51 +0000 Received: from mga12.intel.com (unknown [192.55.52.136]) by localhost (Halon) with ESMTPS id 11b601b0-dfac-11e9-bf31-bc764e2007e4; Wed, 25 Sep 2019 15:49:33 +0000 (UTC) Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Sep 2019 08:49:31 -0700 Received: from tlengyel-mobl2.amr.corp.intel.com (HELO localhost.localdomain) ([10.252.129.153]) by orsmga006.jf.intel.com with ESMTP; 25 Sep 2019 08:49:30 -0700 X-Inumbo-ID: 11b601b0-dfac-11e9-bf31-bc764e2007e4 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,548,1559545200"; d="scan'208";a="193812652" From: Tamas K Lengyel To: xen-devel@lists.xenproject.org Date: Wed, 25 Sep 2019 08:48:44 -0700 Message-Id: X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 Subject: [Xen-devel] [RFC PATCH for-next 06/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: Tamas K Lengyel , Wei Liu , George Dunlap , Andrew Cooper , Jan Beulich , =?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/include/asm-x86/mem_sharing.h | 8 +++----- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c index d71d2ad5d7..7c255728c2 100644 --- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c @@ -1879,7 +1879,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 714158d2a6..3d27c6c91a 100644 --- a/xen/arch/x86/mm/p2m.c +++ b/xen/arch/x86/mm/p2m.c @@ -510,7 +510,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); } @@ -891,8 +891,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/include/asm-x86/mem_sharing.h b/xen/include/asm-x86/mem_sh= aring.h index 1280830a85..8deb0ceee5 100644 --- a/xen/include/asm-x86/mem_sharing.h +++ b/xen/include/asm-x86/mem_sharing.h @@ -70,10 +70,9 @@ int __mem_sharing_unshare_page(struct domain *d, =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; } @@ -117,8 +116,7 @@ static inline unsigned int mem_sharing_get_nr_shared_mf= ns(void) } =20 static inline -int mem_sharing_unshare_page(struct domain *d, unsigned long gfn, - uint16_t flags) +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