lkml.org 
[lkml]   [2020]   [Feb]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] KVM: x86: do not reset microcode version on INIT or RESET
From
Date
On 11/02/20 23:38, Sean Christopherson wrote:
> On Tue, Feb 11, 2020 at 07:04:39PM +0100, Paolo Bonzini wrote:
>> The microcode version should be set just once, since it is essentially
>> a CPU feature; so do it on vCPU creation rather than reset.
> I wouldn't call it a CPU feature, CPU features generally can't be
> arbitrarily changed while running.

That was true of CPUID bits too until microcode started adding and
removing them, but I see your point. :) What I was trying to convey as
"CPU feature" is that KVM will not change it arbitrarily when running;
it can only change as a result of userspace actions, KVM_SET_MSRS in
this case. But yes, I will improve the text based on your version:

---
Do not initialize the microcode version at RESET or INIT, only on vCPU
creation. Microcode updates are not lost during INIT, and exact
behavior across a warm RESET is not specified by the architecture.

Since we do not support a microcode update directly from the hypervisor,
but only as a result of userspace setting the microcode version MSR,
it's simpler for userspace if we do nothing in KVM and let userspace
emulate behavior for RESET as it sees fit.
---

Thanks,

Paolo

> I'd prefer to have a changelog that
> at least somewhat ties the change to hardware behavior.
>
> Do not initialize the microcode version at RESET or INIT. Microcode
> updates are not lost during INIT, and exact behavior across a warm RESET
> is microarchitectural, i.e. defer to userspace to emulate behavior for
> RESET as it sees fit.
>
> For the code:

\
 
 \ /
  Last update: 2020-02-12 08:44    [W:0.039 / U:4.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site