target/i386 change for QEMU 11.1-rc4
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
[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
@@ -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
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
Stefan Hajnoczi
AppliedApplied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/11.1 for any user-visible changes.
Quoted 5 lines · On Tue, Aug 11, 2026, 17:38 Stefan Hajnoczi <[email protected]> wrote:
Applied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/11.1 for any user-visible changes.
Oops, that should be 11.2 instead of 11.1.
Stefan