qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: SVM emulation: EVENTINJ marked valid when a pagefault h


From: Erik van der Kouwe
Subject: [Qemu-devel] Re: SVM emulation: EVENTINJ marked valid when a pagefault happens while issuing a software interrupt
Date: Fri, 28 May 2010 09:45:09 +0200
User-agent: Thunderbird 2.0.0.24 (Windows/20100228)

Hi,

Thankss for your answer.

SVM always clears the vmcb.eventinj on vmrun because every exception is
injected right after vmrun finished and cpu is in guest mode. It can
happen (for example if taking the exception causes a page fault) that
the vmcb.eventinj field is copied to vmcb.exit_int_info.

Yes, this s what I have been experiencing.

In nested-svm you can get a valid exit_int_info when an interrupt or nmi
is pending too. In the software implementation these intercepts are
taken before the event is delivered and you find the event in
vmcb.exit_int_info.
This is not forbidden in the svm architecture and I have not found a
hypervisor that has a problem with this different behavior. I have a
patch here which changes this in nested-svm, but it introduces more
problems than it fixes.

This is a ok, the problem is the event_inj field rather than the exit_int_info field. From what I've seen the SVM specification neither specifies that the CPU writes to this field nor does it explicitly forbid it. Given the unclarity of the specification it may safest to deal with this in the same way as the hardware does (although I don't know which way this is, it seems inuitively unlikely that the hardware would set event_inj to valid).

With kind regards,
Erik



reply via email to

[Prev in Thread] Current Thread [Next in Thread]