qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: David Hildenbrand <dahi@linux.vnet.ibm.com>
To: Thomas Huth <thuth@redhat.com>
Cc: qemu-devel@nongnu.org, ehabkost@redhat.com,
	borntraeger@de.ibm.com, fiuczy@linux.vnet.ibm.com,
	cornelia.huck@de.ibm.com, imammedo@redhat.com,
	jdenemar@redhat.com, mimu@linux.vnet.ibm.com
Subject: Re: [Qemu-devel] [RFC 06/28] s390x/cpumodel: introduce CPU feature group definitions
Date: Wed, 22 Jun 2016 08:19:44 +0200	[thread overview]
Message-ID: <20160622081944.14c497d1@thinkpad-w530> (raw)
In-Reply-To: <5769A026.3020909@redhat.com>

> On 21.06.2016 15:02, David Hildenbrand wrote:
> > Let's use the generated groups to create feature group representations for
> > the user. These groups can later be used to enable/disable multiple
> > features in one shot and will be used to reduce the amount of reported
> > features to the user if all subfeatures are in place.
> > 
> > Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
> > Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
> > ---
> >  target-s390x/cpu_features.c | 44 +++++++++++++++++++++++++++++++++++++++++++-
> >  target-s390x/cpu_features.h | 23 +++++++++++++++++++++++
> >  2 files changed, 66 insertions(+), 1 deletion(-)
> > 
> > diff --git a/target-s390x/cpu_features.c b/target-s390x/cpu_features.c
> > index c78a189..6ec2bfc 100644
> > --- a/target-s390x/cpu_features.c
> > +++ b/target-s390x/cpu_features.c
> > @@ -12,6 +12,7 @@
> >  
> >  #include "qemu/osdep.h"
> >  #include "cpu_features.h"
> > +#include "gen-features.h"
> >  
> >  #define FEAT_INIT(_name, _type, _bit, _desc) \
> >      {                                                \
> > @@ -321,14 +322,55 @@ void s390_add_from_feat_block(S390FeatBitmap features, S390FeatType type,
> >      }
> >  }
> >  
> > -void s390_feat_bitmap_to_ascii(const S390FeatBitmap bitmap, void *opaque,
> > +void s390_feat_bitmap_to_ascii(const S390FeatBitmap features, void *opaque,
> >                                 void (*fn)(const char *name, void *opaque))
> >  {
> > +    S390FeatBitmap bitmap, tmp;
> > +    S390FeatGroup group;
> >      S390Feat feat;
> >  
> > +    bitmap_copy(bitmap, features, S390_FEAT_MAX);
> > +
> > +    /* process whole groups first */
> > +    for (group = 0; group < S390_FEAT_GROUP_MAX; group++) {
> > +        const S390FeatGroupDef *def = s390_feat_group_def(group);
> > +
> > +        bitmap_and(tmp, bitmap, def->feat, S390_FEAT_MAX);
> > +        if (bitmap_equal(tmp, def->feat, S390_FEAT_MAX)) {
> > +            bitmap_andnot(bitmap, bitmap, def->feat, S390_FEAT_MAX);
> > +            (*fn)(def->name, opaque);  
> 
> Maybe simply write
>                fn(dev->name, opaque);
> instead?

Will that work? As fn is a pointer I am not a 100% sure. If so, I'll change it!

Thanks!

David

  reply	other threads:[~2016-06-22  6:19 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-21 13:02 [Qemu-devel] [RFC 00/28] s390x CPU models: exposing features David Hildenbrand
2016-06-21 13:02 ` [Qemu-devel] [RFC 01/28] s390x/cpumodel: "host" and "qemu" as CPU subclasses David Hildenbrand
2016-06-21 13:02 ` [Qemu-devel] [RFC 02/28] s390x/cpumodel: expose CPU class properties David Hildenbrand
2016-06-21 13:02 ` [Qemu-devel] [RFC 03/28] s390x/cpumodel: introduce CPU features David Hildenbrand
2016-06-21 13:02 ` [Qemu-devel] [RFC 04/28] s390x/cpumodel: generate CPU feature lists for CPU models David Hildenbrand
2016-06-21 13:02 ` [Qemu-devel] [RFC 05/28] s390x/cpumodel: generate CPU feature group lists David Hildenbrand
2016-06-21 13:02 ` [Qemu-devel] [RFC 06/28] s390x/cpumodel: introduce CPU feature group definitions David Hildenbrand
2016-06-21 20:14   ` Thomas Huth
2016-06-22  6:19     ` David Hildenbrand [this message]
2016-06-22 18:00       ` Eduardo Habkost
2016-06-21 13:02 ` [Qemu-devel] [RFC 07/28] s390x/cpumodel: register defined CPU models as subclasses David Hildenbrand
2016-06-21 13:02 ` [Qemu-devel] [RFC 08/28] s390x/cpumodel: store the CPU model in the CPU instance David Hildenbrand
2016-06-21 13:02 ` [Qemu-devel] [RFC 09/28] s390x/cpumodel: expose features and feature groups as properties David Hildenbrand
2016-06-21 13:02 ` [Qemu-devel] [RFC 10/28] s390x/cpumodel: let the CPU model handle feature checks David Hildenbrand
2016-06-21 13:02 ` [Qemu-devel] [RFC 11/28] s390x/cpumodel: check and apply the CPU model David Hildenbrand
2016-06-21 13:02 ` [Qemu-devel] [RFC 12/28] s390x/sclp: factor out preparation of cpu entries David Hildenbrand
2016-06-21 13:02 ` [Qemu-devel] [RFC 13/28] s390x/sclp: introduce sclp feature blocks David Hildenbrand
2016-06-21 13:02 ` [Qemu-devel] [RFC 14/28] s390x/sclp: indicate sclp features David Hildenbrand
2016-06-21 13:02 ` [Qemu-devel] [RFC 15/28] s390x/sclp: propagate the ibc val(lowest and unblocked ibc) David Hildenbrand
2016-06-21 13:02 ` [Qemu-devel] [RFC 16/28] s390x/sclp: propagate the mha via sclp David Hildenbrand
2016-06-21 13:02 ` [Qemu-devel] [RFC 17/28] s390x/sclp: propagate hmfai David Hildenbrand
2016-06-21 13:02 ` [Qemu-devel] [RFC 18/28] update linux headers (CPU model) David Hildenbrand
2016-06-21 13:02 ` [Qemu-devel] [RFC 19/28] s390x/kvm: allow runtime-instrumentation for "none" machine David Hildenbrand
2016-06-21 13:02 ` [Qemu-devel] [RFC 20/28] s390x/kvm: implement CPU model support David Hildenbrand
2016-06-21 13:02 ` [Qemu-devel] [RFC 21/28] s390x/kvm: disable host model for existing compat machines David Hildenbrand
2016-06-21 13:02 ` [Qemu-devel] [RFC 22/28] s390x/kvm: let the CPU model control CMM(A) David Hildenbrand
2016-06-21 13:02 ` [Qemu-devel] [RFC 23/28] qmp: add QMP interface "query-cpu-model-expansion" David Hildenbrand
2016-06-21 13:02 ` [Qemu-devel] [RFC 24/28] qmp: add QMP interface "query-cpu-model-comparison" David Hildenbrand
2016-06-21 13:02 ` [Qemu-devel] [RFC 25/28] qmp: add QMP interface "query-cpu-model-baseline" David Hildenbrand
2016-06-21 13:02 ` [Qemu-devel] [RFC 26/28] s390x/cpumodel: implement QMP interface "query-cpu-model-expansion" David Hildenbrand
2016-06-21 13:02 ` [Qemu-devel] [RFC 27/28] s390x/cpumodel: implement QMP interface "query-cpu-model-comparison" David Hildenbrand
2016-06-21 13:02 ` [Qemu-devel] [RFC 28/28] s390x/cpumodel: implement QMP interface "query-cpu-model-baseline" David Hildenbrand
2016-06-21 16:44 ` [Qemu-devel] [RFC 00/28] s390x CPU models: exposing features Eduardo Habkost
2016-06-21 17:01   ` David Hildenbrand
2016-06-21 20:33     ` Eduardo Habkost
2016-06-21 21:09       ` Jiri Denemark
2016-06-21 21:22         ` Eduardo Habkost
2016-06-22  7:11           ` [Qemu-devel] [libvirt] " Jiri Denemark
2016-06-22  7:14             ` David Hildenbrand
2016-06-22  6:51         ` [Qemu-devel] " David Hildenbrand
2016-06-22  7:26           ` Jiri Denemark
2016-06-22  7:34             ` David Hildenbrand
2016-06-22  7:53               ` Jiri Denemark
2016-06-22  7:54                 ` David Hildenbrand
2016-06-22  8:05                   ` Jiri Denemark
2016-06-23  6:41                     ` David Hildenbrand
2016-06-21 20:56   ` Jiri Denemark
2016-06-22  6:43     ` David Hildenbrand
2016-06-22 18:21     ` Eduardo Habkost
2016-06-23  6:33       ` David Hildenbrand
2016-06-30  7:32 ` David Hildenbrand
2016-06-30 15:07   ` Eduardo Habkost
2016-07-11 10:50   ` David Hildenbrand

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=20160622081944.14c497d1@thinkpad-w530 \
    --to=dahi@linux.vnet.ibm.com \
    --cc=borntraeger@de.ibm.com \
    --cc=cornelia.huck@de.ibm.com \
    --cc=ehabkost@redhat.com \
    --cc=fiuczy@linux.vnet.ibm.com \
    --cc=imammedo@redhat.com \
    --cc=jdenemar@redhat.com \
    --cc=mimu@linux.vnet.ibm.com \
    --cc=qemu-devel@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).