From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35631) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X9if1-0008DJ-L0 for qemu-devel@nongnu.org; Tue, 22 Jul 2014 18:36:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X9ies-0005zz-H6 for qemu-devel@nongnu.org; Tue, 22 Jul 2014 18:35:51 -0400 Message-ID: <53CEE736.5020103@gmail.com> Date: Wed, 23 Jul 2014 08:35:34 +1000 From: Cyril Bur MIME-Version: 1.0 References: <1405657877-12353-1-git-send-email-cyrilbur@gmail.com> <53C90C20.8070400@redhat.com> <53C90CA6.3060308@suse.de> In-Reply-To: <53C90CA6.3060308@suse.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [Qemu-ppc] [PATCH for-2.2] spapr: add host Linux version information to device tree List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf , Eric Blake , qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org On 18/07/14 22:01, Alexander Graf wrote: > > On 18.07.14 13:59, Eric Blake wrote: >> On 07/17/2014 10:31 PM, cyrilbur@gmail.com wrote: >>> It may prove useful know which Linux distribution version the host >>> machine >>> is running when an issue in the guest arises but a user cannot access >>> the host. >>> >>> Signed-off-by: Cyril Bur >>> --- >>> hw/ppc/spapr.c | 8 +++++++ >>> target-ppc/kvm.c | 62 >>> ++++++++++++++++++++++++++++++++++++++++++++++++++++ >>> target-ppc/kvm_ppc.h | 6 +++++ >>> 3 files changed, 76 insertions(+) >>> >>> diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c >>> index 6b48a26..391d47a 100644 >>> --- a/hw/ppc/spapr.c >>> +++ b/hw/ppc/spapr.c >>> @@ -375,6 +375,14 @@ static void *spapr_create_fdt_skel(hwaddr >>> initrd_base, >>> _FDT((fdt_property_string(fdt, "vm,uuid", buf))); >>> g_free(buf); >>> + /* >>> + * Add info to the guest FDT to tell it what linux the host is >>> + */ >>> + if (kvmppc_get_linux_host(&buf)) { >>> + _FDT((fdt_property_string(fdt, "linux,host", buf))); >>> + g_free(buf); >>> + } >> Ouch. What does this do for migration? By exposing it to the guest, >> you have made it part of the guest ABI, and now you have limited >> yourself to migrate only when the destination host is identical to the >> source if you don't want to risk breaking the guest. Without this, it >> seems feasible to migrate from a machine on an older host to another >> machine on a newer host. > > sPAPR has a mechanism to inject a "post-migration" interrupt into the > guest and provide a device tree diff. That way we can change these > host specific values on the fly after migration happened. > > Maybe it makes sense to hold off these host specific device tree > chunks until after we have that mechanism implemented though. Indeed and the ability to do this is in the kernel but it had not been implemented in qemu yet. Probably not worth doing just for this patch but having this does open the doors to quite a few other things, I'll investigate. Cyril > > Alex >