On Mon, Jun 14, 2010, Avi Kivity wrote about "Re: [PATCH 20/24] Correct handling of interrupt injection": >.. > >However, properly doing what is described above requires invasive changes > >to > >the flow of the existing code, which we elected not to do in this stage. > >Instead we do something more simplistic and less efficient: we modify >... > > That's a little sad. I agree. I'd like to change this code to do the proper thing (as I explained in the patch's description), but as I said this will require some invasive changes to existing KVM code outside vmx.c. So seeing that this existing code also works, and despite hurting performance a bit there are much more pressing performance issues (namely, the need for nested EPT) - with your permission I'd like to postpone fixing this issue. > > static int vmx_interrupt_allowed(struct kvm_vcpu *vcpu) > > { > >+ if (to_vmx(vcpu)->nested.nested_mode&& nested_exit_on_intr(vcpu)) { > >+ if (to_vmx(vcpu)->nested.nested_run_pending) > >+ return 0; > >+ nested_vmx_vmexit(vcpu, true); > >+ /* fall through to normal code, but now in L1, not L2 */ > >+ } > >+ > > > > What exit is reported here? When nested_vmx_vmexit is called with the second parameter true, as above, it modifies the (vmcs12) exit reason to be EXIT_REASON_EXTERNAL_INTERRUPT. A hack, but it does the right thing in this case because L1 doesn't even get a chance to care about this exit reason before it exits again (as I tried to explain in the patch's description). -- Nadav Har'El | Thursday, Sep 16 2010, 8 Tishri 5771 nyh@xxxxxxxxxxxxxxxxxxx |----------------------------------------- Phone +972-523-790466, ICQ 13349191 |Debugging: the art of removing bugs. http://nadav.harel.org.il |Programming: the art of inserting them. -- 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