From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: [PATCH] KVM: x86: Add instruction length to VCPU event state Date: Sat, 13 Feb 2010 19:41:35 +0100 Message-ID: <4B76F25F.1060009@web.de> References: <4B76762C.10107@web.de> <20100213152635.GA2511@redhat.com> <4B76E638.5010100@web.de> <20100213182253.GB2511@redhat.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig05B185417E31E95D90E46523" Cc: Avi Kivity , Marcelo Tosatti , kvm To: Gleb Natapov Return-path: Received: from fmmailgate03.web.de ([217.72.192.234]:49182 "EHLO fmmailgate03.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754774Ab0BMSml (ORCPT ); Sat, 13 Feb 2010 13:42:41 -0500 In-Reply-To: <20100213182253.GB2511@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig05B185417E31E95D90E46523 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Gleb Natapov wrote: > On Sat, Feb 13, 2010 at 06:49:44PM +0100, Jan Kiszka wrote: >> Gleb Natapov wrote: >>> On Sat, Feb 13, 2010 at 10:51:40AM +0100, Jan Kiszka wrote: >>>> From: Jan Kiszka >>>> >>>> VMX requires a properly set instruction length VM entry field when >>>> trying to inject soft exception and interrupts. We have to preserve = this >>>> state across VM save/restore to avoid breaking the re-injection of s= uch >>>> events on Intel. So add it to the new VCPU event state. >>>> >>> We shouldn't re-inject soft exceptions/interrupts after migration, bu= t >>> re-execute instruction instead. Instruction length field doesn't exis= t >>> on SVM and migration shouldn't expose implementation details. >>> >> Hmm, then I guess this totally untested patch should fly: >> > I don't understand what problem are you trying to solve by your patch. > During normal operation event_exit_inst_len will be set to correct > value. After migration rip will point to int instruction an no even wil= l > be pending at all. Here is the patch: The patch will cause an endless loop if BP interception is enabled. What is the purpose of keeping event_exit_inst_len around? Either we need it also across user space exists, then we have to save/restore or reconstruct it, or we don't need it, then simply drop it. Jan --------------enig05B185417E31E95D90E46523 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.9 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iEYEARECAAYFAkt28mUACgkQitSsb3rl5xTpmACg1bIaRyTleT7uOWoTTxJTF3N2 cE0AmgJgzJHBG41FbJlwocf/HKZg/Aw5 =Lbap -----END PGP SIGNATURE----- --------------enig05B185417E31E95D90E46523--