From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: Save/Restore not working Date: Tue, 19 Jul 2011 22:09:04 +0200 Message-ID: <4E25E460.3010601@web.de> References: <20110719172001.GB31673@amt.cnet> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigC61E5E84AEE791E77084D6CB" Cc: Frank Berreth , kvm@vger.kernel.org To: Marcelo Tosatti Return-path: Received: from fmmailgate02.web.de ([217.72.192.227]:48050 "EHLO fmmailgate02.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751365Ab1GSUJG (ORCPT ); Tue, 19 Jul 2011 16:09:06 -0400 In-Reply-To: <20110719172001.GB31673@amt.cnet> Sender: kvm-owner@vger.kernel.org List-ID: This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigC61E5E84AEE791E77084D6CB Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 2011-07-19 19:20, Marcelo Tosatti wrote: > On Mon, Jul 18, 2011 at 03:46:56PM -0700, Frank Berreth wrote: >> Hello, >> >> I am working on save/restore code (independent of Qemu or KVM tools) >> and am having trouble doing 'the right thing' with KVM it seems. I do >> have trouble finding good documentation on specifically save or >> restore (besides the description of IOCTLs) and there is a high chance= >> I am doing something goofy here. >> >> The way I am save/restoring is simply saving the state I get through >> the different KVM IOCTLs and dumping it back on restore. The exception= >> is restoring of the MSRs, where I first get the list, then get the >> MSRS and save/restore only those that were filled in by KVM. >> >> The restore order is the following: >> >> first restore memory, then >> KVM_SET_REGS >> KVM_SET_FPU >> KVM_SET_SREGS >> KVM_SET_MSRS >> KVM_SET_MPSTATE >> KVM_SET_LAPIC >> some user mode devices and then >> KVM_SET_PIT >> KVM_SET_IRQCHIP (3 times, for MASTER, SLAVE and IOAPIC) >=20 > KVM_SET_VCPU_EVENTS is missing from this list. =2E..and some more. As Marcelo said, follow QEMU closely. It's the reference implementation and known to work pretty well. Just curious: What is the reason for another probably painful rewrite of QEMU? Jan --------------enigC61E5E84AEE791E77084D6CB 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.16 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk4l5GAACgkQitSsb3rl5xTp0ACg0uiLgKGMR4XER7V5JkXq11iP K3wAoII5mY4J5/btsgBnNZYpGYoCd53s =vJA7 -----END PGP SIGNATURE----- --------------enigC61E5E84AEE791E77084D6CB--