Received: from eggs.gnu.org ([2001:4830:134:3::10]:55161) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bQL6q-0004m0-Hq for qemu-devel@nongnu.org; Thu, 21 Jul 2016 17:02:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bQL6m-0002rE-R6 for qemu-devel@nongnu.org; Thu, 21 Jul 2016 17:02:19 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55487) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bQL6m-0002qw-LT for qemu-devel@nongnu.org; Thu, 21 Jul 2016 17:02:16 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 07686562CA for ; Thu, 21 Jul 2016 21:02:16 +0000 (UTC) References: <1469095928-5816-1-git-send-email-lvivier@redhat.com> <28cbdb75-ff4d-bd3a-95a1-6edbc1379084@redhat.com> <2f1dde17-396d-9848-4fd9-4722b92decf6@redhat.com> From: Thomas Huth Message-ID: <924176ac-6978-9e44-1001-9ea4011adc2b@redhat.com> Date: Thu, 21 Jul 2016 23:02:12 +0200 MIME-Version: 1.0 In-Reply-To: <2f1dde17-396d-9848-4fd9-4722b92decf6@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] test: port postcopy test to ppc64 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Laurent Vivier , qemu-devel@nongnu.org Cc: dgilbert@redhat.com, dgibson@redhat.com On 21.07.2016 15:46, Laurent Vivier wrote: > > > On 21/07/2016 15:16, Thomas Huth wrote: >> On 21.07.2016 12:12, Laurent Vivier wrote: >>> As userfaultfd syscall is available on powerpc, migration >>> postcopy can be used. >> >> Good idea to add this test for PPC, too! > > The idea comes from David Gilbert :) > Thanks David! > >> >>> This patch adds the support needed to test this on powerpc, >>> instead of using a bootsector to run code to modify memory, >>> we use a FORTH script in "boot-command" property. >>> >>> As spapr machine doesn't support "-prom-env" argument >>> (the nvram is initialized by SLOF and not by QEMU), >>> "boot-command" is provided to SLOF via a file mapped nvram >>> (with "-drive file=...,if=pflash") >> >> I wonder whether we could easily add support for the "-prom-env" >> parameter for the sPAPR machine, too, since the NVRAM layout seems to be >> pretty much the same as on the old CHRP Mac machines...? > > The only thing we need to have "-prom-env" is to initialize the nvram > partitions in QEMU if they don't exist. > > I didn't follow this way because this work is normally to be done by the > firmware not by QEMU. If we do it in QEMU, SLOF will do not, and we > can't be sure we are doing the things well, as SLOF does. I'm slightly familiar with the NVRAM code in SLOF ... shouldn't be too hard to get a similar layout done with QEMU, especially if we can re-use some of the OpenBIOS NVRAM functions in QEMU. > On Mac, it is another history, originally, firmware was OpenHackware, > not OpenBIOS, and OH was only here to allow to boot the kernel nothing > more (it was really a hack: there was not forth interpreter [oh, my god!]). > So all the important stuffs were done by QEMU, like to initialize the > NVRAM, the PCI bus, ... and this allows to set values in the environment > variables. > > But if you think it is viable, it should be really easy to do (like > cut'n'paste from OpenBIOS ABI)... Having -prom-env for SLOF, too, would be really posh, so I think I'll have a try when I got some spare minutes ... hmm, my TODO list seems to keep rather growing than shrinking ... maybe I'm doing something wrong ;-) Thomas