Re: [PATCH] KVM: x86: cleanup CR3 reserved bits checks

From: Paolo Bonzini
Date: Wed Feb 03 2021 - 03:30:07 EST


On 02/02/21 19:34, Sean Christopherson wrote:
On Tue, Feb 02, 2021, Paolo Bonzini wrote:
If not in long mode, the low bits of CR3 are reserved but not enforced to
be zero, so remove those checks. If in long mode, however, the MBZ bits
extend down to the highest physical address bit of the guest, excluding
the encryption bit.

Make the checks consistent with the above, and match them between
nested_vmcb_checks and KVM_SET_SREGS.

Fixes + Cc:stable@?

Difficult to say what it fixes, it's been there forever for KVM_SET_SREGS.

For the nSVM part I'll go with

Fixes: 761e41693465 ("KVM: nSVM: Check that MBZ bits in CR3 and CR4 are not set on vmrun of nested guests")

Paolo

Signed-off-by: Paolo Bonzini<pbonzini@xxxxxxxxxx>
Reviewed-by: Sean Christopherson<seanjc@xxxxxxxxxx>