Marcelo Tosatti wrote on 2013-03-09: > On Fri, Mar 08, 2013 at 09:23:21AM +0800, Yang Zhang wrote: >> From: Yang Zhang <yang.z.zhang@xxxxxxxxx> >> >> If posted interrupt is avaliable, then uses it to inject virtual >> interrupt to guest. >> >> Signed-off-by: Yang Zhang <yang.z.zhang@xxxxxxxxx> >> --- >> arch/x86/kvm/irq.c | 2 +- >> arch/x86/kvm/lapic.c | 16 +++++++++++++--- >> arch/x86/kvm/lapic.h | 1 + >> arch/x86/kvm/x86.c | 4 ++++ >> 4 files changed, 19 insertions(+), 4 deletions(-) >> diff --git a/arch/x86/kvm/irq.c b/arch/x86/kvm/irq.c >> index 484bc87..93b1fd0 100644 >> --- a/arch/x86/kvm/irq.c >> +++ b/arch/x86/kvm/irq.c >> @@ -81,7 +81,7 @@ int kvm_cpu_has_interrupt(struct kvm_vcpu *v) >> if (kvm_cpu_has_extint(v)) >> return 1; >> - return kvm_apic_has_interrupt(v) != -1; /* LAPIC */ >> + return (kvm_apic_has_interrupt(v) != -1) || kvm_hwapic_has_interrupt(v); >> } > > Please move kvm_apic_has_interrupt() check to a new separate if line. Sure. Best regards, Yang -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html