Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp398219lql; Mon, 11 Mar 2024 06:16:41 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWFNxVmOhqE6Al5Gbg9/l5dHPBtlCF2+kgWRAVDsNqB2ZF7SgdPnfN2/YvSTkK/o6XntMcAWrxp0hAtVCnlRn/Jr4IZvG6A9znJzC+ehA== X-Google-Smtp-Source: AGHT+IH3etu5O1lUhrBGSHDIwmjSM3u4at3rk27cPHuzMaLtv0kEhwRBkiejnuDJIH6t6troFXzs X-Received: by 2002:a67:fe96:0:b0:472:9cd5:3308 with SMTP id b22-20020a67fe96000000b004729cd53308mr4781121vsr.10.1710163001099; Mon, 11 Mar 2024 06:16:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710163001; cv=pass; d=google.com; s=arc-20160816; b=FHP16mJtBfMDZc2TPSSA89R3qcR9ohXaZEDnBYJm/CpxacvgMxXE5UT+gr6oKy3B64 c9fFJf0bD+Iecl+7pEJtDp8vELGKi97w275oYrKUKta4U34W1iGX4WwcuytMNWpa4CGG jYA4OFqadPYqzzuz1E6Oq1BE/PSqvMBB/ssLiV4+zAzhnynBnpAnWNS3CAYlQrqYThyN fH9XJDzZ72f/XbMMFR76tOYlQU1GrThHU79oCJdygZMktQhBV++4zkbbnBNIQkx4npxI XR1FsvZFZ3FUg//qLyQraGgvUcQvQ0i2+ALAQWJJ073TJbQBaS2KRkD0vEM1BaztpvBA A2GA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=Sw4tENrKm2Q6sGgH1kKiwJ8p2ROgVDUkRiPZUykVBHw=; fh=a+5Bmcw+9NfRrbyU8NtlD8WqDNJy+WVNOX5AiVTQZKQ=; b=sQtWXR+gO9rKZYukYyLGcyxTkWgWxivnBLGQLfXBtGZEdWBUy8hfoo+tZwMb6z8H4N +iPhRt/ZLPoWZwWxKaP9gpzITAhPVFI2qA35VMuHwVsi3qOQqq6aLSAU6rpoU9fBuFjm VknwNDkOvyEgWkOlzuSZDs9TJGuGgIQaqDdV7iNYvuA6KRjLeiSKPQxyy3QAwSQm1Sat bgFnRAhbyDwSAye8kxDSJs0o9BYBm6LQSTLVb0fF65kVtirnWqbDHCmnCuvORrmAXYQE btbT9Q0RfwNexxZF701tCKL9oE5ot9ZnaM7Q7mwxD4OQHeQG2SCwZXBzVcL72aXyR6RJ ONAg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.com header.s=google header.b=McIIT54j; arc=pass (i=1 spf=pass spfdomain=suse.com dkim=pass dkdomain=suse.com dmarc=pass fromdomain=suse.com); spf=pass (google.com: domain of linux-kernel+bounces-98858-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-98858-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id s15-20020a67ce0f000000b00470492e1a14si437397vsl.96.2024.03.11.06.16.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Mar 2024 06:16:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-98858-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=pass header.i=@suse.com header.s=google header.b=McIIT54j; arc=pass (i=1 spf=pass spfdomain=suse.com dkim=pass dkdomain=suse.com dmarc=pass fromdomain=suse.com); spf=pass (google.com: domain of linux-kernel+bounces-98858-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-98858-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com 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 AF9AC1C2145D for ; Mon, 11 Mar 2024 13:16:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1C3753D3B8; Mon, 11 Mar 2024 13:16:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="McIIT54j" Received: from mail-lj1-f180.google.com (mail-lj1-f180.google.com [209.85.208.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CAEB83CF7E for ; Mon, 11 Mar 2024 13:16:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.180 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710162975; cv=none; b=bR4asFmliuqS9n4vbeECtlmMLnetuiwL5oShU0zn/MEuNUCKQVEa72CVBGr9ViOfSgfVCMZpAJY6KBzWYXmOf0ePdfJEgdYSE27qhKQR2RbUvvGQbova4fLfYcSFIx0ab/wb7Gist9M8olBg5XOeg2rW+69A/un1/7seRgGAZqU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710162975; c=relaxed/simple; bh=R83UERplwF/KQ5zSe+MgQMSo687FJg2FimupNdkCCUI=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=UBdwUHaYoSWn7T0yQEb0dGCeQ/a2YHl7gbq3WFRQ82VPOufRA+502fBzTe+KNBUrnKKsep22C7g5p5dXl/LKB4Nvdc1I5FsIpZTmmJbrwwHtyu5pLD6td1cmw9K0w1GS3liIP9Iz+hKAt6zQOGX6xZA1EjN9WxxTwJnfTpfX6QU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=McIIT54j; arc=none smtp.client-ip=209.85.208.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Received: by mail-lj1-f180.google.com with SMTP id 38308e7fff4ca-2d109e82bd0so59300621fa.3 for ; Mon, 11 Mar 2024 06:16:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1710162971; x=1710767771; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=Sw4tENrKm2Q6sGgH1kKiwJ8p2ROgVDUkRiPZUykVBHw=; b=McIIT54jWllkjZnN85iFKUWpsBR41/y+Ie+2JWIi5STrJLAy+K2dAOFlUuxnLef0ex mEp+t7fKc9A3j9pDVSQk+fAbRGUdo0oVcVXM+/v/5F1NOc1GTxnXEPrjbpWAgJFvEYrj DQMkrg8S5BUycySGwTVJbGsKxmVW2UUblmQ0VE8sWma7ND2Jsi8LsiViAHN9dhhnveTh voJcbJvQcb++mWqtcBVc98JcheanP6unMjE7QqCk08nA9nUqTIjHLMjKS778hCWImkLy voptMbyPWKpH3+Vla03h0bGmwjRe3Q3cjGEpPt7mMRjg/7e5KInkk1TVHeO4a0ZEpCi5 EQiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710162971; x=1710767771; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Sw4tENrKm2Q6sGgH1kKiwJ8p2ROgVDUkRiPZUykVBHw=; b=m8fQbc2Vm6aSUx5AyilVMgDMlsKD7DoAfPrd/d1wMTQcbdpmkxv9lTHyDcJ3kPv+Wg UkP3clzJdNPxyNAyqO9yRQzH75i7gEnx857uxvFkz8b+Rh6QURlXvKWjXPal81zcacfc 64oXIj4p5VtJGgWGqj/H8WW+73LQGPYglJOcpI54FhaX3fBofkxYSckwku1uiE4XN5qw HLv6++jy8MVdr7zcIZjQV6UwQoufsK8Bk8mrwuTvnBqc85uGu3EeieJOmI9hhS46nx6G V4DQrddIv2vKUgtfFh18xc/IE4gxyVzel99h3Xvg5A4+s/arqaBjKaw2FHMc1DezJXJq mwSA== X-Forwarded-Encrypted: i=1; AJvYcCVTgqlYroud/s8xEcaE8rtdeSwaAeSVd+IrT8wycX/HXoTnjyd23nKb31pTEDFhTXGQ8fIMDCt0/EZM6aEYJP7lHXSOzxmJlgKUpbGJ X-Gm-Message-State: AOJu0YwuEGHfxw7PLrbKbKLF9rE7fVMzkd9f23SbFxSzYtM5pB/GRuyR Lxfinos85Weqrc9yPGJjn91xBxJVNTKjKdWhe5yhAoCHndmsnFiCrPpQdenO72fSEaYGh4gAPC6 h X-Received: by 2002:a2e:aa26:0:b0:2d0:aa06:f496 with SMTP id bf38-20020a2eaa26000000b002d0aa06f496mr3695777ljb.40.1710162971012; Mon, 11 Mar 2024 06:16:11 -0700 (PDT) Received: from ?IPV6:2003:e5:873a:400:704b:6dbb:e7c0:786e? (p200300e5873a0400704b6dbbe7c0786e.dip0.t-ipconnect.de. [2003:e5:873a:400:704b:6dbb:e7c0:786e]) by smtp.gmail.com with ESMTPSA id f5-20020a2ea0c5000000b002d417020a9fsm1133150ljm.83.2024.03.11.06.16.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 11 Mar 2024 06:16:10 -0700 (PDT) Message-ID: <3891dbee-173b-4fb3-a7f5-512dbe8264af@suse.com> Date: Mon, 11 Mar 2024 14:16:09 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [RFC][PATCH 02/34] x86/xen: Remove early "debug" physical address lookups Content-Language: en-US To: Dave Hansen , linux-kernel@vger.kernel.org Cc: kirill.shutemov@linux.intel.com, pbonzini@redhat.com, tglx@linutronix.de, x86@kernel.org, bp@alien8.de References: <20240222183926.517AFCD2@davehans-spike.ostc.intel.com> <20240222183929.E17C1B9C@davehans-spike.ostc.intel.com> From: =?UTF-8?B?SsO8cmdlbiBHcm/Dnw==?= In-Reply-To: <20240222183929.E17C1B9C@davehans-spike.ostc.intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 22.02.24 19:39, Dave Hansen wrote: > From: Dave Hansen > > The __pa() facility is subject to debugging checks if CONFIG_DEBUG_VIRTUAL=y. > One of those debugging checks is whether the physical address is valid > on the platform. That information is normally available via CPUID. But > the __pa() code currently looks it up in 'boot_cpu_data' which is not > fully set up in early Xen PV boot. > > 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. > > Garbage checks are worse than no check at all. Move over to the > "nodebug" variant to axe the checks. > > Signed-off-by: Dave Hansen > Cc: Juergen Gross Reviewed-by: Juergen Gross Juergen