Il 01/08/2014 10:12, Wanpeng Li ha scritto: > +int kvm_lapic_ack_apicv(struct kvm_vcpu *vcpu) > +{ > + struct kvm_lapic *apic = vcpu->arch.apic; > + int vec; > + > + vec = kvm_apic_has_interrupt(vcpu); > + > + if (vec == -1) > + return vec; > + > + apic_set_vector(vec, apic->regs + APIC_ISR); > + apic_update_ppr(apic); > + apic_clear_vector(vec, apic->regs + APIC_IRR); > + > + return vec; > +} > +EXPORT_SYMBOL_GPL(kvm_lapic_ack_apicv); I would prefer reusing kvm_get_apic_interrupt here (by modifying kvm_cpu_get_interrupt, apic_set_isr and apic_clear_irr) as I had sketched in the previous version of the patches. There is no reason for kvm_cpu_get_interrupt to return -1 if virtual interrupt delivery is enabled. Paolo -- 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