Re: [PATCH] KVM: SVM: relax conditions for allowing MSR_IA32_SPEC_CTRL accesses

From: Paolo Bonzini
Date: Thu Feb 06 2020 - 09:21:46 EST


On 06/02/20 15:17, Vitaly Kuznetsov wrote:
> Reviewed-by: Vitaly Kuznetsov <vkuznets@xxxxxxxxxx>
>
> but out of pure curiosity, why do we need these checks?
>
> At least for the 'set' case right below them we have:
>
> if (data & ~kvm_spec_ctrl_valid_bits(vcpu))
> return 1;
>
> so if guest will try using unsupported features it will #GP. So
> basically, these checks will only fire when reading/writing '0' and all
> features are missing, right? Do we care?

Probably not... I just wanted the smallest possible change in semantics
for this patch, and the rest can be done equally on Intel and AMD.

Paolo