On Thu, Dec 13, 2012 at 01:09:11AM +0000, Zhang, Yang Z wrote: > >> +static void ioapic_update_eoi_exitmap_one(struct kvm_ioapic *ioapic, int pin) > >> +{ > >> + union kvm_ioapic_redirect_entry *e; > >> + > >> + e = &ioapic->redirtbl[pin]; > >> + > >> + if ((e->fields.trig_mode == IOAPIC_LEVEL_TRIG || > >> + kvm_irq_has_notifier(ioapic->kvm, KVM_IRQCHIP_IOAPIC, pin))) { > >> + struct kvm_lapic_irq irqe; > >> + > >> + irqe.dest_id = e->fields.dest_id; > >> + irqe.vector = e->fields.vector; > >> + irqe.dest_mode = e->fields.dest_mode; > >> + irqe.delivery_mode = e->fields.delivery_mode << 8; > >> + kvm_update_eoi_exitmap(ioapic->kvm, &irqe); > >> + } > >> +} > >> + > > There is a bugs in exitbitmap recalculation that I've missed. > > We need to zero all the exit bitmaps for all vcpus before we are > > starting to recalculate them to get rid of stale bits. > Right. I forget it too. So if consider to clear it, we should call ioapic_update_eoi_exitmap instead ioapic_update_eoi_exitmap_one when programming one program ioapic entry. > Yes. -- Gleb. -- 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