From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:54205) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S1wQM-0002oZ-Ax for qemu-devel@nongnu.org; Mon, 27 Feb 2012 03:59:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S1wQK-00084S-76 for qemu-devel@nongnu.org; Mon, 27 Feb 2012 03:59:14 -0500 Received: from fmmailgate06.web.de ([217.72.192.247]:41308) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S1wQJ-00083y-TS for qemu-devel@nongnu.org; Mon, 27 Feb 2012 03:59:12 -0500 Received: from moweb001.kundenserver.de (moweb001.kundenserver.de [172.19.20.114]) by fmmailgate06.web.de (Postfix) with ESMTP id 9C1D8D03E82 for ; Mon, 27 Feb 2012 09:59:10 +0100 (CET) Message-ID: <4F4B45DB.9050006@web.de> Date: Mon, 27 Feb 2012 09:59:07 +0100 From: Jan Kiszka MIME-Version: 1.0 References: <4F4AF1FB.6000903@cn.fujitsu.com> <4F4AF316.50400@cn.fujitsu.com> In-Reply-To: <4F4AF316.50400@cn.fujitsu.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigBA2BB33408ED998A43948EF5" Subject: Re: [Qemu-devel] [PATCH]qemu: deal with guest paniced event List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Wen Congyang Cc: kvm list , qemu-devel , linux-kernel@vger.kernel.org, Avi Kivity , KAMEZAWA Hiroyuki This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigBA2BB33408ED998A43948EF5 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 2012-02-27 04:05, Wen Congyang wrote: > When the host knows the guest is paniced, it will set > exit_reason to KVM_EXIT_GUEST_PANIC. So if qemu receive > this exit_reason, we can send a event to tell management > application that the guest is paniced. >=20 > Signed-off-by: Wen Congyang > --- > kvm-all.c | 3 +++ > linux-headers/linux/kvm.h | 1 + > monitor.c | 3 +++ > monitor.h | 1 + > 4 files changed, 8 insertions(+), 0 deletions(-) >=20 > diff --git a/kvm-all.c b/kvm-all.c > index c4babda..ae428ab 100644 > --- a/kvm-all.c > +++ b/kvm-all.c > @@ -1190,6 +1190,9 @@ int kvm_cpu_exec(CPUState *env) > (uint64_t)run->hw.hardware_exit_reason); > ret =3D -1; > break; > + case KVM_EXIT_GUEST_PANIC: > + monitor_protocol_event(QEVENT_GUEST_PANICED, NULL); > + break; > case KVM_EXIT_INTERNAL_ERROR: > ret =3D kvm_handle_internal_error(env, run); > break; > diff --git a/linux-headers/linux/kvm.h b/linux-headers/linux/kvm.h > index f6b5343..45dd031 100644 > --- a/linux-headers/linux/kvm.h > +++ b/linux-headers/linux/kvm.h > @@ -163,6 +163,7 @@ struct kvm_pit_config { > #define KVM_EXIT_OSI 18 > #define KVM_EXIT_PAPR_HCALL 19 > #define KVM_EXIT_S390_UCONTROL 20 > +#define KVM_EXIT_GUEST_PANIC 21 > =20 > /* For KVM_EXIT_INTERNAL_ERROR */ > #define KVM_INTERNAL_ERROR_EMULATION 1 linux-headers are supposed to be synchronized in a separate patch, naming the upstream or kvm.git hash they pull in. IOW: the KVM ABI change has to be applied first. Jan --------------enigBA2BB33408ED998A43948EF5 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/ iEYEARECAAYFAk9LRdsACgkQitSsb3rl5xRiKQCfbgf64DlS94jkS2j5vN2sTH7o QcIAoO/32Gu2YCA4RArhiyhe4OjHF2Fc =vmKJ -----END PGP SIGNATURE----- --------------enigBA2BB33408ED998A43948EF5--