Re: [PATCH] KVM: vmx: add mismatched size in vmcs_check32

2021-04-08 Thread Haiwei Li
On Fri, Apr 9, 2021 at 12:05 AM Sean Christopherson wrote: > > On Thu, Apr 08, 2021, lihaiwei.ker...@gmail.com wrote: > > From: Haiwei Li > > > > vmcs_check32 misses the check for 64-bit and 64-bit high. > > Can you clarify in the changelog that, while it is architecturally legal to > access 64-b

Re: [PATCH] KVM: vmx: add mismatched size in vmcs_check32

2021-04-08 Thread Paolo Bonzini
On 08/04/21 18:05, Sean Christopherson wrote: Add compile-time assertions in vmcs_check32() to disallow accesses to 64-bit and 64-bit high fields via vmcs_{read,write}32(). Upper level KVM code should never do partial accesses to VMCS fields. KVM handles the split accesses automatic

Re: [PATCH] KVM: vmx: add mismatched size in vmcs_check32

2021-04-08 Thread Sean Christopherson
On Thu, Apr 08, 2021, lihaiwei.ker...@gmail.com wrote: > From: Haiwei Li > > vmcs_check32 misses the check for 64-bit and 64-bit high. Can you clarify in the changelog that, while it is architecturally legal to access 64-bit and 64-bit high fields with a 32-bit read/write in 32-bit mode, KVM sho

[PATCH] KVM: vmx: add mismatched size in vmcs_check32

2021-04-08 Thread lihaiwei . kernel
From: Haiwei Li vmcs_check32 misses the check for 64-bit and 64-bit high. Signed-off-by: Haiwei Li --- arch/x86/kvm/vmx/vmx_ops.h | 4 1 file changed, 4 insertions(+) diff --git a/arch/x86/kvm/vmx/vmx_ops.h b/arch/x86/kvm/vmx/vmx_ops.h index 692b0c3..164b64f 100644 --- a/arch/x86/kvm/vmx