All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cornelia Huck <cohuck@redhat.com>
To: peter.maydell@linaro.org
Cc: qemu-s390x@nongnu.org, qemu-devel@nongnu.org,
	borntraeger@de.ibm.com, rth@twiddle.net, agraf@suse.de,
	david@redhat.com, thuth@redhat.com,
	Halil Pasic <pasic@linux.vnet.ibm.com>,
	Cornelia Huck <cohuck@redhat.com>
Subject: [Qemu-devel] [PULL v2 24/27] s390x/cpumodel: document S390FeatDef.bit not applicable
Date: Thu,  1 Mar 2018 14:01:58 +0100	[thread overview]
Message-ID: <20180301130201.24666-25-cohuck@redhat.com> (raw)
In-Reply-To: <20180301130201.24666-1-cohuck@redhat.com>

From: Halil Pasic <pasic@linux.vnet.ibm.com>

The 'bit' field of the 'S390FeatDef' structure is not applicable to all
its instances. Currently this field is not applicable, and remains
unused, iff the feature is of type S390_FEAT_TYPE_MISC. Having the value 0
specified for multiple such feature definitions was a little confusing,
as it's a perfectly legit bit value, and as the value of the bit
field is usually ought to be unique for each feature of a given
feature type.

Let us introduce a specialized macro for defining features of type
S390_FEAT_TYPE_MISC so, that one does not have to specify neither bit nor
type (as the latter is implied).

Signed-off-by: Halil Pasic <pasic@linux.vnet.ibm.com>
Message-Id: <20180221165628.78946-1-pasic@linux.vnet.ibm.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
---
 target/s390x/cpu_features.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/target/s390x/cpu_features.c b/target/s390x/cpu_features.c
index a5619f2893..3b9e2745e9 100644
--- a/target/s390x/cpu_features.c
+++ b/target/s390x/cpu_features.c
@@ -23,6 +23,10 @@
         .desc = _desc,                               \
     }
 
