KVM: Force vmexit with virtual interrupt delivery
authorYang Zhang <yang.z.zhang@Intel.com>
Thu, 11 Apr 2013 11:21:39 +0000 (19:21 +0800)
committerMarcelo Tosatti <mtosatti@redhat.com>
Tue, 16 Apr 2013 02:20:34 +0000 (23:20 -0300)
Need the EOI to track interrupt deliver status, so force vmexit
on EOI for rtc interrupt when enabling virtual interrupt delivery.

Signed-off-by: Yang Zhang <yang.z.zhang@Intel.com>
Reviewed-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
virt/kvm/ioapic.c

index 9d76baa78e89728187901de884e977b0bf8ffaca..76528fff252dfffd1b0ffcd99899905335ed3632 100644 (file)
@@ -189,7 +189,7 @@ void kvm_ioapic_calculate_eoi_exitmap(struct kvm_vcpu *vcpu,
                if (!e->fields.mask &&
                        (e->fields.trig_mode == IOAPIC_LEVEL_TRIG ||
                         kvm_irq_has_notifier(ioapic->kvm, KVM_IRQCHIP_IOAPIC,
-                                index))) {
+                                index) || index == RTC_GSI)) {
                        if (kvm_apic_match_dest(vcpu, NULL, 0,
                                e->fields.dest_id, e->fields.dest_mode))
                                __set_bit(e->fields.vector, (unsigned long *)eoi_exit_bitmap);