From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=50926 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PZnXx-0002NW-2C for qemu-devel@nongnu.org; Mon, 03 Jan 2011 11:46:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PZnXs-00024W-Nr for qemu-devel@nongnu.org; Mon, 03 Jan 2011 11:46:10 -0500 Received: from fmmailgate01.web.de ([217.72.192.221]:42941) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PZnXs-00024E-D0 for qemu-devel@nongnu.org; Mon, 03 Jan 2011 11:46:08 -0500 Message-ID: <4D21FD4C.8040708@web.de> Date: Mon, 03 Jan 2011 17:46:04 +0100 From: Jan Kiszka MIME-Version: 1.0 References: <54192ab9004ed6b528de0846d6a83df432addcd5.1294043582.git.jan.kiszka@web.de> <1294072813.5370.25.camel@mothafucka.localdomain> In-Reply-To: <1294072813.5370.25.camel@mothafucka.localdomain> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig586ECCF28A1E759710CB8BD8" Sender: jan.kiszka@web.de Subject: [Qemu-devel] Re: [PATCH v2 11/17] kvm: x86: Reset paravirtual MSRs List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Glauber Costa Cc: Jan Kiszka , Marcelo Tosatti , Avi Kivity , kvm@vger.kernel.org, qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig586ECCF28A1E759710CB8BD8 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Am 03.01.2011 17:40, Glauber Costa wrote: > On Mon, 2011-01-03 at 09:33 +0100, Jan Kiszka wrote: >> From: Jan Kiszka >> >> Make sure to clear MSR_KVM_SYSTEM_TIME, MSR_KVM_WALL_CLOCK, and >> MSR_KVM_ASYNC_PF_EN so that a freshly booted guest cannot be disturbed= >> by old values. >> >> Signed-off-by: Jan Kiszka >> CC: Glauber Costa >> --- >> target-i386/kvm.c | 10 ++++++++++ >> 1 files changed, 10 insertions(+), 0 deletions(-) >> >> diff --git a/target-i386/kvm.c b/target-i386/kvm.c >> index d8f26bf..664a4a0 100644 >> --- a/target-i386/kvm.c >> +++ b/target-i386/kvm.c >> @@ -453,6 +453,9 @@ void kvm_arch_reset_vcpu(CPUState *env) >> env->nmi_injected =3D 0; >> env->nmi_pending =3D 0; >> env->xcr0 =3D 1; >> + env->system_time_msr =3D 0; >> + env->wall_clock_msr =3D 0; >> + env->async_pf_en_msr =3D 0; >=20 > Have you seen this happening? I'd expect CPUState to be zeroed out over= > init. And if it is not, I guess we should... Ah, true, those three are part of the section that is zeroed. Will drop that hunk on repost. Guess we should rather move some other variables in that region too and avoid clearing them manually like above... Jan --------------enig586ECCF28A1E759710CB8BD8 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.15 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/ iEYEARECAAYFAk0h/UwACgkQitSsb3rl5xTPlgCfSSGE0dOwIEv+6wMHfAwGxQ++ CuMAnRr3oek51UpBl7cVd37uvEIXu8jF =MQ0w -----END PGP SIGNATURE----- --------------enig586ECCF28A1E759710CB8BD8--