+/* S390FeatDef.bit is not applicable as there is no feature block. */
+#define FEAT_INIT_MISC(_name, _desc)                 \
+            FEAT_INIT(_name, S390_FEAT_TYPE_MISC, 0, _desc)
+
 /* indexed by feature number for easy lookup */
 static const S390FeatDef s390_features[] = {
     FEAT_INIT("esan3", S390_FEAT_TYPE_STFL, 0, "Instructions marked as n3"),
@@ -123,8 +127,8 @@ static const S390FeatDef s390_features[] = {
     FEAT_INIT("ib", S390_FEAT_TYPE_SCLP_CPU, 42, "SIE: Intervention bypass facility"),
     FEAT_INIT("cei", S390_FEAT_TYPE_SCLP_CPU, 43, "SIE: Conditional-external-interception facility"),
 
-    FEAT_INIT("dateh2", S390_FEAT_TYPE_MISC, 0, "DAT-enhancement facility 2"),
-    FEAT_INIT("cmm", S390_FEAT_TYPE_MISC, 0, "Collaborative-memory-management facility"),
+    FEAT_INIT_MISC("dateh2", "DAT-enhancement facility 2"),
+    FEAT_INIT_MISC("cmm", "Collaborative-memory-management facility"),
 
     FEAT_INIT("plo-cl", S390_FEAT_TYPE_PLO, 0, "PLO Compare and load (32 bit in general registers)"),
     FEAT_INIT("plo-clg", S390_FEAT_TYPE_PLO, 1, "PLO Compare and load (64 bit in parameter list)"),
-- 
2.13.6

  parent reply	other threads:[~2018-03-01 13:03 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-01 13:01 [Qemu-devel] [PULL v2 00/27] s390x updates (and friends) Cornelia Huck
2018-03-01 13:01 ` [Qemu-devel] [PULL v2 01/27] s390-ccw: refactor boot map table code Cornelia Huck
2018-03-01 13:01 ` [Qemu-devel] [PULL v2 02/27] s390-ccw: refactor eckd_block_num to use CHS Cornelia Huck
2018-03-01 13:01 ` [Qemu-devel] [PULL v2 03/27] s390-ccw: refactor IPL structs Cornelia Huck
2018-03-01 13:01 ` [Qemu-devel] [PULL v2 04/27] s390-ccw: update libc Cornelia Huck
2018-03-01 13:01 ` [Qemu-devel] [PULL v2 05/27] s390-ccw: move auxiliary IPL data to separate location Cornelia Huck
2018-03-01 13:01 ` [Qemu-devel] [PULL v2 06/27] s390-ccw: parse and set boot menu options Cornelia Huck
2018-03-01 13:01 ` [Qemu-devel] [PULL v2 07/27] s390-ccw: set up interactive boot menu parameters Cornelia Huck
2018-03-01 13:01 ` [Qemu-devel] [PULL v2 08/27] s390-ccw: read stage2 boot loader data to find menu Cornelia Huck
2018-03-01 13:01 ` [Qemu-devel] [PULL v2 09/27] s390-ccw: print zipl boot menu Cornelia Huck
2018-03-01 13:01 ` [Qemu-devel] [PULL v2 10/27] s390-ccw: read user input for boot index via the SCLP console Cornelia Huck
2018-03-01 13:01 ` [Qemu-devel] [PULL v2 11/27] s390-ccw: set cp_receive mask only when needed and consume pending service irqs Cornelia Huck
2018-03-01 13:01 ` [Qemu-devel] [PULL v2 12/27] s390-ccw: use zipl values when no boot menu options are present Cornelia Huck
2018-03-01 13:01 ` [Qemu-devel] [PULL v2 13/27] s390-ccw: interactive boot menu for scsi Cornelia Huck
2018-03-01 13:01 ` [Qemu-devel] [PULL v2 14/27] pc-bios/s390: Rebuild the s390x firmware images with the boot menu changes Cornelia Huck
2018-03-01 13:01 ` [Qemu-devel] [PULL v2 15/27] s390x/cpu: expose the guest crash information Cornelia Huck
2018-03-01 13:01 ` [Qemu-devel] [PULL v2 16/27] s390/stattrib: Make SaveVMHandlers data static Cornelia Huck
2018-03-01 13:01 ` [Qemu-devel] [PULL v2 17/27] s390x/tcg: fix disabling/enabling DAT Cornelia Huck
2018-03-01 13:01 ` [Qemu-devel] [PULL v2 18/27] s390x/tcg: add various alignment checks Cornelia Huck
2018-03-01 13:01 ` [Qemu-devel] [PULL v2 19/27] qmp: expose s390-specific CPU info Cornelia Huck
2018-03-01 13:01 ` [Qemu-devel] [PULL v2 20/27] qmp: add query-cpus-fast Cornelia Huck
2018-03-01 13:01 ` [Qemu-devel] [PULL v2 21/27] qmp: add architecture specific cpu data for query-cpus-fast Cornelia Huck
2018-03-01 13:01 ` [Qemu-devel] [PULL v2 22/27] qemu-doc: deprecate query-cpus Cornelia Huck
2018-03-01 13:01 ` [Qemu-devel] [PULL v2 23/27] hmp: change hmp_info_cpus to use query-cpus-fast Cornelia Huck
2018-03-01 13:01 ` Cornelia Huck [this message]
2018-03-01 13:01 ` [Qemu-devel] [PULL v2 25/27] s390x/sclp: remove memory hotplug support Cornelia Huck
2018-03-01 13:02 ` [Qemu-devel] [PULL v2 26/27] s390x: remove s390_get_memslot_count Cornelia Huck
2018-03-01 13:02 ` [Qemu-devel] [PULL v2 27/27] s390x/tcg: fix loading 31bit PSWs with the highest bit set Cornelia Huck
2018-03-01 18:46 ` [Qemu-devel] [PULL v2 00/27] s390x updates (and friends) Peter Maydell

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=20180301130201.24666-25-cohuck@redhat.com \
    --to=cohuck@redhat.com \
    --cc=agraf@suse.de \
    --cc=borntraeger@de.ibm.com \
    --cc=david@redhat.com \
    --cc=pasic@linux.vnet.ibm.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    --cc=rth@twiddle.net \
    --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.