Re: [PATCH v5 2/2] KVM: X86: Allow userspace to define the microcode version

From: Wanpeng Li
Date: Wed Feb 28 2018 - 00:59:32 EST


2018-02-28 13:55 GMT+08:00 Tom Lendacky <thomas.lendacky@xxxxxxx>:
> On 2/27/2018 9:34 PM, Wanpeng Li wrote:
>> From: Wanpeng Li <wanpengli@xxxxxxxxxxx>
>>
>> Linux (among the others) has checks to make sure that certain features
>> aren't enabled on a certain family/model/stepping if the microcode version
>> isn't greater than or equal to a known good version.
>>
>> By exposing the real microcode version, we're preventing buggy guests that
>> don't check that they are running virtualized (i.e., they should trust the
>> hypervisor) from disabling features that are effectively not buggy.
>>
>> Suggested-by: Filippo Sironi <sironi@xxxxxxxxx>
>> Cc: Paolo Bonzini <pbonzini@xxxxxxxxxx>
>> Cc: Radim KrÄmÃÅ <rkrcmar@xxxxxxxxxx>
>> Cc: Liran Alon <liran.alon@xxxxxxxxxx>
>> Cc: Nadav Amit <nadav.amit@xxxxxxxxx>
>> Cc: Borislav Petkov <bp@xxxxxxxxx>
>> Cc: Tom Lendacky <thomas.lendacky@xxxxxxx>
>> Signed-off-by: Wanpeng Li <wanpengli@xxxxxxxxxxx>
>> ---
>> v4 -> v5:
>> * microcode_version be u64 and initialized suitable, remote hte shifts
>> v3 -> v4:
>> * add the shifts back
>> v2 -> v3:
>> * remove the shifts
>> * add the MSR_IA32_UCODE_REV version to the "feature MSRs"
>
> I think you lost this part from the patch series. I don't see where you
> add MSR_IA32_UCODE_REV to the msr_based_features array.

I sent out a wrong version, will send again.

Regards,
Wanpeng Li