From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] kvm-vmx: add module parameter to avoid trapping HLT instructions (v2) Date: Sat, 04 Dec 2010 10:16:34 +0200 Message-ID: <4CF9F8E2.4030602@redhat.com> References: <1291298357-5695-1-git-send-email-aliguori@us.ibm.com> <20101202173733.GA26342@amt.cnet> <4CF97258.9010808@codemonkey.ws> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Marcelo Tosatti , kvm@vger.kernel.org, Chris Wright , Srivatsa Vaddagiri To: Anthony Liguori Return-path: Received: from mx1.redhat.com ([209.132.183.28]:61575 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754658Ab0LDIQn (ORCPT ); Sat, 4 Dec 2010 03:16:43 -0500 In-Reply-To: <4CF97258.9010808@codemonkey.ws> Sender: kvm-owner@vger.kernel.org List-ID: 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.