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: Mon, 06 Dec 2010 10:33:51 -0600 Message-ID: <4CFD106F.3020402@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> <4CFA425D.3010100@codemonkey.ws> <4CFC9EC6.3010108@redhat.com> <4CFCA06B.9030406@redhat.com> <4CFCEBE9.2010107@codemonkey.ws> <4CFCECA6.3030007@redhat.com> <4CFCED32.3020803@codemonkey.ws> <4CFCF41F.4000905@redhat.com> <4CFCFC19.3010502@codemonkey.ws> <4CFCFE31.8020406@redhat.com> <4CFD0D6F.1030509@codemonkey.ws> <4CFD0F91.5030005@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]:37237 "EHLO mail-yx0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751429Ab0LFQd4 (ORCPT ); Mon, 6 Dec 2010 11:33:56 -0500 Received: by yxt3 with SMTP id 3so5576247yxt.19 for ; Mon, 06 Dec 2010 08:33:55 -0800 (PST) In-Reply-To: <4CFD0F91.5030005@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 12/06/2010 10:30 AM, Avi Kivity wrote: > On 12/06/2010 06:21 PM, Anthony Liguori wrote: >>> No, right now we intercept SHUTDOWN (and turn it back, in qemu, into >>> a RESET), and we emulate all the SIPI stuff. We also intercepted >>> HLT so we couldn't get that activity state either. >> >> >> Ok, looks like I need to make this per-VM and use a CAP along with an >> interface to enable it to ensure that userspace to ensure it gets >> saved/restored appropriately. I'll rework it. > > Not really, it's not any different from the ordinary intercepted HLT. > Put the halted state where we currently put it (hint: nowhere), and > all is fine. > > So we have a minor bug that we don't save/restore HLT state (either > emulated or "real" with your patch), that causes a spurious wakeup > after live migration. Fair enough. I certainly likes fixes that do nothing :-) > Note for your respin, yield_on_hlt became __read_often again, so > please make it __read_mostly. Done. Regards, Anthony Liguori