From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58943) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XLsGB-0003R4-Qb for qemu-devel@nongnu.org; Mon, 25 Aug 2014 07:16:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XLsG5-0003VA-Er for qemu-devel@nongnu.org; Mon, 25 Aug 2014 07:16:27 -0400 Received: from mail-pd0-f178.google.com ([209.85.192.178]:64935) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XLsG5-0003V0-AU for qemu-devel@nongnu.org; Mon, 25 Aug 2014 07:16:21 -0400 Received: by mail-pd0-f178.google.com with SMTP id w10so19885382pde.23 for ; Mon, 25 Aug 2014 04:16:16 -0700 (PDT) Message-ID: <53FB1AF8.7050503@ozlabs.ru> Date: Mon, 25 Aug 2014 21:16:08 +1000 From: Alexey Kardashevskiy MIME-Version: 1.0 References: <1408962121-8867-1-git-send-email-aik@ozlabs.ru> <53FB0EB9.8090904@suse.de> In-Reply-To: <53FB0EB9.8090904@suse.de> Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC PATCH] vmstate: Enable custom migration block name check List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf , qemu-devel@nongnu.org On 08/25/2014 08:23 PM, Alexander Graf wrote: > > > On 25.08.14 12:22, Alexey Kardashevskiy wrote: >> This adds a callback to support custom names for migration blocks. >> >> Signed-off-by: Alexey Kardashevskiy >> --- >> >> RFC! not a real patch! >> >> There was a problem a while ago how to migrate sPAPR TCE tables - they >> needed unique id + instance_id and there 2 approaches for that: >> >> 1. Put them on a virtual made-up TCE bus, LIOBN (logical bus number) is >> an unique ID and this would give TCE tables unique names like >> liobn@80000000/spapr_iommu, instance id would always be 0. >> >> vmstate_spapr_tce_table would be registered via DeviceClass::vmsd pointer. >> >> 2. Do not register vmsd via DeviceClass and use explicit call of >> vmstate_register() using LIOBN as an instance id. This way TCE tables would >> get "spapr_iommu" name and unique id == LIOBN. >> >> Approach 2 is used by upstream. >> >> Both 1 and 2 were suggested by maintainers :) However with 1 month delay >> and I started using 1) in our internal build of "powerkvm". >> >> In the current version of our internal "powerkvm" thing I used 2) as this >> is what upstream uses. >> >> >> The proposed patch is a part of a hack to allow migration >> liobn@80000000/spapr_iommu + 0 to spapr_iommu + 80000000. >> >> >> Is this too horrible to be considered as a patch for upstream? > > Is there any reason you can't keep this patch in your downstream fork > along with the user of it? :) I can and most likely will. But someone else could benefit from it sometime later, dunno, there are already manymany callbacks, why not one more :) But mostly - I actually want to know if what patch does can be done without it. Enormous amount of callbacks and flags tell me that it is possible, I am just not smart enough to see it :) -- Alexey