From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: [PATCH v2 14/17] kvm: x86: Introduce kvmclock device to save/restore its state Date: Mon, 03 Jan 2011 17:30:27 +0100 Message-ID: <4D21F9A3.6030404@web.de> References: <4D21F3A5.1030905@redhat.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig26063225B3DD7A9007B3761F" Cc: Marcelo Tosatti , kvm@vger.kernel.org, qemu-devel@nongnu.org, Jan Kiszka , Glauber Costa To: Avi Kivity Return-path: Received: from fmmailgate03.web.de ([217.72.192.234]:35438 "EHLO fmmailgate03.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755385Ab1ACQae (ORCPT ); Mon, 3 Jan 2011 11:30:34 -0500 In-Reply-To: <4D21F3A5.1030905@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig26063225B3DD7A9007B3761F Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Am 03.01.2011 17:04, Avi Kivity wrote: > On 01/03/2011 10:33 AM, Jan Kiszka wrote: >> From: Jan Kiszka >> >> If kvmclock is used, which implies the kernel supports it, register a >> kvmclock device with the sysbus. Its main purpose is to save and resto= re >> the kernel state on migration, but this will also allow to visualize i= t >> one day. >> >=20 > kvmclock is a per-cpu affair. Nope, it's state (the one save/restored here) is per VM. >=20 >> >> @@ -534,6 +599,10 @@ int kvm_arch_init(int smp_cpus) >> int ret; >> struct utsname utsname; >> >> +#ifdef KVM_CAP_ADJUST_CLOCK >> + sysbus_register_withprop(&kvmclock_info); >> +#endif >> + >=20 > So this doesn't look right. I think we're fine with just migrating the= > MSRs, like we migrate anything else that has to do with the cpu. >=20 The kvmclock state is not contained in any MSR. It's an independent machine state that can be indirectly obtained via MSR access. Therefore, qemu-kvm currently registers only one vmstate entry per machine, and this patch just turns this into a clean device - because that's what kvmclock is in the end, something like an HPET. Jan --------------enig26063225B3DD7A9007B3761F 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/ iEUEARECAAYFAk0h+agACgkQitSsb3rl5xRY3ACXWdZR7JN0ByEGACTZ+mwFEonk GgCg0v2xq8oAPI/tkhMv44SBevD/Il4= =s1z8 -----END PGP SIGNATURE----- --------------enig26063225B3DD7A9007B3761F--