From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f201.google.com (mail-pf1-f201.google.com [209.85.210.201]) (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 3874E42E01C for ; Thu, 30 Apr 2026 17:47:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777571265; cv=none; b=ksAiE+GeKoXxs3xJrqWdOKYSYL5mVsyr/UOJQ0dNZ0bCDQBBS27UWUPDfCmEgsC0TFyNebVKnbvA+511ZrjSYI/Uqzh18m85uoTGE/uyaOl13k/TianJyszK63sS10Gc56A4gB6FvqHE+QTGfStXeoMzjjD/ExxsUocCnpJ7VrI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777571265; c=relaxed/simple; bh=5EJ30Gqtru62HMMBfPeGqMrURbVi60vosZt3XIpYxNg=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=Wr+PO1JAq6fZLEhHcDeI4shXQiVgy/fHQ2S3pIUwNbZreLibarncqrXJq3fQtlDur+dSQ+kaTS3SLNWIIgYMTOknxeBzyd0cGuub1AoaOAw7dU+08b2GI72NXN1/HT1cVk7zroThpRoOxeOqGQAuNSqKnT9ORQVD7S5XtVtlebA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=IaA7Qyj1; arc=none smtp.client-ip=209.85.210.201 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=flex--seanjc.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="IaA7Qyj1" Received: by mail-pf1-f201.google.com with SMTP id d2e1a72fcca58-82f460260cfso1287154b3a.2 for ; Thu, 30 Apr 2026 10:47:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1777571263; x=1778176063; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=fSvwP/DPP5VMidfSJOprDmf1oGMfmtIRMut8JZvMh6c=; b=IaA7Qyj1DxqNcFHqOFRX0IEhg9BLYF4+Gxl5fA9+B8B2FWzeb271lJ2OueRK6Ey6IO M1W67lnwhak2ZvXfePau7cgPX0KoPDp/gh47se694+LybWsV2fxHaqM+zuMBulTZmyi2 +a3BIZlCSNG8+WjhHOWwTeFSq+7I/s2va5gsCN/q4yEg+RqbYnuyCRsZpOFznoYA7W96 Jd0PmkmC8d53Rn0PkuRnNNgKOS22NwIa/tuT/Y4Tyun4fH3zNlMeSlR1tuJyv3L9BciV k6SQGTXFQAovOjWwWtLFQhOtEqftap7F1YzwArgh506buk8KVyA8elxcYV4QRBwiWic0 HtNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777571263; x=1778176063; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=fSvwP/DPP5VMidfSJOprDmf1oGMfmtIRMut8JZvMh6c=; b=LhHOdsIlwechj9nz3z9b8YZDpHueujerJ4nHst5/ezmzqVdTut/tvyeBUn/HQT+7ey M81dJ1oO/bG5+7O8ItgqxR9lrnGEy8pTldr9i2CBx1lDbW5BhlPWPtiiOVJTDylP0YqY qVML0TysknIBCykvm3tgujuSO/DJEZ3ixMl/kRL76iIqfDlNRfGzVT7W69tCiSSIVFam gRV2qA2XSTP2fKph0pWEF/Qa3mDQp3/HATRQCnYN+++RI7DRpEMDr3ALHC14GnRF8BS4 7daKGz6QBL31wrWbAqfUBtGAXTcAXWAni17QnSrmpcFufSqKhxoPU3b30C6N1QRbWMEc 927A== X-Gm-Message-State: AOJu0Yy4fInsysYj/YElPEChon+CHd5bgWjbZ/qUOgvNaDb8GYPihtOM xPrAjIZ4nkLVU1WkG9n0lQPgpVlZIswZkLQJJk8c4lt5avg1bC1PWe5k6mXUXG8Su47B3gyNl3P hf3RZHQ== X-Received: from pfbbk25.prod.google.com ([2002:aa7:8319:0:b0:82f:b853:3ba7]) (user=seanjc job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6a00:6c83:b0:81e:12f1:d8a with SMTP id d2e1a72fcca58-834fdc29e0bmr4940712b3a.34.1777571263381; Thu, 30 Apr 2026 10:47:43 -0700 (PDT) Date: Thu, 30 Apr 2026 10:47:41 -0700 In-Reply-To: <20260428214610.2138600-6-d-tatianin@yandex-team.ru> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260428214610.2138600-1-d-tatianin@yandex-team.ru> <20260428214610.2138600-6-d-tatianin@yandex-team.ru> Message-ID: Subject: Re: [PATCH 6.6.y v1 5/6] x86/bugs: KVM: Add support for SRSO_MSR_FIX From: Sean Christopherson To: Daniil Tatianin Cc: stable@vger.kernel.org, Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , Peter Zijlstra , Josh Poimboeuf , Pawan Gupta , Greg Kroah-Hartman , Tom Lendacky , Sasha Levin , "Xin Li (Intel)" , Daniel Sneddon , "Ahmed S. Darwish" , Nikunj A Dadhania Content-Type: text/plain; charset="us-ascii" On Wed, Apr 29, 2026, Daniil Tatianin wrote: > [ Upstream commit 8442df2b49ed9bcd67833ad4f091d15ac91efd00 ] > > Add support for > > CPUID Fn8000_0021_EAX[31] (SRSO_MSR_FIX). If this bit is 1, it > indicates that software may use MSR BP_CFG[BpSpecReduce] to mitigate > SRSO. > > Enable BpSpecReduce to mitigate SRSO across guest/host boundaries. > > Switch back to enabling the bit when virtualization is enabled and to > clear the bit when virtualization is disabled because using a MSR slot > would clear the bit when the guest is exited and any training the guest > has done, would potentially influence the host kernel when execution > enters the kernel and hasn't VMRUN the guest yet. > > More detail on the public thread in Link below. > > Co-developed-by: Sean Christopherson > Signed-off-by: Sean Christopherson > Signed-off-by: Borislav Petkov (AMD) > Link: https://lore.kernel.org/r/20241202120416.6054-1-bp@kernel.org > Signed-off-by: Daniil Tatianin > --- > Documentation/admin-guide/hw-vuln/srso.rst | 13 ++++++++++++ > arch/x86/include/asm/cpufeatures.h | 4 ++++ > arch/x86/include/asm/msr-index.h | 1 + > arch/x86/kernel/cpu/bugs.c | 24 ++++++++++++++++++---- > arch/x86/kvm/svm/svm.c | 6 ++++++ > arch/x86/lib/msr.c | 2 ++ > 6 files changed, 46 insertions(+), 4 deletions(-) For the KVM changes, Acked-by: Sean Christopherson