Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1201672
| From | Paolo Bonzini <pbonzini@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 5/9] KVM: x86: unify handling of interrupt window |
| Date | 2015-08-06 14:00 +0200 |
| Message-ID | <pUs01-82F-7@gated-at.bofh.it> (permalink) |
| References | <pU8NI-5jj-5@gated-at.bofh.it> <pU8NI-5jj-7@gated-at.bofh.it> <pUnjH-1ck-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 06/08/2015 08:50, Wu, Feng wrote: > Is it possible to adjust the code here and remove the later checking in x86.c? > In that case, we can avoid calling dm_request_for_irq_injection(vcpu) for > VM exit. No, see the dm_request_for_irq_injection() changes in patch 9. In that patch, you can get a IRQ window open vmexit under broader conditions (e.g. writing to the local APIC's LVT0 register). dm_request_for_irq_injection() is called just once, so it is inlined. After patch 9, it boils down to simply if (!vcpu->run->request_interrupt_window) return false; in the common case of in-kernel irqchip. So it costs just one memory access and a well-predicted branch. Paolo > Basically dm_request_for_irq_injection() did the following checks: > > - The same as in handle_interrupt_window() below: > > if (!irqchip_in_kernel(vcpu->kvm) && > vcpu->run->request_interrupt_window && > !kvm_cpu_has_interrupt(vcpu)) > > - kvm_arch_interrupt_allowed(vcpu), in which, most of the conditions > are guaranteed by interrupt window exits, the only one I am not sure > how to handle is ' to_vmx(vcpu)->nested.nested_run_pending'. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 5/9] KVM: x86: unify handling of interrupt window Paolo Bonzini <pbonzini@redhat.com> - 2015-08-05 17:30 +0200
RE: [PATCH 5/9] KVM: x86: unify handling of interrupt window "Wu, Feng" <feng.wu@intel.com> - 2015-08-06 09:00 +0200
Re: [PATCH 5/9] KVM: x86: unify handling of interrupt window Paolo Bonzini <pbonzini@redhat.com> - 2015-08-06 14:00 +0200
csiph-web