From: Greg Kurz <groug@kaod.org>
To: Laurent Vivier <lvivier@redhat.com>
Cc: david@gibson.dropbear.id.au, thuth@redhat.com,
qemu-ppc@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v4 2/3] tests: make pc_alloc_init/init_flags/uninit generic
Date: Wed, 7 Sep 2016 15:42:21 +0200 [thread overview]
Message-ID: <20160907154221.0a77dd9e@bahia> (raw)
In-Reply-To: <86324ad9-e55d-6a05-c49d-a44164173a12@redhat.com>
On Wed, 7 Sep 2016 15:10:59 +0200
Laurent Vivier <lvivier@redhat.com> wrote:
> On 07/09/2016 14:44, Greg Kurz wrote:
> > On Wed, 7 Sep 2016 11:36:21 +0200
> > Laurent Vivier <lvivier@redhat.com> wrote:
> >
> >> On 06/09/2016 23:41, Greg Kurz wrote:
> >>> On Tue, 6 Sep 2016 15:17:56 +0200
> >>> Laurent Vivier <lvivier@redhat.com> wrote:
> >>>
> >>>> And add support for ppc64.
> >>>>
> >>>> Signed-off-by: Laurent Vivier <lvivier@redhat.com>
> >>>> ---
> >>>> 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 <jsnow@redhat.com>
> >>> 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-");
> >> }
> >
next prev parent reply other threads:[~2016-09-07 13:42 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-06 13:17 [Qemu-devel] [PATCH v4 0/3] tests: add RTAS protocol Laurent Vivier
2016-09-06 13:17 ` [Qemu-devel] [PATCH v4 1/3] qtest: replace strtoXX() by qemu_strtoXX() Laurent Vivier
2016-09-06 15:55 ` Greg Kurz
2016-09-06 18:17 ` Laurent Vivier
2016-09-06 21:13 ` Greg Kurz
2016-09-08 1:56 ` David Gibson
2016-09-08 7:55 ` [Qemu-devel] [Qemu-ppc] " Greg Kurz
2016-09-06 13:17 ` [Qemu-devel] [PATCH v4 2/3] tests: make pc_alloc_init/init_flags/uninit generic Laurent Vivier
2016-09-06 19:46 ` Thomas Huth
2016-09-06 21:41 ` Greg Kurz
2016-09-07 9:36 ` Laurent Vivier
2016-09-07 12:44 ` Greg Kurz
2016-09-07 13:10 ` Laurent Vivier
2016-09-07 13:42 ` Greg Kurz [this message]
2016-09-08 2:04 ` David Gibson
2016-09-08 7:50 ` Laurent Vivier
2016-09-09 12:25 ` Greg Kurz
2016-09-09 12:31 ` Laurent Vivier
2016-09-12 1:27 ` David Gibson
2016-09-12 8:27 ` [Qemu-devel] [Qemu-ppc] " Greg Kurz
2016-09-12 15:46 ` [Qemu-devel] " Laurent Vivier
2016-09-12 17:37 ` Greg Kurz
2016-09-06 13:17 ` [Qemu-devel] [PATCH v4 3/3] tests: add RTAS command in the protocol Laurent Vivier
2016-09-06 22:07 ` Greg Kurz
2016-09-07 9:25 ` Laurent Vivier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160907154221.0a77dd9e@bahia \
--to=groug@kaod.org \
--cc=david@gibson.dropbear.id.au \
--cc=lvivier@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.