qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kurz <groug@kaod.org>
To: David Gibson <david@gibson.dropbear.id.au>
Cc: Laurent Vivier <lvivier@redhat.com>,
	thuth@redhat.com, qemu-ppc@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [Qemu-ppc] [PATCH v4 2/3] tests: make pc_alloc_init/init_flags/uninit generic
Date: Mon, 12 Sep 2016 10:27:02 +0200	[thread overview]
Message-ID: <20160912102702.214ef04a@bahia> (raw)
In-Reply-To: <20160912012757.GE12621@voom.fritz.box>

[-- Attachment #1: Type: text/plain, Size: 2050 bytes --]

On Mon, 12 Sep 2016 11:27:57 +1000
David Gibson <david@gibson.dropbear.id.au> wrote:

> On Fri, Sep 09, 2016 at 02:31:55PM +0200, Laurent Vivier wrote:
> > 
> > 
> > On 09/09/2016 14:25, Greg Kurz wrote:  
> > > On Thu, 8 Sep 2016 09:50:31 +0200
> > > Laurent Vivier <lvivier@redhat.com> wrote:
> > >   
> > >> On 08/09/2016 04:04, David Gibson wrote:  
> > >>> On Tue, Sep 06, 2016 at 03:17:56PM +0200, Laurent Vivier wrote:    
> > >>>> And add support for ppc64.
> > >>>>
> > >>>> Signed-off-by: Laurent Vivier <lvivier@redhat.com>    
> > >>>
> > >>> Some of my coments may be obsoleted by the discussion with Greg.
> > >>>     
> > >>>> ---
> > >>>> v2:
> > >>>> - remove useless parenthesis, inline  
> > >> [...]  
> > >>>> +
> > >>>> +QGuestAllocator *machine_alloc_init(void)
> > >>>> +{
> > >>>> +    const char *arch = qtest_get_arch();    
> > >>>
> > >>> Maybe we need to add a qtest_get_machine_type().    
> > >>
> > >> I'm working on that...
> > >>  
> > > 
> > > The problem is that qtest only knows about archs, based on $(TARGETS).
> > > Maybe the machine type could be the default one for a given arch ?  
> > 
> > Once the machine is started we can use QMP[1] to ask the machine type
> > (for instance, "pseries-2.7-machine").
> > 
> > So what we could do is a generic qtest_machine_vboot() which ask the
> > machine type and configure the qtest framework accordingly.
> > 
> > Laurent
> > [1] { 'execute': 'qom-get', 'arguments': { 'path': '/machine',
> > 'property': 'type' } }  
> 
> Ok.. doesn't the qtest framework start the machine though?  So it
> should already know the machine type, shouldn't it?
> 

As already mentioned , qtest only knows about archs... the machine type is
either explicitly passed to qtest_start(), either the default one for a
given arch, if any.

For some generic code that would have to choose the right memory allocation
implementation based on the machine type, Laurent's suggestion seems to be
appropriate indeed.

Cheers.

--
Greg

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

  reply	other threads:[~2016-09-12  8:27 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
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             ` Greg Kurz [this message]
2016-09-12 15:46             ` 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=20160912102702.214ef04a@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).