Re: [PATCH v3 1/4] KVM: nVMX: Rework interception of IRQs and NMIs

2014-03-09 Thread Jan Kiszka
On 2014-03-09 08:33, Paolo Bonzini wrote: Il 08/03/2014 10:21, Jan Kiszka ha scritto: On 2014-03-07 20:48, Paolo Bonzini wrote: Il 07/03/2014 20:03, Jan Kiszka ha scritto: @@ -4631,22 +4631,8 @@ static void vmx_set_nmi_mask(struct kvm_vcpu *vcpu, bool masked) static int

Re: [PATCH v3 1/4] KVM: nVMX: Rework interception of IRQs and NMIs

2014-03-09 Thread Paolo Bonzini
Il 09/03/2014 08:33, Paolo Bonzini ha scritto: Il 08/03/2014 10:21, Jan Kiszka ha scritto: On 2014-03-07 20:48, Paolo Bonzini wrote: Il 07/03/2014 20:03, Jan Kiszka ha scritto: @@ -4631,22 +4631,8 @@ static void vmx_set_nmi_mask(struct kvm_vcpu *vcpu, bool masked) static int

Re: [PATCH v3 1/4] KVM: nVMX: Rework interception of IRQs and NMIs

2014-03-09 Thread Jan Kiszka
On 2014-03-09 09:03, Paolo Bonzini wrote: Il 09/03/2014 08:33, Paolo Bonzini ha scritto: Il 08/03/2014 10:21, Jan Kiszka ha scritto: On 2014-03-07 20:48, Paolo Bonzini wrote: Il 07/03/2014 20:03, Jan Kiszka ha scritto: @@ -4631,22 +4631,8 @@ static void vmx_set_nmi_mask(struct kvm_vcpu

Re: [PATCH v3 1/4] KVM: nVMX: Rework interception of IRQs and NMIs

2014-03-08 Thread Jan Kiszka
On 2014-03-07 20:48, Paolo Bonzini wrote: Il 07/03/2014 20:03, Jan Kiszka ha scritto: @@ -4631,22 +4631,8 @@ static void vmx_set_nmi_mask(struct kvm_vcpu *vcpu, bool masked) static int vmx_nmi_allowed(struct kvm_vcpu *vcpu) { -if (is_guest_mode(vcpu)) { -if

Re: [PATCH v3 1/4] KVM: nVMX: Rework interception of IRQs and NMIs

2014-03-08 Thread Paolo Bonzini
Il 08/03/2014 10:21, Jan Kiszka ha scritto: On 2014-03-07 20:48, Paolo Bonzini wrote: Il 07/03/2014 20:03, Jan Kiszka ha scritto: @@ -4631,22 +4631,8 @@ static void vmx_set_nmi_mask(struct kvm_vcpu *vcpu, bool masked) static int vmx_nmi_allowed(struct kvm_vcpu *vcpu) { -if

[PATCH v3 1/4] KVM: nVMX: Rework interception of IRQs and NMIs

2014-03-07 Thread Jan Kiszka
Move the check for leaving L2 on pending and intercepted IRQs or NMIs from the *_allowed handler into a dedicated callback. Invoke this callback at the relevant points before KVM checks if IRQs/NMIs can be injected. The callback has the task to switch from L2 to L1 if needed and inject the proper

Re: [PATCH v3 1/4] KVM: nVMX: Rework interception of IRQs and NMIs

2014-03-07 Thread Paolo Bonzini
Il 07/03/2014 20:03, Jan Kiszka ha scritto: @@ -4631,22 +4631,8 @@ static void vmx_set_nmi_mask(struct kvm_vcpu *vcpu, bool masked) static int vmx_nmi_allowed(struct kvm_vcpu *vcpu) { - if (is_guest_mode(vcpu)) { - if (to_vmx(vcpu)-nested.nested_run_pending) -