Re: [PATCH 1/3] Make kvm_cpu_(has|get)_interrupt() work for userspace irqchip too.

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

 



Gleb Natapov wrote:
  * check if there are pending timer events
@@ -48,14 +49,17 @@ int kvm_cpu_has_interrupt(struct kvm_vcpu *v)
 {
 	struct kvm_pic *s;

-	if (kvm_apic_has_interrupt(v) == -1) {	/* LAPIC */
-		if (kvm_apic_accept_pic_intr(v)) {
-			s = pic_irqchip(v->kvm);	/* PIC */
-			return s->output;
-		} else
-			return 0;
+	if (irqchip_in_kernel(v->kvm)) {
+		if (kvm_apic_has_interrupt(v) == -1) {	/* LAPIC */
+			if (kvm_apic_accept_pic_intr(v)) {
+				s = pic_irqchip(v->kvm);	/* PIC */
+				return s->output;
+			} else
+				return 0;
+		}
+		return 1;
 	}
-	return 1;
+	return v->arch.irq_summary;
 }
Use if (!irqchip_in_kernel(v->kvm)) for userspace seems more simple(rather than a series of indention...).

As long as lines are smaller then 80 chars I don't care much :) If new
version of the patch will be needed I'll change this.

Please change it, the less indentation levels the better.


--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.

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