* [Qemu-devel] [PATCH 0/5] s390x enhancements and fixes
@ 2016-09-12 11:00 Cornelia Huck
2016-09-12 11:00 ` [Qemu-devel] [PATCH 1/5] s390x/kvm: disable cpu model for the 2.7 machine Cornelia Huck
` (4 more replies)
0 siblings, 5 replies; 7+ messages in thread
From: Cornelia Huck @ 2016-09-12 11:00 UTC (permalink / raw)
To: qemu-devel; +Cc: borntraeger, agraf, jfrei, Cornelia Huck
Here are some s390x patches that have accumulated at my end:
- fixup for the cpu model patches
- support for READ_STATUS, which has been accepted into the upcoming
virtio 1.1 standard
- update MAINTAINERS file pattern
Christian Borntraeger (2):
s390x/kvm: disable cpu model for the 2.7 machine
QMP: fixup typos and whitespace damage
Pierre Morel (2):
virtio-ccw: respond to READ_STATUS command
virtio-ccw: set revision 2 as maximal revision number
Sascha Silbe (1):
MAINTAINERS: update s390 machine file patterns
MAINTAINERS | 3 +++
hw/s390x/s390-virtio-ccw.c | 17 +++++++++++++++++
hw/s390x/virtio-ccw.c | 20 ++++++++++++++++++++
hw/s390x/virtio-ccw.h | 3 ++-
include/hw/s390x/s390-virtio-ccw.h | 3 +++
qapi-schema.json | 8 ++++----
target-s390x/kvm.c | 2 +-
7 files changed, 50 insertions(+), 6 deletions(-)
--
2.9.3
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Qemu-devel] [PATCH 1/5] s390x/kvm: disable cpu model for the 2.7 machine
2016-09-12 11:00 [Qemu-devel] [PATCH 0/5] s390x enhancements and fixes Cornelia Huck
@ 2016-09-12 11:00 ` Cornelia Huck
2016-09-12 11:00 ` [Qemu-devel] [PATCH 2/5] MAINTAINERS: update s390 machine file patterns Cornelia Huck
` (3 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Cornelia Huck @ 2016-09-12 11:00 UTC (permalink / raw)
To: qemu-devel; +Cc: borntraeger, agraf, jfrei, Cornelia Huck
From: Christian Borntraeger <borntraeger@de.ibm.com>
cpu model was merged with 2.8, it is wrong to abuse ri_allowed which
was enabled with 2.7.
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
---
hw/s390x/s390-virtio-ccw.c | 17 +++++++++++++++++
include/hw/s390x/s390-virtio-ccw.h | 3 +++
target-s390x/kvm.c | 2 +-
3 files changed, 21 insertions(+), 1 deletion(-)
diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
index a63b4e8..e340eab 100644
--- a/hw/s390x/s390-virtio-ccw.c
+++ b/hw/s390x/s390-virtio-ccw.c
@@ -193,6 +193,7 @@ static void ccw_machine_class_init(ObjectClass *oc, void *data)
S390CcwMachineClass *s390mc = S390_MACHINE_CLASS(mc);
s390mc->ri_allowed = true;
+ s390mc->cpu_model_allowed = true;
mc->init = ccw_init;
mc->reset = s390_machine_reset;
mc->hot_add_cpu = s390_hot_add_cpu;
@@ -258,6 +259,19 @@ bool ri_allowed(void)
return 0;
}
+bool cpu_model_allowed(void)
+{
+ MachineClass *mc = MACHINE_GET_CLASS(qdev_get_machine());
+ if (object_class_dynamic_cast(OBJECT_CLASS(mc),
+ TYPE_S390_CCW_MACHINE)) {
+ S390CcwMachineClass *s390mc = S390_MACHINE_CLASS(mc);
+
+ return s390mc->cpu_model_allowed;
+ }
+ /* allow CPU model qmp queries with the "none" machine */
+ return true;
+}
+
static inline void s390_machine_initfn(Object *obj)
{
object_property_add_bool(obj, "aes-key-wrap",
@@ -397,6 +411,9 @@ static void ccw_machine_2_7_instance_options(MachineState *machine)
static void ccw_machine_2_7_class_options(MachineClass *mc)
{
+ S390CcwMachineClass *s390mc = S390_MACHINE_CLASS(mc);
+
+ s390mc->cpu_model_allowed = false;
ccw_machine_2_8_class_options(mc);
SET_MACHINE_COMPAT(mc, CCW_COMPAT_2_7);
}
diff --git a/include/hw/s390x/s390-virtio-ccw.h b/include/hw/s390x/s390-virtio-ccw.h
index a0c1fc8..6ecae00 100644
--- a/include/hw/s390x/s390-virtio-ccw.h
+++ b/include/hw/s390x/s390-virtio-ccw.h
@@ -36,9 +36,12 @@ typedef struct S390CcwMachineClass {
/*< public >*/
bool ri_allowed;
+ bool cpu_model_allowed;
} S390CcwMachineClass;
/* runtime-instrumentation allowed by the machine */
bool ri_allowed(void);
+/* cpu model allowed by the machine */
+bool cpu_model_allowed(void);
#endif
diff --git a/target-s390x/kvm.c b/target-s390x/kvm.c
index dfaf1ca..4b847a3 100644
--- a/target-s390x/kvm.c
+++ b/target-s390x/kvm.c
@@ -2490,7 +2490,7 @@ static int configure_cpu_feat(const S390FeatBitmap features)
bool kvm_s390_cpu_models_supported(void)
{
- if (!ri_allowed()) {
+ if (!cpu_model_allowed()) {
/* compatibility machines interfere with the cpu model */
return false;
}
--
2.9.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Qemu-devel] [PATCH 2/5] MAINTAINERS: update s390 machine file patterns
2016-09-12 11:00 [Qemu-devel] [PATCH 0/5] s390x enhancements and fixes Cornelia Huck
2016-09-12 11:00 ` [Qemu-devel] [PATCH 1/5] s390x/kvm: disable cpu model for the 2.7 machine Cornelia Huck
@ 2016-09-12 11:00 ` Cornelia Huck
2016-09-12 11:00 ` [Qemu-devel] [PATCH 3/5] virtio-ccw: respond to READ_STATUS command Cornelia Huck
` (2 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Cornelia Huck @ 2016-09-12 11:00 UTC (permalink / raw)
To: qemu-devel; +Cc: borntraeger, agraf, jfrei, Sascha Silbe, Cornelia Huck
From: Sascha Silbe <silbe@linux.vnet.ibm.com>
Some files used by s390 KVM code were missing in MAINTAINERS. Add
them.
Reported-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Sascha Silbe <silbe@linux.vnet.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
---
MAINTAINERS | 3 +++
1 file changed, 3 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index b6fb84e..1ac77bb 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -666,6 +666,9 @@ F: hw/s390x/
F: include/hw/s390x/
F: pc-bios/s390-ccw/
F: hw/watchdog/wdt_diag288.c
+F: include/hw/watchdog/wdt_diag288.h
+F: pc-bios/s390-ccw.img
+F: default-configs/s390x-softmmu.mak
T: git git://github.com/cohuck/qemu.git s390-next
T: git git://github.com/borntraeger/qemu.git s390-next
--
2.9.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Qemu-devel] [PATCH 3/5] virtio-ccw: respond to READ_STATUS command
2016-09-12 11:00 [Qemu-devel] [PATCH 0/5] s390x enhancements and fixes Cornelia Huck
2016-09-12 11:00 ` [Qemu-devel] [PATCH 1/5] s390x/kvm: disable cpu model for the 2.7 machine Cornelia Huck
2016-09-12 11:00 ` [Qemu-devel] [PATCH 2/5] MAINTAINERS: update s390 machine file patterns Cornelia Huck
@ 2016-09-12 11:00 ` Cornelia Huck
2016-09-12 11:00 ` [Qemu-devel] [PATCH 4/5] virtio-ccw: set revision 2 as maximal revision number Cornelia Huck
2016-09-12 11:00 ` [Qemu-devel] [PATCH 5/5] QMP: fixup typos and whitespace damage Cornelia Huck
4 siblings, 0 replies; 7+ messages in thread
From: Cornelia Huck @ 2016-09-12 11:00 UTC (permalink / raw)
To: qemu-devel; +Cc: borntraeger, agraf, jfrei, Pierre Morel, Cornelia Huck
From: Pierre Morel <pmorel@linux.vnet.ibm.com>
This patch adds the response to the READ_STATUS CCW command.
Signed-off-by: Pierre Morel <pmorel@linux.vnet.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
---
hw/s390x/virtio-ccw.c | 20 ++++++++++++++++++++
hw/s390x/virtio-ccw.h | 1 +
2 files changed, 21 insertions(+)
diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c
index a554a24..ad90792 100644
--- a/hw/s390x/virtio-ccw.c
+++ b/hw/s390x/virtio-ccw.c
@@ -455,6 +455,26 @@ static int virtio_ccw_cb(SubchDev *sch, CCW1 ccw)
}
}
break;
+ case CCW_CMD_READ_STATUS:
+ if (check_len) {
+ if (ccw.count != sizeof(status)) {
+ ret = -EINVAL;
+ break;
+ }
+ } else if (ccw.count < sizeof(status)) {
+ /* Can't execute command. */
+ ret = -EINVAL;
+ break;
+ }
+ if (!ccw.cda) {
+ ret = -EFAULT;
+ } else {
+ address_space_stb(&address_space_memory, ccw.cda, vdev->status,
+ MEMTXATTRS_UNSPECIFIED, NULL);
+ sch->curr_status.scsw.count = ccw.count - sizeof(vdev->status);;
+ ret = 0;
+ }
+ break;
case CCW_CMD_WRITE_STATUS:
if (check_len) {
if (ccw.count != sizeof(status)) {
diff --git a/hw/s390x/virtio-ccw.h b/hw/s390x/virtio-ccw.h
index 1c6bc86..86bdd6c 100644
--- a/hw/s390x/virtio-ccw.h
+++ b/hw/s390x/virtio-ccw.h
@@ -42,6 +42,7 @@
#define CCW_CMD_SET_IND 0x43
#define CCW_CMD_SET_CONF_IND 0x53
#define CCW_CMD_READ_VQ_CONF 0x32
+#define CCW_CMD_READ_STATUS 0x72
#define CCW_CMD_SET_IND_ADAPTER 0x73
#define CCW_CMD_SET_VIRTIO_REV 0x83
--
2.9.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Qemu-devel] [PATCH 4/5] virtio-ccw: set revision 2 as maximal revision number
2016-09-12 11:00 [Qemu-devel] [PATCH 0/5] s390x enhancements and fixes Cornelia Huck
` (2 preceding siblings ...)
2016-09-12 11:00 ` [Qemu-devel] [PATCH 3/5] virtio-ccw: respond to READ_STATUS command Cornelia Huck
@ 2016-09-12 11:00 ` Cornelia Huck
2016-09-12 11:00 ` [Qemu-devel] [PATCH 5/5] QMP: fixup typos and whitespace damage Cornelia Huck
4 siblings, 0 replies; 7+ messages in thread
From: Cornelia Huck @ 2016-09-12 11:00 UTC (permalink / raw)
To: qemu-devel; +Cc: borntraeger, agraf, jfrei, Pierre Morel, Cornelia Huck
From: Pierre Morel <pmorel@linux.vnet.ibm.com>
We have everything needed for virtio-ccw revision 2 wired up now.
Bump the maximum supported revision reported on a device basis to
the guest so they can make use of it.
Signed-off-by: Pierre Morel <pmorel@linux.vnet.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
---
hw/s390x/virtio-ccw.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/s390x/virtio-ccw.h b/hw/s390x/virtio-ccw.h
index 86bdd6c..2368ed6 100644
--- a/hw/s390x/virtio-ccw.h
+++ b/hw/s390x/virtio-ccw.h
@@ -96,7 +96,7 @@ struct VirtioCcwDevice {
};
/* The maximum virtio revision we support. */
-#define VIRTIO_CCW_MAX_REV 1
+#define VIRTIO_CCW_MAX_REV 2
static inline int virtio_ccw_rev_max(VirtioCcwDevice *dev)
{
return dev->max_rev;
--
2.9.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Qemu-devel] [PATCH 5/5] QMP: fixup typos and whitespace damage
2016-09-12 11:00 [Qemu-devel] [PATCH 0/5] s390x enhancements and fixes Cornelia Huck
` (3 preceding siblings ...)
2016-09-12 11:00 ` [Qemu-devel] [PATCH 4/5] virtio-ccw: set revision 2 as maximal revision number Cornelia Huck
@ 2016-09-12 11:00 ` Cornelia Huck
2016-09-12 19:57 ` Eric Blake
4 siblings, 1 reply; 7+ messages in thread
From: Cornelia Huck @ 2016-09-12 11:00 UTC (permalink / raw)
To: qemu-devel; +Cc: borntraeger, agraf, jfrei, Cornelia Huck
From: Christian Borntraeger <borntraeger@de.ibm.com>
Fixup some typos and whitespace damage introduced by the CPU model
patches for s390.
Reported-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
---
qapi-schema.json | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/qapi-schema.json b/qapi-schema.json
index c4f3674..f1a79f5 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -3163,7 +3163,7 @@
# @CpuModelCompareResult:
#
# An enumeration of CPU model comparation results. The result is usually
-# calcualted using e.g. CPU features or CPU generations.
+# calculated using e.g. CPU features or CPU generations.
#
# @incompatible: If model A is incompatible to model B, model A is not
# guaranteed to run where model B runs and the other way around.
@@ -3216,14 +3216,14 @@
# CPU model has to be created by baselining.
#
# Usually, a CPU model is compared against the maximum possible CPU model
-# of a ceratin configuration (e.g. the "host" model for KVM). If that CPU
+# of a certain configuration (e.g. the "host" model for KVM). If that CPU
# model is identical or a subset, it will run in that configuration.
#
# The result returned by this command may be affected by:
#
# * QEMU version: CPU models may look different depending on the QEMU version.
# (Except for CPU models reported as "static" in query-cpu-definitions.)
-# * machine-type: CPU model may look different depending on the machine-type.
+# * machine-type: CPU model may look different depending on the machine-type.
# (Except for CPU models reported as "static" in query-cpu-definitions.)
# * machine options (including accelerator): in some architectures, CPU models
# may look different depending on machine and accelerator options. (Except for
@@ -3274,7 +3274,7 @@
#
# * QEMU version: CPU models may look different depending on the QEMU version.
# (Except for CPU models reported as "static" in query-cpu-definitions.)
-# * machine-type: CPU model may look different depending on the machine-type.
+# * machine-type: CPU model may look different depending on the machine-type.
# (Except for CPU models reported as "static" in query-cpu-definitions.)
# * machine options (including accelerator): in some architectures, CPU models
# may look different depending on machine and accelerator options. (Except for
--
2.9.3
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH 5/5] QMP: fixup typos and whitespace damage
2016-09-12 11:00 ` [Qemu-devel] [PATCH 5/5] QMP: fixup typos and whitespace damage Cornelia Huck
@ 2016-09-12 19:57 ` Eric Blake
0 siblings, 0 replies; 7+ messages in thread
From: Eric Blake @ 2016-09-12 19:57 UTC (permalink / raw)
To: Cornelia Huck, qemu-devel; +Cc: borntraeger, jfrei, agraf
[-- Attachment #1: Type: text/plain, Size: 627 bytes --]
On 09/12/2016 06:00 AM, Cornelia Huck wrote:
> From: Christian Borntraeger <borntraeger@de.ibm.com>
>
> Fixup some typos and whitespace damage introduced by the CPU model
> patches for s390.
>
> Reported-by: Eric Blake <eblake@redhat.com>
> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
> ---
> qapi-schema.json | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2016-09-12 19:57 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-12 11:00 [Qemu-devel] [PATCH 0/5] s390x enhancements and fixes Cornelia Huck
2016-09-12 11:00 ` [Qemu-devel] [PATCH 1/5] s390x/kvm: disable cpu model for the 2.7 machine Cornelia Huck
2016-09-12 11:00 ` [Qemu-devel] [PATCH 2/5] MAINTAINERS: update s390 machine file patterns Cornelia Huck
2016-09-12 11:00 ` [Qemu-devel] [PATCH 3/5] virtio-ccw: respond to READ_STATUS command Cornelia Huck
2016-09-12 11:00 ` [Qemu-devel] [PATCH 4/5] virtio-ccw: set revision 2 as maximal revision number Cornelia Huck
2016-09-12 11:00 ` [Qemu-devel] [PATCH 5/5] QMP: fixup typos and whitespace damage Cornelia Huck
2016-09-12 19:57 ` Eric Blake
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.