>>> On Tue, Apr 10, 2007 at 11:39 AM, in message <[EMAIL PROTECTED]>, Gregory Haskins wrote: > We could change the API to handle the pending condition as a tri-level
I just thought of a better way. Leave the return value as a boolean, but use the concept of the mask_reasons. It simplifies the logic, and allows the irqdevice to register for additional VMEXITs regardless of whether its currently injecting something or not. So we have: spin_lock(vcpu- >irq_lock) vcpu->exit_reasons = 0; nmi = !irq_window_open(vcpu) if (vcpu- >irq- >pending(nmi, &mask_reasons)) inject(vcpu, vcpu- >irq- >read_vector(nmi)) if (mask_reasons) { if (mask_reasons & MASKREASON_TPR) vcpu->exit_reasons &= TPR; /* etc */ } spin_unlock(vcpu- >irq_lock) ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel