On 12/04/2010 02:16 AM, Avi Kivity wrote:
On 12/04/2010 12:42 AM, Anthony Liguori wrote:

In v3, I set the activity state to ACTIVE if the state is currently HLT when injecting an exception into a guest.

The effect is that after the exception is handled, if iret is executed, the hlt instruction will be restarted. The seems like the correct semantics to me.

No, an interrupt causes the HLT to be executed, and rip advanced past it. You need to preserve this (both for interrupts and for the apf completion exception).

Yeah, I see in the architecture manual it specifically calls out the rip advancing after NMI. It doesn't say anything about debug exceptions though. It's not clear to me if some exceptions cause hlt to be skipped and others not.

But then again, skipping hlt seems to be the most conservative thing to do for all exceptions because it's always going to be run in a loop.

Regards,

Anthony Liguori

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to