From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: [PATCH v2 11/17] kvm: x86: Reset paravirtual MSRs Date: Mon, 03 Jan 2011 17:46:04 +0100 Message-ID: <4D21FD4C.8040708@web.de> References: <54192ab9004ed6b528de0846d6a83df432addcd5.1294043582.git.jan.kiszka@web.de> <1294072813.5370.25.camel@mothafucka.localdomain> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig586ECCF28A1E759710CB8BD8" Cc: Avi Kivity , Marcelo Tosatti , kvm@vger.kernel.org, qemu-devel@nongnu.org, Jan Kiszka To: Glauber Costa Return-path: Received: from fmmailgate01.web.de ([217.72.192.221]:42950 "EHLO fmmailgate01.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932069Ab1ACQqI (ORCPT ); Mon, 3 Jan 2011 11:46:08 -0500 In-Reply-To: <1294072813.5370.25.camel@mothafucka.localdomain> Sender: kvm-owner@vger.kernel.org List-ID: 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--