From: Yosry Ahmed <yosry.ahmed@linux.dev>
To: x86@kernel.org, Sean Christopherson <seanjc@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
"H. Peter Anvin" <hpa@zytor.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Jim Mattson <jmattson@google.com>,
"Kaplan, David" <David.Kaplan@amd.com>,
kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
Yosry Ahmed <yosry.ahmed@linux.dev>
Subject: [PATCH 2/3] KVM: x86: Propagate AMD's IbrsSameMode to the guest
Date: Fri, 21 Feb 2025 16:33:51 +0000 [thread overview]
Message-ID: <20250221163352.3818347-3-yosry.ahmed@linux.dev> (raw)
In-Reply-To: <20250221163352.3818347-1-yosry.ahmed@linux.dev>
If IBRS provides same mode (kernel/user or host/guest) protection on the
host, then by definition it also provides same mode protection in the
guest. In fact, all different modes from the guest's perspective are the
same mode from the host's perspective anyway.
Propagate IbrsSameMode to the guests.
Signed-off-by: Yosry Ahmed <yosry.ahmed@linux.dev>
---
arch/x86/kvm/cpuid.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c
index edef30359c198..05d7bbfbb8885 100644
--- a/arch/x86/kvm/cpuid.c
+++ b/arch/x86/kvm/cpuid.c
@@ -1103,6 +1103,7 @@ void kvm_set_cpu_caps(void)
F(AMD_SSB_NO),
F(AMD_STIBP),
F(AMD_STIBP_ALWAYS_ON),
+ F(AMD_IBRS_SAME_MODE),
F(AMD_PSFD),
F(AMD_IBPB_RET),
);
--
2.48.1.601.g30ceb7b040-goog
next prev parent reply other threads:[~2025-02-21 16:34 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-21 16:33 [PATCH 0/3] Unify IBRS virtualization Yosry Ahmed
2025-02-21 16:33 ` [PATCH 1/3] x86/cpufeatures: Define X86_FEATURE_AMD_IBRS_SAME_MODE Yosry Ahmed
2025-02-21 16:33 ` Yosry Ahmed [this message]
2025-02-21 16:33 ` [PATCH 3/3] KVM: x86: Generalize IBRS virtualization on emulated VM-exit Yosry Ahmed
2025-02-21 17:59 ` Jim Mattson
2025-02-21 18:39 ` Yosry Ahmed
2025-02-21 19:02 ` Jim Mattson
2025-02-21 19:25 ` Yosry Ahmed
2025-02-21 19:52 ` Jim Mattson
2025-03-13 21:23 ` [PATCH 0/3] Unify IBRS virtualization Yosry Ahmed
2025-03-26 19:48 ` Sean Christopherson
2025-03-26 19:52 ` Yosry Ahmed
2025-04-25 22:37 ` Sean Christopherson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250221163352.3818347-3-yosry.ahmed@linux.dev \
--to=yosry.ahmed@linux.dev \
--cc=David.Kaplan@amd.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=jmattson@google.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=pbonzini@redhat.com \
--cc=seanjc@google.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox