Re: [PATCH v2 7/7] KVM: VMX: replace vmx_spec_ctrl_restore_host with RESTORE_HOST_SPEC_CTRL_BODY

Chang S. Bae
2026-04-27T17:51:51Z

On 4/27/2026 3:58 AM, Paolo Bonzini wrote:
> Reuse the same assembly as SVM, just with alternatives instead
> of cpu_feature_enabled(X86_FEATURE_KERNEL_IBRS).
On guest, do wrmsr(MSR_IA32_SPEC_CTRL, 0). Then, checking from a handler
in C code, I found host SPEC_CTRL was restored.

The case also works with clearcpuid=236 when mark off
X86_FEATURE_KERNEL_IBRS.

Tested-by: Chang S. Bae <chang.seok.bae@intel.com>