Re: [PATCH 1/2] KVM: x86: Add emulation support for #GP triggered by VM instructions

Paolo Bonzini
2021-01-13T12:41:54Z

On 12/01/21 18:59, Sean Christopherson wrote:
>> It would be very helpful to list exactly which CPUs are/aren't affected, even if
>> that just means stating something like "all CPUs before XYZ". Given patch 2/2,
>> I assume it's all CPUs without the new CPUID flag?
> Ah, despite calling this an 'errata', the bad behavior is explicitly documented
> in the APM, i.e. it's an architecture bug, not a silicon bug.

I would still call it an errata for the case when virtualized
VMSAVE/VMLOAD is enabled (and therefore VMLOAD intercepts are disabled).
In that case, the problem is that the GPA does not go through NPT
before it is checked against *host* reserved memory regions.

In fact I hope that, on processors that have the fix, VMSAVE/VMLOAD
from guest mode _does_ check the GPA after it's been translated!

Paolo