Re: [PATCH 1/2] KVM: nVMX: Validate EFER values for VM_ENTRY/EXIT_LOAD_IA32_EFER

2013-04-22 Thread Gleb Natapov
On Sun, Apr 14, 2013 at 12:44:09PM +0200, Jan Kiszka wrote: > From: Jan Kiszka > > As we may emulate the loading of EFER on VM-entry and VM-exit, implement > the checks that VMX performs on the guest and host values on vmlaunch/ > vmresume. Factor out kvm_valid_efer for this purpose which checks

Re: [PATCH 1/2] KVM: nVMX: Validate EFER values for VM_ENTRY/EXIT_LOAD_IA32_EFER

2013-04-17 Thread Marcelo Tosatti
On Sun, Apr 14, 2013 at 12:44:09PM +0200, Jan Kiszka wrote: > From: Jan Kiszka > > As we may emulate the loading of EFER on VM-entry and VM-exit, implement > the checks that VMX performs on the guest and host values on vmlaunch/ > vmresume. Factor out kvm_valid_efer for this purpose which checks

Re: [PATCH 1/2] KVM: nVMX: Validate EFER values for VM_ENTRY/EXIT_LOAD_IA32_EFER

2013-04-15 Thread Paolo Bonzini
Il 14/04/2013 12:44, Jan Kiszka ha scritto: > + if (vmcs12->vm_entry_controls & VM_ENTRY_LOAD_IA32_EFER && > + (!kvm_valid_efer(vcpu, vmcs12->guest_ia32_efer) || > + !!(vmcs12->vm_entry_controls & VM_ENTRY_IA32E_MODE) != > + !!(vmcs12->guest_ia32_efer & EFER_LMA) || >

[PATCH 1/2] KVM: nVMX: Validate EFER values for VM_ENTRY/EXIT_LOAD_IA32_EFER

2013-04-14 Thread Jan Kiszka
From: Jan Kiszka As we may emulate the loading of EFER on VM-entry and VM-exit, implement the checks that VMX performs on the guest and host values on vmlaunch/ vmresume. Factor out kvm_valid_efer for this purpose which checks for set reserved bits. Signed-off-by: Jan Kiszka --- arch/x86/inclu