Skip to contentSkip to conversation

target/i386 change for QEMU 11.1-rc4

GIT PULL Applied Paolo Bonzini 4 participants 5 messages Aug 7 – Aug 11

lore
Share & tools
lore
#0 lore raw

The following changes since commit b428fe036233cbd15d37e3c027ab6ca4d3661a80:

Merge tag 'pull-target-arm-20260731' of https://gitlab.com/pm215/qemu into staging (2026-07-31 16:19:04 -0400)

are available in the Git repository at:

https://gitlab.com/bonzini/qemu.git tags/for-upstream

for you to fetch changes up to 01b4e06b5225787139dae760e8b4fe0c39e5c04d:

target/i386/kvm: Fix CET SSP MSR read feature check (2026-08-07 16:39:22 +0200)

Sorry about the late pull request - I missed this patch from the list, and it fixes a regression (albeit one that was also in 11.0).

Paolo
----------------------------------------------------------------
* target/i386: fix typo in CET_SHSTK check

----------------------------------------------------------------
Saul Freedman (1):
target/i386/kvm: Fix CET SSP MSR read feature check

 target/i386/kvm/kvm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Signature · 1 line
2.55.0
#1 lore raw

[PULL 1/1] target/i386/kvm: Fix CET SSP MSR read feature check

From: Saul Freedman <[email protected]>

kvm_get_msrs() adds U_CET and S_CET when CET shadow stacks or IBT are enabled, but it checks FEAT_7_0_EDX with the ECX-defined CPUID_7_0_ECX_CET_SHSTK bit before adding the PL0-PL3 SSP MSRs.

CPUID_7_0_ECX_CET_SHSTK belongs to FEAT_7_0_ECX. The current check therefore skips MSR_IA32_PL0_SSP through MSR_IA32_PL3_SSP even when guest shadow stacks are enabled.

kvm_put_msrs() already uses FEAT_7_0_ECX for the same shadow-stack condition. Use the same feature word in kvm_get_msrs() so QEMU does not restore CET enablement with stale or zero SSP values.

---
 target/i386/kvm/kvm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
target/i386/kvm/kvm.c +1 -1
index 4272b6770c7..644c45fb0a0 100644
@@ -5022,7 +5022,7 @@ static int kvm_get_msrs(X86CPU *cpu)
         kvm_msr_entry_add(cpu, MSR_IA32_U_CET, 0);
         kvm_msr_entry_add(cpu, MSR_IA32_S_CET, 0);
 
-        if (env->features[FEAT_7_0_EDX] & CPUID_7_0_ECX_CET_SHSTK) {
+        if (env->features[FEAT_7_0_ECX] & CPUID_7_0_ECX_CET_SHSTK) {
             kvm_msr_entry_add(cpu, MSR_IA32_PL0_SSP, 0);
             kvm_msr_entry_add(cpu, MSR_IA32_PL1_SSP, 0);
             kvm_msr_entry_add(cpu, MSR_IA32_PL2_SSP, 0);
Signature · 1 line
2.55.0
#2 lore raw
In reply to Paolo Bonzini

On 8/7/26 17:41, Paolo Bonzini wrote:
[..]

Quoted 4 lines

target/i386/kvm: Fix CET SSP MSR read feature check (2026-08-07 16:39:22 +0200)

Sorry about the late pull request - I missed this patch from the list, and it fixes a regression (albeit one that was also in 11.0).

Since this is not a new (in 11.1) regression, maybe there's no rush to make it into 11.1.0 - unless something else shows up which needs rc4.

(FWIW, I plan to make a set of stable releases somewhere near Aug-25).

Thanks,

/mjt