From nobody Mon Feb 9 09:00:18 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=1579629092; cv=none; d=zohomail.com; s=zohoarc; b=gh4HrkguAl5kXLpJAjf0+0RitPJxEyu7dxsxifmXKpO77uJpxRGowd7YLUS61nuWHXaaOhfNlOD4qhzOf7eYvuA/v7aYcMVGt0Kk0M+bm4R1lJ5PV7U4uWNK5dfHwF0AYmpPjb2BZ3dGb18RfdPU/7wZdEgPpVfPL/lryeufcFI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1579629092; 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=20PYHGifHRZp+m70RNof9ubirPFWKhBVBofifcUpbEk=; b=iG2exoKlhS6/t/EhP97+8TLYFARFkcv8Cl178g69JVGsNlKu9mwGF6ac7u3+7BQHB5sD9Mn7Dy27qk0jqcVzTapxlCCKg15NTNa9lfo6hzwpsuuYJx9X/fuWV6CCgthAGQ4bK5r3qq0+FO0hAmYeKCfLh4hqa5yJJyoS+/DMJ2A= 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 1579629092446544.8393406109933; Tue, 21 Jan 2020 09:51:32 -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 1itxg8-0005Gl-KJ; Tue, 21 Jan 2020 17:51:04 +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 1itxg7-0005Fg-CB for xen-devel@lists.xenproject.org; Tue, 21 Jan 2020 17:51:03 +0000 Received: from mga04.intel.com (unknown [192.55.52.120]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 7bdf470b-3c76-11ea-bb21-12813bfff9fa; Tue, 21 Jan 2020 17:50:18 +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:07 -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:06 -0800 X-Inumbo-ID: 7bdf470b-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="228929225" From: Tamas K Lengyel To: xen-devel@lists.xenproject.org Date: Tue, 21 Jan 2020 09:49:46 -0800 Message-Id: <9ad4a109504c951a2da7e74021f9ccbc37edbda9.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 13/18] x86/mem_sharing: Skip xen heap pages in memshr nominate 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 , Tamas K Lengyel , Wei Liu , George Dunlap , Andrew Cooper , =?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" Trying to share these would fail anyway, better to skip them early. Signed-off-by: Tamas K Lengyel Reviewed-by: Jan Beulich --- xen/arch/x86/mm/mem_sharing.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/mm/mem_sharing.c b/xen/arch/x86/mm/mem_sharing.c index 172f02e780..eac8047c07 100644 --- a/xen/arch/x86/mm/mem_sharing.c +++ b/xen/arch/x86/mm/mem_sharing.c @@ -840,6 +840,11 @@ static int nominate_page(struct domain *d, gfn_t gfn, if ( !p2m_is_sharable(p2mt) ) goto out; =20 + /* Skip xen heap pages */ + page =3D mfn_to_page(mfn); + if ( !page || is_xen_heap_page(page) ) + goto out; + /* Check if there are mem_access/remapped altp2m entries for this page= */ if ( altp2m_active(d) ) { @@ -870,7 +875,6 @@ static int nominate_page(struct domain *d, gfn_t gfn, } =20 /* Try to convert the mfn to the sharable type */ - page =3D mfn_to_page(mfn); ret =3D page_make_sharable(d, page, expected_refcnt); if ( ret ) goto out; --=20 2.20.1 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel