* kvm selftest 'msr' fails on some skylake cpus @ 2024-06-14 3:09 Maxim Levitsky 2024-06-14 14:26 ` Sean Christopherson 0 siblings, 1 reply; 5+ messages in thread From: Maxim Levitsky @ 2024-06-14 3:09 UTC (permalink / raw) To: Sean Christopherson; +Cc: kvm Hi! This kvm unit test tests that all reserved bits of the MSR_IA32_FLUSH_CMD #GP, but apparently on some systems this test fails. For example I reproduced this on: model name : Intel(R) Xeon(R) CPU E3-1260L v5 @ 2.90GHz stepping : 3 microcode : 0xf0 As I see in the 'vmx_vcpu_after_set_cpuid', we passthough this msr to the guest AS IS, thus the unit test tests the microcode. So I suspect that the test actually caught a harmless microcode bug. What do you think we should do to workaround this? Maybe disable this check on affected cpus or turn it into a warning because MSR_IA32_FLUSH_CMD reserved bits test doesn't test KVM? Best regards, Maxim Levitsky ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: kvm selftest 'msr' fails on some skylake cpus 2024-06-14 3:09 kvm selftest 'msr' fails on some skylake cpus Maxim Levitsky @ 2024-06-14 14:26 ` Sean Christopherson 2024-06-17 18:05 ` Maxim Levitsky 0 siblings, 1 reply; 5+ messages in thread From: Sean Christopherson @ 2024-06-14 14:26 UTC (permalink / raw) To: Maxim Levitsky; +Cc: kvm On Thu, Jun 13, 2024, Maxim Levitsky wrote: > Hi! > > This kvm unit test tests that all reserved bits of the MSR_IA32_FLUSH_CMD #GP, but apparently > on some systems this test fails. > > For example I reproduced this on: > > model name : Intel(R) Xeon(R) CPU E3-1260L v5 @ 2.90GHz > stepping : 3 > microcode : 0xf0 > > > As I see in the 'vmx_vcpu_after_set_cpuid', we passthough this msr to the guest AS IS, > thus the unit test tests the microcode. > > So I suspect that the test actually caught a harmless microcode bug. Yeah, we encountered the same thing and came to the same conclusion. > What do you think we should do to workaround this? Maybe disable this check on > affected cpus or turn it into a warning because MSR_IA32_FLUSH_CMD reserved bits > test doesn't test KVM? Ya, Mingwei posted a patch[*] to force KVM to emulate the faulting accesses, which more or less does exactly that, but preserves a bit of KVM coverage. I'll get a KUT pull request sent to Paolo today, I've got a sizeable number of changes ready. [*] https://lore.kernel.org/all/20240417232906.3057638-3-mizhang@google.com ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: kvm selftest 'msr' fails on some skylake cpus 2024-06-14 14:26 ` Sean Christopherson @ 2024-06-17 18:05 ` Maxim Levitsky 2024-06-25 23:26 ` Jim Mattson 0 siblings, 1 reply; 5+ messages in thread From: Maxim Levitsky @ 2024-06-17 18:05 UTC (permalink / raw) To: Sean Christopherson; +Cc: kvm On Fri, 2024-06-14 at 07:26 -0700, Sean Christopherson wrote: > On Thu, Jun 13, 2024, Maxim Levitsky wrote: > > Hi! > > > > This kvm unit test tests that all reserved bits of the MSR_IA32_FLUSH_CMD #GP, but apparently > > on some systems this test fails. > > > > For example I reproduced this on: > > > > model name : Intel(R) Xeon(R) CPU E3-1260L v5 @ 2.90GHz > > stepping : 3 > > microcode : 0xf0 > > > > > > As I see in the 'vmx_vcpu_after_set_cpuid', we passthough this msr to the guest AS IS, > > thus the unit test tests the microcode. > > > > So I suspect that the test actually caught a harmless microcode bug. > > Yeah, we encountered the same thing and came to the same conclusion. > > > What do you think we should do to workaround this? Maybe disable this check on > > affected cpus or turn it into a warning because MSR_IA32_FLUSH_CMD reserved bits > > test doesn't test KVM? > > Ya, Mingwei posted a patch[*] to force KVM to emulate the faulting accesses, which > more or less does exactly that, but preserves a bit of KVM coverage. I'll get a > KUT pull request sent to Paolo today, I've got a sizeable number of changes ready. > > [*] https://lore.kernel.org/all/20240417232906.3057638-3-mizhang@google.com > This works for me. Thanks, Best regards, Maxim Levitsky ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: kvm selftest 'msr' fails on some skylake cpus 2024-06-17 18:05 ` Maxim Levitsky @ 2024-06-25 23:26 ` Jim Mattson 2024-06-26 2:05 ` Sean Christopherson 0 siblings, 1 reply; 5+ messages in thread From: Jim Mattson @ 2024-06-25 23:26 UTC (permalink / raw) To: Sean Christopherson, Paolo Bonzini; +Cc: kvm, Maxim Levitsky On Mon, Jun 17, 2024 at 11:29 AM Maxim Levitsky <mlevitsk@redhat.com> wrote: > > On Fri, 2024-06-14 at 07:26 -0700, Sean Christopherson wrote: > > On Thu, Jun 13, 2024, Maxim Levitsky wrote: > > > Hi! > > > > > > This kvm unit test tests that all reserved bits of the MSR_IA32_FLUSH_CMD #GP, but apparently > > > on some systems this test fails. > > > > > > For example I reproduced this on: > > > > > > model name : Intel(R) Xeon(R) CPU E3-1260L v5 @ 2.90GHz > > > stepping : 3 > > > microcode : 0xf0 > > > > > > > > > As I see in the 'vmx_vcpu_after_set_cpuid', we passthough this msr to the guest AS IS, > > > thus the unit test tests the microcode. > > > > > > So I suspect that the test actually caught a harmless microcode bug. > > > > Yeah, we encountered the same thing and came to the same conclusion. > > > > > What do you think we should do to workaround this? Maybe disable this check on > > > affected cpus or turn it into a warning because MSR_IA32_FLUSH_CMD reserved bits > > > test doesn't test KVM? > > > > Ya, Mingwei posted a patch[*] to force KVM to emulate the faulting accesses, which > > more or less does exactly that, but preserves a bit of KVM coverage. I'll get a > > KUT pull request sent to Paolo today, I've got a sizeable number of changes ready. > > > > [*] https://lore.kernel.org/all/20240417232906.3057638-3-mizhang@google.com > > > > This works for me. > Thanks, > > Best regards, > Maxim Levitsky Sean and/or Paolo, I'm still waiting for this to show up. :) ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: kvm selftest 'msr' fails on some skylake cpus 2024-06-25 23:26 ` Jim Mattson @ 2024-06-26 2:05 ` Sean Christopherson 0 siblings, 0 replies; 5+ messages in thread From: Sean Christopherson @ 2024-06-26 2:05 UTC (permalink / raw) To: Jim Mattson; +Cc: Paolo Bonzini, kvm, Maxim Levitsky On Tue, Jun 25, 2024, Jim Mattson wrote: > On Mon, Jun 17, 2024 at 11:29 AM Maxim Levitsky <mlevitsk@redhat.com> wrote: > > > > On Fri, 2024-06-14 at 07:26 -0700, Sean Christopherson wrote: > > > On Thu, Jun 13, 2024, Maxim Levitsky wrote: > > > > Hi! > > > > > > > > This kvm unit test tests that all reserved bits of the MSR_IA32_FLUSH_CMD #GP, but apparently > > > > on some systems this test fails. > > > > > > > > For example I reproduced this on: > > > > > > > > model name : Intel(R) Xeon(R) CPU E3-1260L v5 @ 2.90GHz > > > > stepping : 3 > > > > microcode : 0xf0 > > > > > > > > > > > > As I see in the 'vmx_vcpu_after_set_cpuid', we passthough this msr to the guest AS IS, > > > > thus the unit test tests the microcode. > > > > > > > > So I suspect that the test actually caught a harmless microcode bug. > > > > > > Yeah, we encountered the same thing and came to the same conclusion. > > > > > > > What do you think we should do to workaround this? Maybe disable this check on > > > > affected cpus or turn it into a warning because MSR_IA32_FLUSH_CMD reserved bits > > > > test doesn't test KVM? > > > > > > Ya, Mingwei posted a patch[*] to force KVM to emulate the faulting accesses, which > > > more or less does exactly that, but preserves a bit of KVM coverage. I'll get a > > > KUT pull request sent to Paolo today, I've got a sizeable number of changes ready. > > > > > > [*] https://lore.kernel.org/all/20240417232906.3057638-3-mizhang@google.com > > > > > > > This works for me. > > Thanks, > > > > Best regards, > > Maxim Levitsky > > Sean and/or Paolo, > > I'm still waiting for this to show up. :) 13a12056be1e4939dadbd0d2cfb65df400832905 x86: msr: testing MSR_IA32_FLUSH_CMD reserved bits only in KVM emulation 51b87946279cf6e9248ceacf0f27833b6ebeef5e x86: Add FEP support on read/write register instructions /drop mic ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-06-26 2:05 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2024-06-14 3:09 kvm selftest 'msr' fails on some skylake cpus Maxim Levitsky 2024-06-14 14:26 ` Sean Christopherson 2024-06-17 18:05 ` Maxim Levitsky 2024-06-25 23:26 ` Jim Mattson 2024-06-26 2:05 ` Sean Christopherson
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox