Received: by 2002:ab2:3319:0:b0:1ef:7a0f:c32d with SMTP id i25csp470661lqc; Fri, 8 Mar 2024 03:03:10 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVVCSEwklhzPbVFcscRxrng5CZI94cHPenDHPODOwI4CwQvu217K61dBvoSqXfu7u+VxrUrSFML5XWMN+7/EYDlh2ZspE64ETHxNU1cZg== X-Google-Smtp-Source: AGHT+IFjxnw/dzvwfxvkeAh2Ws8S/IArLyO6ig32UwePxzJNn14alOvlaoGEkhiF2NaF+B4OkhIb X-Received: by 2002:a05:622a:10f:b0:42e:f574:62c7 with SMTP id u15-20020a05622a010f00b0042ef57462c7mr5607811qtw.24.1709895790515; Fri, 08 Mar 2024 03:03:10 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709895790; cv=pass; d=google.com; s=arc-20160816; b=gBXwmFQa5lXLRzpDLcQoW2w5UDD+WBIuQrMdtXYVOdHmBROuqjMzso4rlCO0wVcDLs Ex7FJ0Oj4/oMfLWc1mp2E15Dx5mIf/rXC3MZfH/T4nejPscFoJoRqbzfRhyMk5fKi5ER 5LZH8Gr94VABglSy4JKLEMFeVnK7LuZiPLHcnw96M5eMf0sjPNoSgUQFxVEAYxY+5A9k WEzkFUavJrIL2xpqirf/qv3inB+9PkthNVsqksYjiVa4Kz97SxZaPnO58dwYNRSIvi8L HL4W+z3oTS0Z5cVZaHKx4P/uO/NKNxK2mKKc4taUUyn2mTxkITT5/9x5gFE63crycbNt EyGw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=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=NVFJ/6oWHZdVHQAZ5JD2IT894wi7c6NAiBJiCcucup4=; fh=3XKS6Qiqt703HdjcTiDC0JhR8aIB4m3X6ohNdnLVI2w=; b=BH1yM1W9MyACQOJcPMyjtontcoTLb1VAkw2Vzg/KUoZLk3S5q4iZtpyXCi1dWIGw0b ZNNSwD60eFJU++9I4Y9ujz6AV2qq3/40l86yPQCzu9xS2j3X+oWtgMPgpXHWGW4Bvck2 EF2ck1b6FWeu5+qtZbdSwQWfpBMVZNc8DvqjY//RK9snjmFZFZ4zmI7XCglaaioG78v5 PclUEUufLN/XfGkaPr0aY37o29oJg1sn8k//rLqq1Yl3gwFJL0DdD4DsCm03vocN16aL NTkOTMPTWLMOOJ4+6nScc87ihAbFOO8p8LBBtV3/OzCwOV3FgsRjDXyQtaubvZlvHyZP VgcA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@alien8.de header.s=alien8 header.b=fZWgaYjZ; arc=pass (i=1 spf=pass spfdomain=alien8.de dkim=pass dkdomain=alien8.de dmarc=pass fromdomain=alien8.de); spf=pass (google.com: domain of linux-kernel+bounces-96894-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-96894-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id bp16-20020a05622a1b9000b0042f103dfee3si5211760qtb.88.2024.03.08.03.03.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Mar 2024 03:03:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-96894-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=alien8 header.b=fZWgaYjZ; arc=pass (i=1 spf=pass spfdomain=alien8.de dkim=pass dkdomain=alien8.de dmarc=pass fromdomain=alien8.de); spf=pass (google.com: domain of linux-kernel+bounces-96894-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-96894-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (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 2CFAA1C20A78 for ; Fri, 8 Mar 2024 11:03:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5928D55C28; Fri, 8 Mar 2024 11:01:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (4096-bit key) header.d=alien8.de header.i=@alien8.de header.b="fZWgaYjZ" 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 AD76C2CCB3 for ; Fri, 8 Mar 2024 11:01:18 +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=1709895681; cv=none; b=lic3mddGDUeHJFaXxh8JLYa+VnWmN9utErYqiYdchrgg8PxqvINc8JholK2kQ43VSKyQNToezB/vNMlNU8sPS0S6R8Uco9qBrNy7CSFEN7Ae5VU7SiIH8uXsO6EN2UbCCxJV3OmQ7KE6lwa71Dg/trRg6aIYUJbGCQRVHfIdN6U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709895681; c=relaxed/simple; bh=uHV1gGkgr6Tmt56AjXTymwnJiCemKOzJZhmAXfR2VYU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ufxhjavpR28mbqT+cn8+t0c7o1g+W+xj2ac+oQ+8diBbph4u7GaKRdV2a7O6u8KaGXBf2e18Rg3xm/afwbj/lbyGY/V2RoxwmwQOF181EywiaQAKgQL7sSx3D75+lT5ErPwIY/Ktd8Yt61dLcZ+BOTj5a1hYYcxoThzWZfBefdw= 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=pass (4096-bit key) header.d=alien8.de header.i=@alien8.de header.b=fZWgaYjZ; 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 144D940E0173; Fri, 8 Mar 2024 11:01:16 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at mail.alien8.de Authentication-Results: mail.alien8.de (amavisd-new); dkim=pass (4096-bit key) 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 zj6u7WGxYIDy; Fri, 8 Mar 2024 11:01:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=alien8; t=1709895674; bh=NVFJ/6oWHZdVHQAZ5JD2IT894wi7c6NAiBJiCcucup4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=fZWgaYjZPrf5m6zPSbVcy0iC/3EfnIGhQrPB2OBkoJLszCSlql6LX72MbByBHWneT lJFMnLB/LfoIuIuiI6NTC52pFHxiUgEplXowi2GNt2VRN/fDuaUWNVsdNeqk8ibAPJ e+YQ2/Vmj88WNNR2GxUc4SvCsslMqQAefhFjnKXqh75nmBSU1w6zrImk9ZsL67CSJT ZEcDx5bICTwUbmgie/O604hZZNMFB8IQN9aCQJ37Q8iDqDc5LbGjVhRCmZpGKEtX6t d2h9IytAbgB7rj0uV8pUFvlOCUyo4FilBVYWuVw+2b6AQB/xA4OXraLBn8wEzvGTRL ++oYja268Tb9H9mvW8bVOV8+05SwDM1NsJQmY0msiGjIitPEdMlZUXK641qSuIokG/ 2C8iIsFPhriqYxK4Tg1FGdujoUlfK2KtQuuI15ePOF6NYrBo/+MkSdgE7aQblMpi+Y ZCPmVc0IjFXgPkcUjkKgXj5x2Fh9wDI2jOIbbxX/WWSJxWLz4bMlv3fQBzCY7XPNRX 7gItvuB5lok/fNcGC8s4O99RdKTJejZsaZUOmzVf2UhHf9OVv3jJAMJ1ojbdwSA89+ quguGO0xamnBK7yZeHo1pekKH1euOd4pPN4bIl9abnzof9W8FuIrqBJv8aGlo0wEUR 40leEO+ooWzpbwN8XrDjxrzY= 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 A5FBF40E01B5; Fri, 8 Mar 2024 11:00:48 +0000 (UTC) Date: Fri, 8 Mar 2024 12:00:43 +0100 From: Borislav Petkov To: Ard Biesheuvel Cc: Kevin Loughlin , acdunlap@google.com, alexander.shishkin@linux.intel.com, andrisaar@google.com, bhe@redhat.com, brijesh.singh@amd.com, dave.hansen@linux.intel.com, dionnaglaze@google.com, grobler@google.com, hpa@zytor.com, jacobhxu@google.com, jpoimboe@kernel.org, kai.huang@intel.com, linux-kernel@vger.kernel.org, michael.roth@amd.com, mingo@redhat.com, peterz@infradead.org, pgonda@google.com, ross.lagerwall@citrix.com, sidtelang@google.com, tglx@linutronix.de, thomas.lendacky@amd.com, x86@kernel.org, ytcoode@gmail.com Subject: Re: [PATCH v2] x86/kernel: skip ROM range scans and validation for SEV-SNP guests Message-ID: <20240308110043.GEZerv21Qj10Q7-8p5@fat_crate.local> References: <20240222202404.36206-1-kevinloughlin@google.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: On Fri, Mar 08, 2024 at 11:30:50AM +0100, Ard Biesheuvel wrote: > Agree with the analysis and the conclusion. However, this will need to > be split into generic and x86 specific changes, given that the DMI > code is shared between all architectures, and explicitly checking for > SEV-SNP support in generic code is not appropriate. > > So what we will need is: I was actually thinking of: x86_init.resources.probe_roms = snp_probe_roms; and snp_probe_roms() is an empty stub. Problem solved without ugly sprinkling of checks everywhere. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette