From nobody Mon Feb 9 23:39:01 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1578326123; cv=none; d=zohomail.com; s=zohoarc; b=MakZBjZmh6Zy+eki2lkyfjwQC1tIvsk3vwPuxpclpTuy9fUnM8bClMl6RLiJAm4tfbiZE6MpkimQI99+zW3dsdmJLC3oOCKS25EGcTQ3bXT1c1jOW/fshKTKkWHksRMK8Df/uZxeJCOjrnX0xd60E+OG/J5+4q2Sy0twx7YvdEE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1578326123; 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=2ywbn4qvHgvhLvIvHI6+ENSyzHF07e4dvbIVbslYpuE=; b=D1585TXim+RqVq4vwjn1Nu69zZUj9IR/DGLyzS3Qb0JfPDvwo3BrSFoODaUlLAvNOmat9oqgHGD3MhZjhWbypB/sRe0pIZxcQFC8f8x85GTPoOlU+qdLWr740aABHe24UZ7Svg7QUY0MGfKnyT/LAPlI+lVMbnAl0f8/0JXd6Us= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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 1578326123077102.24880730378675; Mon, 6 Jan 2020 07:55:23 -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 1ioUiD-0003lY-ER; Mon, 06 Jan 2020 15:54:37 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1ioUiC-0003l9-1D for xen-devel@lists.xenproject.org; Mon, 06 Jan 2020 15:54:36 +0000 Received: from esa3.hc3370-68.iphmx.com (unknown [216.71.145.155]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id d1065614-309c-11ea-88e7-bc764e2007e4; Mon, 06 Jan 2020 15:54:27 +0000 (UTC) X-Inumbo-ID: d1065614-309c-11ea-88e7-bc764e2007e4 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1578326068; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=xYfBLpw32z+8phIUb6UyBrgOMhXwXqKmYQ6j0RSoVgo=; b=Q0UyzudmIDlVB3s2laH7j/GhtlfKA4tjdmRC6S7LVFNG2RNVp/K6t0Q1 DvXeFlu387ucESx/ACxc2W+OdROCr/DF0lRAnNK1u5Gg0fMSzE44HXCZb PkQOrJJNuonVPYYMp/UMd6xHF33gwU8Y0lHDyW3KiSGuSp0mWlfkmIwle c=; Authentication-Results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=andrew.cooper3@citrix.com; spf=Pass smtp.mailfrom=Andrew.Cooper3@citrix.com; spf=None smtp.helo=postmaster@mail.citrix.com 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; Received-SPF: None (esa3.hc3370-68.iphmx.com: no sender authenticity information available from domain of andrew.cooper3@citrix.com) identity=pra; client-ip=162.221.158.21; receiver=esa3.hc3370-68.iphmx.com; envelope-from="Andrew.Cooper3@citrix.com"; x-sender="andrew.cooper3@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa3.hc3370-68.iphmx.com: domain of Andrew.Cooper3@citrix.com designates 162.221.158.21 as permitted sender) identity=mailfrom; client-ip=162.221.158.21; receiver=esa3.hc3370-68.iphmx.com; envelope-from="Andrew.Cooper3@citrix.com"; x-sender="Andrew.Cooper3@citrix.com"; x-conformance=sidf_compatible; x-record-type="v=spf1"; x-record-text="v=spf1 ip4:209.167.231.154 ip4:178.63.86.133 ip4:195.66.111.40/30 ip4:85.115.9.32/28 ip4:199.102.83.4 ip4:192.28.146.160 ip4:192.28.146.107 ip4:216.52.6.88 ip4:216.52.6.188 ip4:162.221.158.21 ip4:162.221.156.83 ip4:168.245.78.127 ~all" Received-SPF: None (esa3.hc3370-68.iphmx.com: no sender authenticity information available from domain of postmaster@mail.citrix.com) identity=helo; client-ip=162.221.158.21; receiver=esa3.hc3370-68.iphmx.com; envelope-from="Andrew.Cooper3@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: FImzxF74mPcHwTMwNZa34I5ddaRUqEQucfT6klwWMuC6SakfRmfe+1Uw1QKy8i/dCyEGusjF5X NKPKL+z6cMO10wejkZ06vcb7tjtV03ZB98WLdm/ueEZBI6BloVxJSVKv2z0WAxvEVYO5Xur5cc fUtmEXAr+PRH1WD/dWkzsE4fRsbg9avUdfeElllvgzBjmQdwI5DvHh6rY7PP3hi05eMbeFqYAm YtMGULcksm4o1lkPg1q5d/NU05mcL4/mmv7qt/DtfYtTzaI96G+6OBe6dqVTC7R3p5ifCklH01 u3o= X-SBRS: 2.7 X-MesageID: 10489150 X-Ironport-Server: esa3.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.69,403,1571716800"; d="scan'208";a="10489150" From: Andrew Cooper To: Xen-devel Date: Mon, 6 Jan 2020 15:54:18 +0000 Message-ID: <20200106155423.9508-2-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20200106155423.9508-1-andrew.cooper3@citrix.com> References: <20200106155423.9508-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [PATCH 1/6] x86/boot: Check for E820_RAM earlier when searching the E820 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: Andrew Cooper , Wei Liu , 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" X-ZohoMail-DKIM: fail (Header signature does not verify) There is no point performing the masking calculations if we are going to throw the result away. No functional change. Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich --- CC: Jan Beulich CC: Wei Liu CC: Roger Pau Monn=C3=A9 --- xen/arch/x86/setup.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c index 501f3f5e4b..ed54f79fea 100644 --- a/xen/arch/x86/setup.c +++ b/xen/arch/x86/setup.c @@ -1033,11 +1033,14 @@ void __init noreturn __start_xen(unsigned long mbi_= p) uint64_t s, e, mask =3D (1UL << L2_PAGETABLE_SHIFT) - 1; uint64_t end, limit =3D ARRAY_SIZE(l2_identmap) << L2_PAGETABLE_SH= IFT; =20 + if ( boot_e820.map[i].type !=3D E820_RAM ) + continue; + /* Superpage-aligned chunks from BOOTSTRAP_MAP_BASE. */ s =3D (boot_e820.map[i].addr + mask) & ~mask; e =3D (boot_e820.map[i].addr + boot_e820.map[i].size) & ~mask; s =3D max_t(uint64_t, s, BOOTSTRAP_MAP_BASE); - if ( (boot_e820.map[i].type !=3D E820_RAM) || (s >=3D e) ) + if ( s >=3D e ) continue; =20 if ( s < limit ) @@ -1286,11 +1289,14 @@ void __init noreturn __start_xen(unsigned long mbi_= p) uint64_t s, e, mask =3D PAGE_SIZE - 1; uint64_t map_s, map_e; =20 + if ( boot_e820.map[i].type !=3D E820_RAM ) + continue; + /* Only page alignment required now. */ s =3D (boot_e820.map[i].addr + mask) & ~mask; e =3D (boot_e820.map[i].addr + boot_e820.map[i].size) & ~mask; s =3D max_t(uint64_t, s, 1<<20); - if ( (boot_e820.map[i].type !=3D E820_RAM) || (s >=3D e) ) + if ( s >=3D e ) continue; =20 if ( !acpi_boot_table_init_done && --=20 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel