On Fri, Mar 08, 2013 at 09:23:21AM +0800, Yang Zhang wrote:
> From: Yang Zhang <yang.z.zh...@intel.com>
> 
> If posted interrupt is avaliable, then uses it to inject virtual
> interrupt to guest.
> 
> Signed-off-by: Yang Zhang <yang.z.zh...@intel.com>
> ---
>  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. 

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to