From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36477) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V2imj-0001B8-Eq for qemu-devel@nongnu.org; Fri, 26 Jul 2013 10:14:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V2imi-0007wN-Aq for qemu-devel@nongnu.org; Fri, 26 Jul 2013 10:14:21 -0400 Received: from cantor2.suse.de ([195.135.220.15]:59950 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V2imi-0007va-1r for qemu-devel@nongnu.org; Fri, 26 Jul 2013 10:14:20 -0400 Message-ID: <51F28436.5050607@suse.de> Date: Fri, 26 Jul 2013 16:14:14 +0200 From: =?ISO-8859-1?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <51F265ED.3060205@suse.de> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v2] e1000: add interrupt mitigation support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vincenzo Maffione Cc: Anthony Liguori , "Michael S. Tsirkin" , Jason Wang , qemu-devel@nongnu.org, Stefan Hajnoczi , Paolo Bonzini , Giuseppe Lettieri , Luigi Rizzo Am 26.07.2013 15:09, schrieb Vincenzo Maffione: > 2013/7/26 Andreas F=E4rber : >> Am 26.07.2013 12:14, schrieb Vincenzo Maffione: >>> I tried to support cross-version migration using version_id and >>> VMState subsections. >> >> The point of using a subsection is to avoid incrementing version_id AF= AIU. >=20 > Consider a migration from an older QEMU version to a newer one. > AFAIU, the e1000_post_load() callback is passed "1" or "2" into the > "version_id" parameter (i.e. the e1000 version of the older QEMU). > If that is correct, in this scenario I have to zero-init the new > fields I implemented, otherwise they would stay uninitialized. The whole state struct is always zero-initialized as part of object_new()/qdev_create(). So only non-zero fields need to be initialized, and I assume that a zero flag will indicate no mitigation feature. > If I don't increment version_id to 3, how can I understand when we are > in this scenario? >=20 > Or maybe I should assume that (in the same scenario) the new version > QEMU instance MUST have been launched with the mitigation disabled? If > I assume this it seems to me that incrementing version_id to 3 is not > necessary. You can assume that you have equivalent command lines on both source and destination. -M pc-i440fx-1.5 and -M pc-q35-1.5 would simply never receive your subsection. I'm sure Stefan can explain in more detail. Regards, Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg