Re: [PATCH] kvm-vmx: add module parameter to avoid trapping HLT instructions (v2)

Avi Kivity
2010-12-04T08:16:43Z

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).

--
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.