From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: [PATCH] kvm-vmx: add module parameter to avoid trapping HLT instructions (v2) Date: Sat, 04 Dec 2010 07:30:05 -0600 Message-ID: <4CFA425D.3010100@codemonkey.ws> References: <1291298357-5695-1-git-send-email-aliguori@us.ibm.com> <20101202173733.GA26342@amt.cnet> <4CF7EE63.40209@codemonkey.ws> <20101202201223.GA31316@amt.cnet> <4CF806E7.1090404@codemonkey.ws> <4CF8BA34.1000508@redhat.com> <4CF9730C.7040904@codemonkey.ws> <4CF9F83C.5040807@redhat.com> 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: Avi Kivity Return-path: Received: from mail-yx0-f174.google.com ([209.85.213.174]:33137 "EHLO mail-yx0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755011Ab0LDNaI (ORCPT ); Sat, 4 Dec 2010 08:30:08 -0500 Received: by yxt3 with SMTP id 3so4751156yxt.19 for ; Sat, 04 Dec 2010 05:30:07 -0800 (PST) In-Reply-To: <4CF9F83C.5040807@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 12/04/2010 02:13 AM, Avi Kivity wrote: > On 12/04/2010 12:45 AM, Anthony Liguori wrote: >>> hlt exiting doesn't leave vcpu in the halted state (since hlt has >>> not been executed). So currently we never see a vcpu in halted state. >> >> >> Right, you mean the guest activity state being halt. >> >> My understanding is that it just needs to be cleared on exception >> injection. Would could clear it at every vmentry but that would >> introduce a vmcs_read() to the fast path which is undesirable. > > Also need to skip the hlt instruction (by calling the emulator for > example). I wasn't sure about this. Don't you want EIP to point to the beginning of the instruction such that the exception will cause the instruction to restart? Regards, Anthony Liguori