From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:33548) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rqtfb-0006dS-9C for qemu-devel@nongnu.org; Fri, 27 Jan 2012 16:49:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RqtfZ-0003Sm-Hx for qemu-devel@nongnu.org; Fri, 27 Jan 2012 16:49:19 -0500 Received: from fmmailgate03.web.de ([217.72.192.234]:44002) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RqtfZ-0003S0-8s for qemu-devel@nongnu.org; Fri, 27 Jan 2012 16:49:17 -0500 Received: from moweb002.kundenserver.de (moweb002.kundenserver.de [172.19.20.108]) by fmmailgate03.web.de (Postfix) with ESMTP id 1D8A31B074F8E for ; Fri, 27 Jan 2012 22:49:16 +0100 (CET) Message-ID: <4F231BD9.70302@web.de> Date: Fri, 27 Jan 2012 22:49:13 +0100 From: Jan Kiszka MIME-Version: 1.0 References: <1326824856-15041-1-git-send-email-emunson@mgebm.net> <4F230D9A.8020502@us.ibm.com> In-Reply-To: <4F230D9A.8020502@us.ibm.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig28D611ABEC3300E7FAE77D11" Subject: Re: [Qemu-devel] [PATCH V7] Guest stop notification List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: ryanh@linux.vnet.ibm.com, kvm@vger.kernel.org, Marcelo Tosatti , qemu-devel@nongnu.org, Alexander Graf , Avi Kivity , Eric B Munson This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig28D611ABEC3300E7FAE77D11 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 2012-01-27 21:48, Anthony Liguori wrote: > 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 =3D opaque; >> + int cap_guest_paused =3D kvm_check_extension(kvm_state, >> KVM_CAP_GUEST_PAUSED); >> >> if (running) { >> s->clock_valid =3D false; >> + >> + if (!cap_guest_paused) { >> + return; >> + } >> + >> + ret =3D kvm_vm_ioctl(kvm_state, KVMCLOCK_GUEST_PAUSED, 0); >> + if (ret) { >> + fprintf(stderr, "kvmclock_vm_state_change: %s\n", >> strerror(-ret)); >> + } >> } >> } >=20 >=20 > This change looks harmless enough. Yep, but needs to be redirected after the file renaming in upstream. > What's the state of the kernel > bits? I would expect this through uq/master. Kernel bits aren't merged yet. And the kernel headers will have to be updated in a previous step. BTW, this series [1] would be nice to have. Dunno if there is a pull planned, but anyone trying to extend the KVM interface current runs against this. Jan [1] http://thread.gmane.org/gmane.comp.emulators.qemu/132962 --------------enig28D611ABEC3300E7FAE77D11 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk8jG9kACgkQitSsb3rl5xSucwCgmyA+6gd4I9g+ax+ZXGgxUp7G QjoAn0lE9ZfjzLJWfQ88GWqGyin3GmKS =bURZ -----END PGP SIGNATURE----- --------------enig28D611ABEC3300E7FAE77D11--