Re: [RFC PATCH 2/2] KVM: x86: use __kvm_guest_exit

2016-06-16 Thread Paolo Bonzini
> > static bool vmx_has_high_real_mode_segbase(void) > > diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c > > index 7e3041ef050f..cc741b68139c 100644 > > --- a/arch/x86/kvm/x86.c > > +++ b/arch/x86/kvm/x86.c > > @@ -6706,21 +6706,13 @@ static int vcpu_enter_guest(struct kvm_vcpu *vcpu) > > >

Re: [RFC PATCH 2/2] KVM: x86: use __kvm_guest_exit

2016-06-16 Thread Bandan Das
... > static bool vmx_has_high_real_mode_segbase(void) > diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c > index 7e3041ef050f..cc741b68139c 100644 > --- a/arch/x86/kvm/x86.c > +++ b/arch/x86/kvm/x86.c > @@ -6706,21 +6706,13 @@ static int vcpu_enter_guest(struct kvm_vcpu *vcpu) > > kvm

Re: [RFC PATCH 2/2] KVM: x86: use __kvm_guest_exit

2016-06-16 Thread Paolo Bonzini
On 16/06/2016 19:03, David Matlack wrote: > > > If you make the else case the same as svm_handle_external_intr, can we > > > avoid requiring ack-intr-on-exit? > > > > Yes, but the sti/nop/cli would be useless if ack-intr-on-exit is > > available. It's a bit ugly, so I RFCed the bold thing instea

Re: [RFC PATCH 2/2] KVM: x86: use __kvm_guest_exit

2016-06-16 Thread David Matlack
On Thu, Jun 16, 2016 at 9:47 AM, Paolo Bonzini wrote: > On 16/06/2016 18:43, David Matlack wrote: >> On Thu, Jun 16, 2016 at 1:21 AM, Paolo Bonzini wrote: >>> This gains ~20 clock cycles per vmexit. On Intel there is no need >>> anymore to enable the interrupts in vmx_handle_external_intr, since

Re: [RFC PATCH 2/2] KVM: x86: use __kvm_guest_exit

2016-06-16 Thread Paolo Bonzini
On 16/06/2016 18:43, David Matlack wrote: > On Thu, Jun 16, 2016 at 1:21 AM, Paolo Bonzini wrote: >> This gains ~20 clock cycles per vmexit. On Intel there is no need >> anymore to enable the interrupts in vmx_handle_external_intr, since we >> are using the "acknowledge interrupt on exit" featu

Re: [RFC PATCH 2/2] KVM: x86: use __kvm_guest_exit

2016-06-16 Thread David Matlack
On Thu, Jun 16, 2016 at 1:21 AM, Paolo Bonzini wrote: > This gains ~20 clock cycles per vmexit. On Intel there is no need > anymore to enable the interrupts in vmx_handle_external_intr, since we > are using the "acknowledge interrupt on exit" feature. AMD needs to do > that temporarily, and must

[RFC PATCH 2/2] KVM: x86: use __kvm_guest_exit

2016-06-16 Thread Paolo Bonzini
This gains ~20 clock cycles per vmexit. On Intel there is no need anymore to enable the interrupts in vmx_handle_external_intr, since we are using the "acknowledge interrupt on exit" feature. AMD needs to do that temporarily, and must be careful to avoid the interrupt shadow. Signed-off-by: Paol