Re: [PATCH v5 5/5] KVM : VMX: Use posted interrupt to deliver virtual interrupt

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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. 

--
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


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux