Received: by 2002:ab2:3319:0:b0:1ef:7a0f:c32d with SMTP id i25csp15590lqc; Thu, 7 Mar 2024 09:02:24 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXLXNiN79jB209dqnrIMQQnzzOibWncjAEx9KXTPyteqSxY1ETzYuidRcaAlyThcCrlo8mLaZZc2GhGE3lDMreD7MChAliGDoc60X+Bzg== X-Google-Smtp-Source: AGHT+IGiBNon+piWpFJ6MaqgrsYfsJqpj4RaHRw9vH/2TCEOHRWJeb6B3h7AW6UQY8stBwvts9Gp X-Received: by 2002:a05:6122:4883:b0:4d3:3a0f:77ce with SMTP id eg3-20020a056122488300b004d33a0f77cemr10777496vkb.13.1709830943857; Thu, 07 Mar 2024 09:02:23 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709830943; cv=pass; d=google.com; s=arc-20160816; b=OXQdn9ZpvmdLfMFFGKwlXUx8XqIB1VkKlJ5Qj0Ejxa6SdMNjI576vRcvGryTPAmCHv kQb3KO6H2hrBfDiePFy1lVAnjO0g/ruJQadCS6y7DOI57P1avgRUxMgLgPxrjzQdcIUE +3W86E7HCU7h8cIHVFLitmm2qIKA51dC5a9Mn30W3ukmaOtarkrDtQUZMNhJgN0Ej1HL gzy+88GxyVxeU22+OQ77sg4tUo3WLBNE8aB3fswSnOTVW2UFwaZmaQ6V1aEHzm8aFEs9 sfIWqiTIT7IhHTw1A5chjxr7I8i3Yj12zfzYmJfAy70dked3lbGWKyXcidEBnN5hISuY IhQg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=5wXzDKMApxnZcJ40jnl5QMyiCmPvReMX/mfwR9XFXR8=; fh=A/Pd+REAxRzPyK7upbJL9wYTIhEo2jkjfBjv0bgN38g=; b=I6YoKvgzwZAX/Dzlpu7um+0vyb8Y2FO0aLo4PxaWEtBioo+HUTN6lb5Eb0Ltb1iabx G8xy9XeS7wnOC/WbrCuDK8jexVnkJe8plVM/HxWIkyJyojvEd9Me2D6Ka4aSUtFNnKUP BU9zDLDjR1qL9HhKJ8YBjpBJzxQ29PduFbtjO+BAPsVzlRtUArIFfR4dKmL7pH50HsKy 3fCWu1s0rvIFs+OVg2/OGnC8yCK5joI5k4c5H4Yz/nW3LwDH5rGPGRq0twUSvVNmfJcl Dkl4ZgsLfdm9lzGi9s7jgPJ2HTnKghuKjVbdrrHgCJ2RwQ/D72m6fJ/D+Ade0sH7EIzz ncog==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=neutral (body hash did not verify) header.i=@alien8.de header.s=alien8 header.b=dYjZKRY7; arc=pass (i=1 spf=pass spfdomain=alien8.de dmarc=pass fromdomain=alien8.de); spf=pass (google.com: domain of linux-kernel+bounces-95904-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-95904-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id j26-20020a67e3ba000000b0046d176c3469si2436794vsm.190.2024.03.07.09.02.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Mar 2024 09:02:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-95904-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@alien8.de header.s=alien8 header.b=dYjZKRY7; arc=pass (i=1 spf=pass spfdomain=alien8.de dmarc=pass fromdomain=alien8.de); spf=pass (google.com: domain of linux-kernel+bounces-95904-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-95904-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 425951C21BCD for ; Thu, 7 Mar 2024 17:02:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D1FF812FF86; Thu, 7 Mar 2024 17:02:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (4096-bit key) header.d=alien8.de header.i=@alien8.de header.b="dYjZKRY7" Received: from mail.alien8.de (mail.alien8.de [65.109.113.108]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2ED6012F5BD for ; Thu, 7 Mar 2024 17:01:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=65.109.113.108 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709830921; cv=none; b=XR3HOomWpMxtvXS3NHFz/77jmTALQHwmzfVdTyRPlcq4u3PZlHjLp10pC9rnkIGL//muIzzfnskd9Z4xPulQ/Z0yYBAemJWg9kJ+FojH6S5wJsmOjwLuXiCpmKzBYU3ex6WJpEMh81CtVwAaoSCOARKbc2sCP+ltER9+u45ysF0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709830921; c=relaxed/simple; bh=LcsZDBu7i8TVvjRoGXdUobeGBAVQrIzFxf86yfSzBc4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=j8SgiVB1IvYpSKS5gOJtxTWBUAr7aloM+/PaKWUNp0In8ZfbEtZ+wMN+BZs5fXDEyzqb7AIKD6ROq8ohnSSZ4nJe5qV+rdPMPlemMjgR3se7f7r6aT9Ffq3uPXFM7CgM3dKzPP/6fObtsvPZp9hnQPIjOE2cbndpJyBNf6K/fJE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=alien8.de; spf=pass smtp.mailfrom=alien8.de; dkim=fail (4096-bit key) header.d=alien8.de header.i=@alien8.de header.b=dYjZKRY7 reason="signature verification failed"; arc=none smtp.client-ip=65.109.113.108 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=alien8.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=alien8.de Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.alien8.de (SuperMail on ZX Spectrum 128k) with ESMTP id C884B40E0174; Thu, 7 Mar 2024 17:01:56 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at mail.alien8.de Authentication-Results: mail.alien8.de (amavisd-new); dkim=fail (4096-bit key) reason="fail (body has been altered)" header.d=alien8.de Received: from mail.alien8.de ([127.0.0.1]) by localhost (mail.alien8.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id sUH3ZcikQumX; Thu, 7 Mar 2024 17:01:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=alien8; t=1709830911; bh=rpz68PYxMPxwlMiTEm8jQzSPUwIp/GcI3wa+Esza15o=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=dYjZKRY7RJ+9sZOEw+jKlpVOkuO4sJPL8j2Z6kOW/U8616VjsYv7oaQu4OlvbGJIs LFPV9bGlu3KP7y96BLG8MQuJ1ghL7kokYy99hXzY6RlKAlU3HCfyYKwuLDo8t/8TN+ NcRZArbF6sH3a3sLhdL8K1n9KBxFfWb2P1rqn1J8ZR+y27fzwA6BUR0heoVvJlrFhP 5pTkBLCtDgRxlEIeGS2CfEdlV4uphn2Widj2P/sVZvtBjJmKAr2l3xgT2n9Fx2ER0o 3mMTU2GIQXjlYeAKCAtKyvuetpkwD8e2ZA70QZsp5ojSwE2LkmP1Gnf+DlIDm1n8sT /eijqhYKGQsyfmA1Vs8aBV3pX16vLnBO53wtON2Fg6wd4dY5y81/og1pcCLZQzEXGq DWst80PzQ3SXul/V0hrNUaFT2VPen89H/A2cNciktw+Eq9T54o9GAcvHCYlwVKoJ4P QPKH4+0zlnrD6XirLo2nOazzKd6/ubSOO9UJyDrRMISaQq2hjgYOfo4BmBecTQnBAk AiTXDEyziuTasvWtfXJD7NRi72/Z+bK/Awi+eyD4vgiIvh1/lt3j1WYdp/K7yZQSU9 X437tMlDa1jLIvC/IANpDfyP8nF8pA8xyEQgbEZ9xj5T9MCGgs4dKZuX8gVQwXmh0O xjDj6JXmO1C4HbGoBAAAKYWY= Received: from zn.tnic (pd953021b.dip0.t-ipconnect.de [217.83.2.27]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by mail.alien8.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id C32E040E0173; Thu, 7 Mar 2024 17:01:44 +0000 (UTC) Date: Thu, 7 Mar 2024 18:01:39 +0100 From: Borislav Petkov To: Dave Hansen Cc: linux-kernel@vger.kernel.org, kirill.shutemov@linux.intel.com, pbonzini@redhat.com, tglx@linutronix.de, x86@kernel.org, jgross@suse.com Subject: Re: [RFC][PATCH 02/34] x86/xen: Remove early "debug" physical address lookups Message-ID: <20240307170139.GBZeny84YTkJA75V9V@fat_crate.local> References: <20240222183926.517AFCD2@davehans-spike.ostc.intel.com> <20240222183929.E17C1B9C@davehans-spike.ostc.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20240222183929.E17C1B9C@davehans-spike.ostc.intel.com> Content-Transfer-Encoding: quoted-printable On Thu, Feb 22, 2024 at 10:39:29AM -0800, Dave Hansen wrote: >=20 > From: Dave Hansen >=20 > The __pa() facility is subject to debugging checks if CONFIG_DEBUG_VIRT= UAL=3Dy. > One of those debugging checks is whether the physical address is valid > on the platform. That information is normally available via CPUID. Bu= t > the __pa() code currently looks it up in 'boot_cpu_data' which is not > fully set up in early Xen PV boot. >=20 > The Xen PV code currently tries to get this info with > get_cpu_address_sizes() which also depends on 'boot_cpu_data' to be at > least somewhat set up. The result is that the c->x86_phys_bits gets a > sane value, but not one that has anything to do with the hardware. In > other words, the CONFIG_DEBUG_VIRTUAL checks are performed with what > amounts to garbage inputs. >=20 > Garbage checks are worse than no check at all. Move over to the > "nodebug" variant to axe the checks. >=20 > Signed-off-by: Dave Hansen > Cc: Juergen Gross > --- >=20 > b/arch/x86/xen/enlighten_pv.c | 2 +- > b/arch/x86/xen/mmu_pv.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Borislav Petkov (AMD) At least as far as I can follow the Xen boot flow, yap, this makes sense. But let's have J=C3=BCrgen confirm first. Thx. --=20 Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette