qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v6 15/17] target-s390x: Extend arch specific QMP


From: Eduardo Habkost
Subject: Re: [Qemu-devel] [PATCH v6 15/17] target-s390x: Extend arch specific QMP command query-cpu-definitions
Date: Mon, 11 May 2015 13:59:36 -0300
User-agent: Mutt/1.5.23 (2014-03-12)

On Wed, May 06, 2015 at 04:48:57PM +0200, Michael Mueller wrote:
> On Wed, 6 May 2015 09:37:41 -0300
> Eduardo Habkost <address@hidden> wrote:
[...]
> > 
> > >  
> > > -    info = g_malloc0(sizeof(*info));
> > > -    info->name = g_strdup("host");
> > > +    memset(&mach, 0, sizeof(mach));
> > > +    if (has_accel) {
> > > +        switch (accel) {
> > > +        case ACCEL_ID_KVM:
> > > +            kvm_s390_get_machine_props(NULL, &mach);
> > > +            break;
> > > +        default:
> > > +            return qmp_query_cpu_definition_host();
> > 
> > This will return only a single element. I don't think that's correct. If
> > machine or accel is omitted, I believe we should just omit the
> > "runnable" field, but always return the full list of CPU models.
> 
> That is the !KVM case where I keep the behavior currently unchanged to
> the existing implementation. But right for the TCG case there has to be
> a comparable get_machine_props() call returning whatever TCG is implementing.
> But that is not part of this patch series. 

I believe the right thing to do is to return the full list of CPU
models, but report them as not runnable if accel is TCG, and simply omit
the runnable field if no accel argument is provided.

This way, existing management code that already runs query-cpu-models
(e.g. libvirt, that does that with "-machine none") will keep working.

-- 
Eduardo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]