Received: by 2002:ab2:3319:0:b0:1ef:7a0f:c32d with SMTP id i25csp826820lqc; Fri, 8 Mar 2024 12:52:33 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCW51fOx1TklSDLOOQ/AKvtaupLIpAJjRP8eHWADLN2l5tmMQKDFyKxCV5hQlVAAoUOlrviR1942oAjqYqmmfSgJUKWiwxC0VRbP6M09tg== X-Google-Smtp-Source: AGHT+IHnEeljNEBh+BW6mE+0TDaB9KMn8FNjJxeG+o5Ty/969bTo0dJ8WDV/zYaBXcg5Chlry2ON X-Received: by 2002:a05:6e02:1e03:b0:365:fe9f:8127 with SMTP id g3-20020a056e021e0300b00365fe9f8127mr64671ila.8.1709931153476; Fri, 08 Mar 2024 12:52:33 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709931153; cv=pass; d=google.com; s=arc-20160816; b=WrLk+hnbKfdvqPzPfXwnSjbfIMKt0cgx6SsJ+aqtBNNaO804ac8L2gIWOKdSL5icGJ 9Ix0VSvB3FkvG5k8L0xoAzqNqSjEQW3yFhbIU2+WHDhldpuPMUtS7l5s4pjrEkAYAOTh wS0qix68kdUJ1To+RRV1hNwNGYq1gB+I/GZzX2QVhYclYKqgLNfzlaLoZxG1EPmXSLiu rS4DfjmNklNiUxvEluMtyjzKfuOLjsQ3TkxF3GlqmuTpE05OV14ZL8f4nADkTByLOHHF DoTaukHrgxh2Z3qJ71mdVqiq6NW64d3Pj/gFf8e87DwgrTTY+/Q3fuflaQpgnJxmGL6m tbZw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=JIbSa45F0sbbEQNxZfvGwr7gnFgJqOFTDI+EfPdvz1M=; fh=8oWSP/5Biccwna523btbFrweEvRdM3HNJAWZk7k6Ouc=; b=YrPBXBm870DefYCIgRSgR6Ndl4ygyW0mXLw9BpSV2pWsLtqcbLWrkvoyWgXTLRn1AJ USvI0xDEYgLgVvjWyV4TjkLERvWhpukhJ+mACMWZS8oUzibxiTvb6SFh15ZybvuPTStW x9y1VJ26DVHMgEhDykLMcI06BBJJC98/pUk7IDvzFO8XeXG804JPhqp4OJMZdpzsQ+Sf 0hDKBI1QA+9I04PBCiH1B0DA9bsm6pi+pbAEVS4NdVesSuGgzmrCjgRQ42e8XfpxcyUg KHqpZ55J3uklEHp2WSNzpAH+M7v0g9+AiY20FQsTcO8SygloaLywSetgsyIQP+uyi4FK DiFQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=z9zkNYND; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-97573-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-97573-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id k3-20020a63ba03000000b005e430f68ae4si227223pgf.549.2024.03.08.12.52.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Mar 2024 12:52:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-97573-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=z9zkNYND; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-97573-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-97573-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 28E4528288B for ; Fri, 8 Mar 2024 20:52:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 11EFF5E090; Fri, 8 Mar 2024 20:52:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="z9zkNYND" Received: from mail-ua1-f48.google.com (mail-ua1-f48.google.com [209.85.222.48]) (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 D308A1EF1E for ; Fri, 8 Mar 2024 20:52:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709931148; cv=none; b=JG6zkXcC/fjk8jBp1oRBy5wRJuORnAmbXP3DCk0hac839vUT/pJStAccM+SaCa8LyygNvyDczdfVHcoOjK/DplPq+5C8r6O6ksc3Wkpa20yaeeAmqs5RsoTnKf8eBI0YdD2qSrQbC8ugJdKoYWCQv6X6jtaAQxeGkbjenp2gg2M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709931148; c=relaxed/simple; bh=j2rwAOJRo4LYcXeDY/WUYHfb4+0+9qA2Hm/60uUoEdY=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=Lmob9FBwwQWdEVbPeuNO62a61YSTvtJ/XWGvztTXduYVb2m4rTmMQi2GSvAiiNNGy9fsrhqXaivCcD6j3XUArdjLcgdLlUSI6Xxip7maRTh/Jp5kOvBjUeRsllLqxmrXjNlsjK69g9MxeDkYKvAKH89GoE7gMKWx7xyQL6a4RkQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=z9zkNYND; arc=none smtp.client-ip=209.85.222.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Received: by mail-ua1-f48.google.com with SMTP id a1e0cc1a2514c-7db1a21e83fso714295241.2 for ; Fri, 08 Mar 2024 12:52:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1709931146; x=1710535946; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=JIbSa45F0sbbEQNxZfvGwr7gnFgJqOFTDI+EfPdvz1M=; b=z9zkNYND9UIpwbtaasfHE+K+7uEVHpNP2bEtbgLp0XgH0zlCLAukbH9tMVxwChpMsv 8CcI/mSGOQVxijIxE+b2+b010oXE244oO248T7KgIv3A8yCCAt8EVgV15QGN6EQ9V6S7 WwKbApT+FhGmYjbZIj7DdJV1vjOchZYZOxhgbSxOGPlPq8Vi4zgH/w86VnXP24QQNmxm GhhZc+fr5Gf/dBJH2b3yRUv+NoMnoZd20X7NVuf/1ltnzh5Ebdctjk4Ggigd7wXwgFGm VXyo2hbK7iYebb8U2XrsuOQr5k942LRWmr6X0/XCazRRwWbKfivFyV8VMln+COxhwEib IUAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709931146; x=1710535946; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JIbSa45F0sbbEQNxZfvGwr7gnFgJqOFTDI+EfPdvz1M=; b=ViP6QpKrbl9hoeccQ9QjO43UzAbPrh5quzf5IFKj9DLKHvx1xwcplGcX01bKQnaxEZ aPIyWHYFmk5mDa5msBrSaAzHocX0JyxuD8zOfBN+jdz8I0nz41kAvbicVElNl3vlNFqD e3feZynow7tz73fytjJtyivIRZu+L8BY8qgGApgOQP97Ou+hqbgXEr9VUx0LerCe8j7D 4HaacjFU4QJzXlGeaLf/5GgXqA8QB2AG+1pQ7RKiJOc+3ZiqrBVQ6JzvWDuWmbqvf1r7 hFoT2snj4AIszc6OuoKwQb0Q6qLCLteNaly1Fr2wNWY/7Wgbx+q17drMx9oRp+KdVOqv 6pgg== X-Forwarded-Encrypted: i=1; AJvYcCWmRmGPeCOVUcrJMCy/0N5aWCCxU5FUPlinGwWDj81U67GFp88sI3CXqgQ4ySGfJufv1ecYHFQP/jPPm9/Hw1rroPYosAKt96adOe+b X-Gm-Message-State: AOJu0YwJjQF0mJrDey1mUWJMt+aA1TnQ48FitYxT3H6vZkDz2FHia1J8 NP2riyY7IxB0m++2uAAJQvuursd66AFPlI1uTEcot+PIkUBhhAacSPxS0NUnrNZk9gN40KsY8L0 mXmf+G8hJvol9tfh+0SghDlHx799mZ1AKf9WN X-Received: by 2002:a05:6102:1886:b0:472:eb81:ef29 with SMTP id ji6-20020a056102188600b00472eb81ef29mr138917vsb.23.1709931145717; Fri, 08 Mar 2024 12:52:25 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240222202404.36206-1-kevinloughlin@google.com> <20240308110043.GEZerv21Qj10Q7-8p5@fat_crate.local> In-Reply-To: <20240308110043.GEZerv21Qj10Q7-8p5@fat_crate.local> From: Kevin Loughlin Date: Fri, 8 Mar 2024 15:52:14 -0500 Message-ID: Subject: Re: [PATCH v2] x86/kernel: skip ROM range scans and validation for SEV-SNP guests To: Borislav Petkov Cc: Ard Biesheuvel , 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Mar 8, 2024 at 6:01=E2=80=AFAM Borislav Petkov wrote= : > > 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 =3D snp_probe_roms; > > and snp_probe_roms() is an empty stub. > > Problem solved without ugly sprinkling of checks everywhere. Agreed, this is nicer; we can just add dmi_setup to x86_init as well to implement the same concept for all checks we need.