Re: [PATCH v5 2/2] kvm: nVMX: Introduce KVM_CAP_NESTED_STATE

2018-07-18 Thread Paolo Bonzini
On 18/07/2018 20:03, Jim Mattson wrote: > On Wed, Jul 18, 2018 at 10:55 AM, Radim Krčmář wrote: > >>> + vmx->nested.nested_run_pending = 1; >> This is not necessary. We're only copying state and do not add anything >> that would be lost on a nested VM exit without prior VM entry. > If

Re: [PATCH v5 2/2] kvm: nVMX: Introduce KVM_CAP_NESTED_STATE

2018-07-18 Thread Paolo Bonzini
On 18/07/2018 20:03, Jim Mattson wrote: > On Wed, Jul 18, 2018 at 10:55 AM, Radim Krčmář wrote: > >>> + vmx->nested.nested_run_pending = 1; >> This is not necessary. We're only copying state and do not add anything >> that would be lost on a nested VM exit without prior VM entry. > If

Re: [PATCH v5 2/2] kvm: nVMX: Introduce KVM_CAP_NESTED_STATE

2018-07-18 Thread Jim Mattson
On Wed, Jul 18, 2018 at 10:55 AM, Radim Krčmář wrote: >> + vmx->nested.nested_run_pending = 1; > > This is not necessary. We're only copying state and do not add anything > that would be lost on a nested VM exit without prior VM entry. If nested_run_pending is blindly set on restore, then

Re: [PATCH v5 2/2] kvm: nVMX: Introduce KVM_CAP_NESTED_STATE

2018-07-18 Thread Jim Mattson
On Wed, Jul 18, 2018 at 10:55 AM, Radim Krčmář wrote: >> + vmx->nested.nested_run_pending = 1; > > This is not necessary. We're only copying state and do not add anything > that would be lost on a nested VM exit without prior VM entry. If nested_run_pending is blindly set on restore, then

Re: [PATCH v5 2/2] kvm: nVMX: Introduce KVM_CAP_NESTED_STATE

2018-07-18 Thread Radim Krčmář
2018-07-10 11:27+0200, KarimAllah Ahmed: > From: Jim Mattson > > For nested virtualization L0 KVM is managing a bit of state for L2 guests, > this state can not be captured through the currently available IOCTLs. In > fact the state captured through all of these IOCTLs is usually a mix of L1 >

Re: [PATCH v5 2/2] kvm: nVMX: Introduce KVM_CAP_NESTED_STATE

2018-07-18 Thread Radim Krčmář
2018-07-10 11:27+0200, KarimAllah Ahmed: > From: Jim Mattson > > For nested virtualization L0 KVM is managing a bit of state for L2 guests, > this state can not be captured through the currently available IOCTLs. In > fact the state captured through all of these IOCTLs is usually a mix of L1 >

Re: [PATCH v5 2/2] kvm: nVMX: Introduce KVM_CAP_NESTED_STATE

2018-07-18 Thread Paolo Bonzini
On 10/07/2018 11:27, KarimAllah Ahmed wrote: > @@ -11772,7 +11772,6 @@ static int enter_vmx_non_root_mode(struct kvm_vcpu > *vcpu) > if (prepare_vmcs02(vcpu, vmcs12, _qual)) > goto fail; > > - nested_get_vmcs12_pages(vcpu, vmcs12); > > r =

Re: [PATCH v5 2/2] kvm: nVMX: Introduce KVM_CAP_NESTED_STATE

2018-07-18 Thread Paolo Bonzini
On 10/07/2018 11:27, KarimAllah Ahmed wrote: > @@ -11772,7 +11772,6 @@ static int enter_vmx_non_root_mode(struct kvm_vcpu > *vcpu) > if (prepare_vmcs02(vcpu, vmcs12, _qual)) > goto fail; > > - nested_get_vmcs12_pages(vcpu, vmcs12); > > r =