On 10/11/2017 22:24, Radim Krčmář wrote: > I think that we can't have nested posted interrupts without > kvm_lapic_enabled() or kvm_vcpu_apicv_active(), so we could add nested > handling to sync_pir_to_irr and save x86 op. It could be just a single kvm_x86_ops->complete_posted_interrupts() callback, since there are other callers of sync_pir_to_irr (and those want it to do host LAPIC processing only). Paolo > vmx_complete_nested_posted_interrupt will need some changes as it is not > called with disabled interrupts -- kmap() and probably also > nested_mark_vmcs12_pages_dirty() should be done outside; I guess that > other code is already be taking care of both, but better check.