From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: [PATCH] qemu-kvm: x86: Fix mismerge in cpu_post_load Date: Sun, 06 Dec 2009 11:39:22 +0100 Message-ID: <4B1B89DA.6030004@web.de> References: <4B18018D.1060305@siemens.com> <4B1B7F65.2040904@redhat.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigCEA81EFFE958FD207D8AF368" Cc: Marcelo Tosatti , kvm , Gleb Natapov To: Avi Kivity Return-path: Received: from fmmailgate03.web.de ([217.72.192.234]:40447 "EHLO fmmailgate03.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933221AbZLFKj1 (ORCPT ); Sun, 6 Dec 2009 05:39:27 -0500 In-Reply-To: <4B1B7F65.2040904@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigCEA81EFFE958FD207D8AF368 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Avi Kivity wrote: > On 12/03/2009 08:21 PM, Jan Kiszka wrote: >> Merge 8e2c5ec2f6 forgot to restore some qemu-kvm-specific hooks in >> cpu_post_load. mp_state was readded later on, but tsc was missing, >> breaking the guest timing after resume. Also, reset of halt was droppe= d >> which is obviously required for in-kernel irqchip. >> =20 >=20 > Applied, thanks. >=20 >> BTW, this patch just made me realize that the TSC MSR belongs to the >> list states that should not be written back unconditionally. Upstream >> does this currently, qemu-kvm not (at the price one more kvm-specific >> hook into generic code). >=20 > Yet another reminder why we don't rewrite, only refactor. Which also has it's downsides like slow merging progress with quite a few subtle merge regressions on qemu-kvm side... >=20 >> Unlike the other states we discussed, this one >> is not "fixable" in the kernel. So I tend to think there is a real nee= d >> for my write-back scope abstraction - which would also be able to hand= le >> the other states cleanly, both in upstream and here. >> =20 >=20 > Yes. Gleb suggested treating mpstate/nmi as part of the APIC state > (which makes sense), which would work, as APIC state is not > automatically written back. But the tsc msr would need special treatme= nt. (just realized that I forgot to answer him) While this would make sense for mpstate, NMIs are not coupled to the APICs. The APIC just happens to be one source for them (though a common one). So if there is no in-kernel APIC state, there would never be a write-back of the NMI state, which is bad. That said, I think we should hurry to add some mask to the new KVM_SET_VCPU_EVENTS (for 2.6.33) in order to skip nmi_pending and sipi_vector, giving us maximum flexibility how to address the issue. Will send a patch later. Jan --------------enigCEA81EFFE958FD207D8AF368 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 iEYEARECAAYFAksbieMACgkQitSsb3rl5xQf6gCeMxx/77pF1rTzKQr91TX3gv9S k8kAnRREZiuwpcCgf7bNx4acCMIeyU6h =J0KJ -----END PGP SIGNATURE----- --------------enigCEA81EFFE958FD207D8AF368--