From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:37132) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RqsjG-0002a0-Ad for qemu-devel@nongnu.org; Fri, 27 Jan 2012 15:49:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RqsjF-0002eG-A3 for qemu-devel@nongnu.org; Fri, 27 Jan 2012 15:49:02 -0500 Received: from e37.co.us.ibm.com ([32.97.110.158]:44425) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RqsjE-0002cl-Vd for qemu-devel@nongnu.org; Fri, 27 Jan 2012 15:49:01 -0500 Received: from /spool/local by e37.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 27 Jan 2012 13:48:58 -0700 Received: from d03relay02.boulder.ibm.com (d03relay02.boulder.ibm.com [9.17.195.227]) by d03dlp01.boulder.ibm.com (Postfix) with ESMTP id B67B81FF0049 for ; Fri, 27 Jan 2012 13:48:36 -0700 (MST) Received: from d03av03.boulder.ibm.com (d03av03.boulder.ibm.com [9.17.195.169]) by d03relay02.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q0RKmSi1177146 for ; Fri, 27 Jan 2012 13:48:33 -0700 Received: from d03av03.boulder.ibm.com (loopback [127.0.0.1]) by d03av03.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q0RKmR9N025589 for ; Fri, 27 Jan 2012 13:48:28 -0700 Message-ID: <4F230D9A.8020502@us.ibm.com> Date: Fri, 27 Jan 2012 14:48:26 -0600 From: Anthony Liguori MIME-Version: 1.0 References: <1326824856-15041-1-git-send-email-emunson@mgebm.net> In-Reply-To: <1326824856-15041-1-git-send-email-emunson@mgebm.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH V7] Guest stop notification List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric B Munson Cc: ryanh@linux.vnet.ibm.com, kvm@vger.kernel.org, Jan Kiszka , Marcelo Tosatti , qemu-devel@nongnu.org, Avi Kivity On 01/17/2012 12:27 PM, Eric B Munson wrote: > Often when a guest is stopped from the qemu console, it will report spurious > soft lockup warnings on resume. There are kernel patches being discussed that > will give the host the ability to tell the guest that it is being stopped and > should ignore the soft lockup warning that generates. This patch uses the qemu > Notifier system to tell the guest it is about to be stopped. > > Signed-off-by: Eric B Munson > > Cc: Avi Kivity > Cc: Marcelo Tosatti > Cc: Jan Kiszka > Cc: ryanh@linux.vnet.ibm.com > Cc: aliguori@us.ibm.com > Cc: kvm@vger.kernel.org > --- > Changes from V6: > Remove unnecessary include > > Changes from V5: > KVM_GUEST_PAUSED is now a per vm ioctl instead of per vcpu > > Changes from V4: > Test if the guest paused capability is available before use > > Changes from V3: > Collapse new state change notification function into existsing function. > Correct whitespace issues > Change ioctl name to KVMCLOCK_GUEST_PAUSED > Use for loop to iterate vpcu's > > Changes from V2: > Move ioctl into hw/kvmclock.c so as other arches can use it as it is > implemented > > Changes from V1: > Remove unnecessary encapsulating function > > hw/kvmclock.c | 11 +++++++++++ > 1 files changed, 11 insertions(+), 0 deletions(-) > > diff --git a/hw/kvmclock.c b/hw/kvmclock.c > index 3b9fb20..ad79f52 100644 > --- a/hw/kvmclock.c > +++ b/hw/kvmclock.c > @@ -64,10 +64,21 @@ static int kvmclock_post_load(void *opaque, int version_id) > static void kvmclock_vm_state_change(void *opaque, int running, > RunState state) > { > + int ret; > KVMClockState *s = opaque; > + int cap_guest_paused = kvm_check_extension(kvm_state, KVM_CAP_GUEST_PAUSED); > > if (running) { > s->clock_valid = false; > + > + if (!cap_guest_paused) { > + return; > + } > + > + ret = kvm_vm_ioctl(kvm_state, KVMCLOCK_GUEST_PAUSED, 0); > + if (ret) { > + fprintf(stderr, "kvmclock_vm_state_change: %s\n", strerror(-ret)); > + } > } > } This change looks harmless enough. What's the state of the kernel bits? I would expect this through uq/master. Regards, Anthony Liguori >