From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50269) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhd7Y-0003Z1-2M for qemu-devel@nongnu.org; Wed, 07 Sep 2016 09:42:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bhd7U-0000mM-Na for qemu-devel@nongnu.org; Wed, 07 Sep 2016 09:42:32 -0400 Received: from 7.mo1.mail-out.ovh.net ([87.98.158.110]:55601) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bhd7U-0000ll-EM for qemu-devel@nongnu.org; Wed, 07 Sep 2016 09:42:28 -0400 Received: from player726.ha.ovh.net (b7.ovh.net [213.186.33.57]) by mo1.mail-out.ovh.net (Postfix) with ESMTP id 81164FF9F70 for ; Wed, 7 Sep 2016 15:42:27 +0200 (CEST) Date: Wed, 7 Sep 2016 15:42:21 +0200 From: Greg Kurz Message-ID: <20160907154221.0a77dd9e@bahia> In-Reply-To: <86324ad9-e55d-6a05-c49d-a44164173a12@redhat.com> References: <1473167877-2545-1-git-send-email-lvivier@redhat.com> <1473167877-2545-3-git-send-email-lvivier@redhat.com> <20160906234111.02181f40@bahia> <8e76a3be-cea1-d788-3f1d-045e896a6876@redhat.com> <20160907144400.6bcf59a0@bahia> <86324ad9-e55d-6a05-c49d-a44164173a12@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v4 2/3] tests: make pc_alloc_init/init_flags/uninit generic List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Laurent Vivier Cc: david@gibson.dropbear.id.au, thuth@redhat.com, qemu-ppc@nongnu.org, qemu-devel@nongnu.org On Wed, 7 Sep 2016 15:10:59 +0200 Laurent Vivier wrote: > On 07/09/2016 14:44, Greg Kurz wrote: > > On Wed, 7 Sep 2016 11:36:21 +0200 > > Laurent Vivier wrote: > > > >> On 06/09/2016 23:41, Greg Kurz wrote: > >>> On Tue, 6 Sep 2016 15:17:56 +0200 > >>> Laurent Vivier wrote: > >>> > >>>> And add support for ppc64. > >>>> > >>>> Signed-off-by: Laurent Vivier > >>>> --- > >>>> v2: > >>>> - remove useless parenthesis, inline > >>>> > >>> > >>> This works indeed but I'm just feeling curious about the QOSOps type introduced > >>> by the following commit: > >>> > >>> commit 90e5add6f2fa0b0bd9a4c1d5a4de2304b5f3e466 > >>> Author: John Snow > >>> Date: Mon Jan 19 15:15:55 2015 -0500 > >>> > >>> libqos: add pc specific interface > >>> > >>> Wouldn't this be better to implement something similar for ppc64 instead of > >>> relying on strcmp() ? > >> > >> Tests can be generic and to be run on several archs: we need the > >> strcmp() to check the guest arch [1], it can't be hardcoded in the test. > >> > > > > I agree for truely platform agnostic tests, but this is obviously not the case > > for RTAS, which is the goal of this series. > > > > My suggestion is basically to: > > - keep malloc-ppc64.[ch] from your series > > - introduce libqos-ppc64.[ch] like the existing libqos-pc.[ch] > > - add qtest_ppc64_[start|end]() wrappers to pass global_qtest to > > qtest_ppc64_[boot|shutdown]() > > - adapt the final RTAS test patch to use these wrappers and q[malloc|free]() > > You're right it's the good way to implement guest memory allocation... > I'm going to add this part in the series. > > > BTW, maybe s/ppc64/ppc to match hw/ppc, since libqos is about HW platforms, > > not target archs. > > I use ppc64 because we guess guest memory is at least 256MB, and this is > true only with ppc64/pseries. With ppc, I think we should use qfw_cfg() > as for PC. > True. In this case, maybe you should even use spapr, since RTAS is for pseries only, and so will be the PCI bits you mention in the cover letter. Cheers. -- Greg > Thanks, > Laurent > > This is more work, but I guess in the end it maybe useful in the long term. > > > > And, of course, I'm volunteering to participate, with patches/reviewing/testing. > > > > Makes sense ? > > > > Cheers. > > > > -- > > Greg > > > >> Thanks, > >> Laurent > >> > >> [1] > >> const char *qtest_get_arch(void) > >> { > >> const char *qemu = getenv("QTEST_QEMU_BINARY"); > >> g_assert(qemu != NULL); > >> const char *end = strrchr(qemu, '/'); > >> > >> return end + strlen("/qemu-system-"); > >> } > >