[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c4bc61da-c42c-453d-b484-f970b99cb616@zytor.com>
Date: Mon, 1 Sep 2025 00:04:24 -0700
From: Xin Li <xin@...or.com>
To: Binbin Wu <binbin.wu@...ux.intel.com>, Xiaoyao Li <xiaoyao.li@...el.com>
Cc: Sean Christopherson <seanjc@...gle.com>,
Paolo Bonzini <pbonzini@...hat.com>, kvm@...r.kernel.org,
linux-kernel@...r.kernel.org, Borislav Petkov <bp@...en8.de>
Subject: Re: [PATCH v3 4/6] KVM: x86: Add support for RDMSR/WRMSRNS w/
immediate on Intel
On 8/31/2025 11:34 PM, Binbin Wu wrote:
>> We need to inject #UD for !guest_cpu_has(X86_FEATURE_MSR_IMM)
>>
>
> Indeed.
Good catch!
>
> There is a virtualization hole of this feature for the accesses to the MSRs
> not
> intercepted. IIUIC, there is no other control in VMX for this feature. If the
> feature is supported in hardware, the guest will succeed when it accesses
> to the
> MSRs not intercepted even when the feature is not exposed to the guest, but
> the
> guest will get #UD when access to the MSRs intercepted if KVM injects #UD.
hpa mentioned this when I just started the work. But I managed to forget
it later... Sigh!
>
> But I guess this is the guest's fault by not following the CPUID, KVM should
> still follow the spec?
I think we should still inject #UD when a MSR is intercepted by KVM.
Powered by blists - more mailing lists