next batch of s390x changes
[Qemu-devel] [PULL 16/19] hw/s390x: Move virtio-ccw-input code to a separate file
In reply to Cornelia HuckFrom: Thomas Huth <[email protected]>
The code should only be enabled if CONFIG_VIRTIO_INPUT has been set. This can be done best if the code resides in a separate file.
Message-Id: <[email protected]>
--- hw/s390x/Makefile.objs | 1 + hw/s390x/virtio-ccw-input.c | 118 ++++++++++++++++++++++++++++++++++++++++++++ hw/s390x/virtio-ccw.c | 98 ------------------------------------ 3 files changed, 119 insertions(+), 98 deletions(-) create mode 100644 hw/s390x/virtio-ccw-input.c
hw/s390x/Makefile.objs +1 -0
@@ -14,6 +14,7 @@ obj-$(CONFIG_VIRTIO_SCSI) += virtio-ccw-scsi.o obj-$(CONFIG_VIRTIO_RNG) += virtio-ccw-rng.o obj-$(CONFIG_VIRTIO_CRYPTO) += virtio-ccw-crypto.o obj-$(CONFIG_VIRTIO_GPU) += virtio-ccw-gpu.o +obj-$(CONFIG_VIRTIO_INPUT) += virtio-ccw-input.o obj-$(call land,$(CONFIG_VIRTIO_9P),$(CONFIG_VIRTFS)) += virtio-ccw-9p.o obj-$(CONFIG_VHOST_VSOCK) += vhost-vsock-ccw.o obj-y += css-bridge.o
hw/s390x/virtio-ccw-input.c new file +118 -0
118 lines not on this page · raw message
hw/s390x/virtio-ccw.c +0 -98
116 lines not on this page · raw message
Signature · 1 line
2.14.4
[Qemu-devel] [PULL 17/19] hw/s390x: Move virtio-ccw-net code to a separate file
In reply to Cornelia HuckFrom: Thomas Huth <[email protected]>
The code should only be enabled if CONFIG_VIRTIO_NET has been set. This can be done best if the code resides in a separate file.
Message-Id: <[email protected]>
--- hw/s390x/Makefile.objs | 1 + hw/s390x/virtio-ccw-net.c | 70 +++++++++++++++++++++++++++++++++++++++++++++++ hw/s390x/virtio-ccw.c | 49 --------------------------------- 3 files changed, 71 insertions(+), 49 deletions(-) create mode 100644 hw/s390x/virtio-ccw-net.c
hw/s390x/Makefile.objs +1 -0
@@ -15,6 +15,7 @@ obj-$(CONFIG_VIRTIO_RNG) += virtio-ccw-rng.o obj-$(CONFIG_VIRTIO_CRYPTO) += virtio-ccw-crypto.o obj-$(CONFIG_VIRTIO_GPU) += virtio-ccw-gpu.o obj-$(CONFIG_VIRTIO_INPUT) += virtio-ccw-input.o +obj-$(CONFIG_VIRTIO_NET) += virtio-ccw-net.o obj-$(call land,$(CONFIG_VIRTIO_9P),$(CONFIG_VIRTFS)) += virtio-ccw-9p.o obj-$(CONFIG_VHOST_VSOCK) += vhost-vsock-ccw.o obj-y += css-bridge.o
hw/s390x/virtio-ccw-net.c new file +70 -0
70 lines not on this page · raw message
hw/s390x/virtio-ccw.c +0 -49
67 lines not on this page · raw message
Signature · 1 line
2.14.4
[Qemu-devel] [PULL 18/19] hw/s390x: Move virtio-ccw-blk code to a separate file
In reply to Cornelia HuckFrom: Thomas Huth <[email protected]>
The code should only be enabled if CONFIG_VIRTIO_BLK has been set. This can be done best if the code resides in a separate file.
Message-Id: <[email protected]>
--- hw/s390x/Makefile.objs | 1 + hw/s390x/virtio-ccw-blk.c | 67 +++++++++++++++++++++++++++++++++++++++++++++++ hw/s390x/virtio-ccw.c | 46 -------------------------------- 3 files changed, 68 insertions(+), 46 deletions(-) create mode 100644 hw/s390x/virtio-ccw-blk.c
hw/s390x/Makefile.objs +1 -0
@@ -16,6 +16,7 @@ obj-$(CONFIG_VIRTIO_CRYPTO) += virtio-ccw-crypto.o obj-$(CONFIG_VIRTIO_GPU) += virtio-ccw-gpu.o obj-$(CONFIG_VIRTIO_INPUT) += virtio-ccw-input.o obj-$(CONFIG_VIRTIO_NET) += virtio-ccw-net.o +obj-$(CONFIG_VIRTIO_BLK) += virtio-ccw-blk.o obj-$(call land,$(CONFIG_VIRTIO_9P),$(CONFIG_VIRTFS)) += virtio-ccw-9p.o obj-$(CONFIG_VHOST_VSOCK) += vhost-vsock-ccw.o obj-y += css-bridge.o
hw/s390x/virtio-ccw-blk.c new file +67 -0
67 lines not on this page · raw message
hw/s390x/virtio-ccw.c +0 -46
64 lines not on this page · raw message
Signature · 1 line
2.14.4
[Qemu-devel] [PULL 19/19] target/s390x: use regular spaces in translate.c
In reply to Cornelia HuckFrom: Pavel Zbitskiy <[email protected]>
In a few places translate.c contains non-breaking spaces (0xc2 0xa0) instead of regular ones (0x20):
7c 7c c2 a0 63 63
7c 7c 20 63 63
| | c c
This confuses some text editors.
Message-Id: <[email protected]>
--- target/s390x/translate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
target/s390x/translate.c +2 -2
@@ -842,7 +842,7 @@ static void disas_jcc(DisasContext *s, DisasCompare *c, uint32_t mask) cond =TCG_COND_NE ; c->u.s32.b =tcg_const_i32 (1 );break ; -case 0x8 |0x2 :/* cc == 0 || cc == 2 => (cc & 1) == 0 */ +case 0x8 |0x2 :/* cc == 0 || cc == 2 => (cc & 1) == 0 */ cond =TCG_COND_EQ ; c->g1 = false; c->u.s32.a =tcg_temp_new_i32 ();
@@ -861,7 +861,7 @@ static void disas_jcc(DisasContext *s, DisasCompare *c, uint32_t mask) cond =TCG_COND_NE ; c->u.s32.b =tcg_const_i32 (0 );break ; -case 0x4 |0x1 :/* cc == 1 || cc == 3 => (cc & 1) != 0 */ +case 0x4 |0x1 :/* cc == 1 || cc == 3 => (cc & 1) != 0 */ cond =TCG_COND_NE ; c->g1 = false; c->u.s32.a =tcg_temp_new_i32 ();
Signature · 1 line
2.14.4
[Qemu-devel] [PULL 13/19] hw/s390x: Move virtio-ccw-crypto code to a separate file
In reply to Cornelia HuckFrom: Thomas Huth <[email protected]>
The code should only be enabled if CONFIG_VIRTIO_CRYPTO has been set. This can be done best if the code resides in a separate file.
Message-Id: <[email protected]>
--- hw/s390x/Makefile.objs | 1 + hw/s390x/virtio-ccw-crypto.c | 75 ++++++++++++++++++++++++++++++++++++++++++++ hw/s390x/virtio-ccw.c | 55 -------------------------------- 3 files changed, 76 insertions(+), 55 deletions(-) create mode 100644 hw/s390x/virtio-ccw-crypto.c
hw/s390x/Makefile.objs +1 -0
@@ -12,6 +12,7 @@ obj-$(CONFIG_VIRTIO_SERIAL) += virtio-ccw-serial.o obj-$(CONFIG_VIRTIO_BALLOON) += virtio-ccw-balloon.o obj-$(CONFIG_VIRTIO_SCSI) += virtio-ccw-scsi.o obj-$(CONFIG_VIRTIO_RNG) += virtio-ccw-rng.o +obj-$(CONFIG_VIRTIO_CRYPTO) += virtio-ccw-crypto.o obj-$(call land,$(CONFIG_VIRTIO_9P),$(CONFIG_VIRTFS)) += virtio-ccw-9p.o obj-y += css-bridge.o obj-y += ccw-device.o
hw/s390x/virtio-ccw-crypto.c new file +75 -0
75 lines not on this page · raw message
hw/s390x/virtio-ccw.c +0 -55
73 lines not on this page · raw message
Signature · 1 line
2.14.4
[Qemu-devel] [PULL 14/19] hw/s390x: Move vhost-vsock-ccw code to a separate file
In reply to Cornelia HuckFrom: Thomas Huth <[email protected]>
The code should only be enabled if CONFIG_VHOST_VSOCK has been set. This can be done best if the code resides in a separate file.
Message-Id: <[email protected]>
--- MAINTAINERS | 1 + hw/s390x/Makefile.objs | 1 + hw/s390x/vhost-vsock-ccw.c | 60 ++++++++++++++++++++++++++++++++++++++++++++++ hw/s390x/virtio-ccw.c | 47 ------------------------------------ 4 files changed, 62 insertions(+), 47 deletions(-) create mode 100644 hw/s390x/vhost-vsock-ccw.c
MAINTAINERS +1 -0
@@ -1238,6 +1238,7 @@ M: Cornelia Huck <[email protected]> M: Christian Borntraeger <[email protected]> S: Supported F: hw/s390x/virtio-ccw*.[hc] +F: hw/s390x/vhost-vsock-ccw.c T: git git://github.com/cohuck/qemu.git s390-next T: git git://github.com/borntraeger/qemu.git s390-next L: [email protected]
hw/s390x/Makefile.objs +1 -0
@@ -14,6 +14,7 @@ obj-$(CONFIG_VIRTIO_SCSI) += virtio-ccw-scsi.o obj-$(CONFIG_VIRTIO_RNG) += virtio-ccw-rng.o obj-$(CONFIG_VIRTIO_CRYPTO) += virtio-ccw-crypto.o obj-$(call land,$(CONFIG_VIRTIO_9P),$(CONFIG_VIRTFS)) += virtio-ccw-9p.o +obj-$(CONFIG_VHOST_VSOCK) += vhost-vsock-ccw.o obj-y += css-bridge.o obj-y += ccw-device.o obj-$(CONFIG_PCI) += s390-pci-bus.o s390-pci-inst.o
hw/s390x/vhost-vsock-ccw.c new file +60 -0
60 lines not on this page · raw message
hw/s390x/virtio-ccw.c +0 -47
59 lines not on this page · raw message
Signature · 1 line
2.14.4
[Qemu-devel] [PULL 15/19] hw/s390x: Move virtio-ccw-gpu code to a separate file
In reply to Cornelia HuckFrom: Thomas Huth <[email protected]>
The code should only be enabled if CONFIG_VIRTIO_GPU has been set. This can be done best if the code resides in a separate file.
Message-Id: <[email protected]>
--- hw/s390x/Makefile.objs | 1 + hw/s390x/virtio-ccw-gpu.c | 67 +++++++++++++++++++++++++++++++++++++++++++++++ hw/s390x/virtio-ccw.c | 47 --------------------------------- 3 files changed, 68 insertions(+), 47 deletions(-) create mode 100644 hw/s390x/virtio-ccw-gpu.c
hw/s390x/Makefile.objs +1 -0
@@ -13,6 +13,7 @@ obj-$(CONFIG_VIRTIO_BALLOON) += virtio-ccw-balloon.o obj-$(CONFIG_VIRTIO_SCSI) += virtio-ccw-scsi.o obj-$(CONFIG_VIRTIO_RNG) += virtio-ccw-rng.o obj-$(CONFIG_VIRTIO_CRYPTO) += virtio-ccw-crypto.o +obj-$(CONFIG_VIRTIO_GPU) += virtio-ccw-gpu.o obj-$(call land,$(CONFIG_VIRTIO_9P),$(CONFIG_VIRTFS)) += virtio-ccw-9p.o obj-$(CONFIG_VHOST_VSOCK) += vhost-vsock-ccw.o obj-y += css-bridge.o
hw/s390x/virtio-ccw-gpu.c new file +67 -0
67 lines not on this page · raw message
hw/s390x/virtio-ccw.c +0 -47
65 lines not on this page · raw message
Signature · 1 line
2.14.4
[Qemu-devel] [PULL 12/19] hw/s390x: Move virtio-ccw-9p code to a separate file
In reply to Cornelia HuckFrom: Thomas Huth <[email protected]>
The code should only be enabled if CONFIG_VIRTIO_9P and CONFIG_VIRTFS have been set. This can be done best if the code resides in a separate file.
Message-Id: <[email protected]>
--- hw/s390x/Makefile.objs | 1 + hw/s390x/virtio-ccw-9p.c | 65 ++++++++++++++++++++++++++++++++++++++++++++++++ hw/s390x/virtio-ccw.c | 48 ----------------------------------- 3 files changed, 66 insertions(+), 48 deletions(-) create mode 100644 hw/s390x/virtio-ccw-9p.c
hw/s390x/Makefile.objs +1 -0
@@ -12,6 +12,7 @@ obj-$(CONFIG_VIRTIO_SERIAL) += virtio-ccw-serial.o obj-$(CONFIG_VIRTIO_BALLOON) += virtio-ccw-balloon.o obj-$(CONFIG_VIRTIO_SCSI) += virtio-ccw-scsi.o obj-$(CONFIG_VIRTIO_RNG) += virtio-ccw-rng.o +obj-$(call land,$(CONFIG_VIRTIO_9P),$(CONFIG_VIRTFS)) += virtio-ccw-9p.o obj-y += css-bridge.o obj-y += ccw-device.o obj-$(CONFIG_PCI) += s390-pci-bus.o s390-pci-inst.o
hw/s390x/virtio-ccw-9p.c new file +65 -0
65 lines not on this page · raw message
hw/s390x/virtio-ccw.c +0 -48
60 lines not on this page · raw message
Signature · 1 line
2.14.4
[Qemu-devel] [PULL 09/19] hw/s390x: Move virtio-ccw-balloon code to a separate file
In reply to Cornelia HuckFrom: Thomas Huth <[email protected]>
The code should only be enabled if CONFIG_VIRTIO_BALLOON has been set. This can be done best if the code resides in a separate file.
Message-Id: <[email protected]>
--- hw/s390x/Makefile.objs | 1 + hw/s390x/virtio-ccw-balloon.c | 70 +++++++++++++++++++++++++++++++++++++++++++ hw/s390x/virtio-ccw.c | 49 ------------------------------ 3 files changed, 71 insertions(+), 49 deletions(-) create mode 100644 hw/s390x/virtio-ccw-balloon.c
hw/s390x/Makefile.objs +1 -0
@@ -9,6 +9,7 @@ obj-y += s390-virtio-ccw.o obj-y += 3270-ccw.o obj-y += virtio-ccw.o obj-$(CONFIG_VIRTIO_SERIAL) += virtio-ccw-serial.o +obj-$(CONFIG_VIRTIO_BALLOON) += virtio-ccw-balloon.o obj-y += css-bridge.o obj-y += ccw-device.o obj-$(CONFIG_PCI) += s390-pci-bus.o s390-pci-inst.o
hw/s390x/virtio-ccw-balloon.c new file +70 -0
70 lines not on this page · raw message
hw/s390x/virtio-ccw.c +0 -49
67 lines not on this page · raw message
Signature · 1 line
2.14.4
[Qemu-devel] [PULL 10/19] hw/s390x: Move virtio-ccw-scsi code to a separate file
In reply to Cornelia HuckFrom: Thomas Huth <[email protected]>
The code should only be enabled if CONFIG_VIRTIO_SCSI has been set. This can be done best if the code resides in a separate file.
Message-Id: <[email protected]>
--- hw/s390x/Makefile.objs | 1 + hw/s390x/virtio-ccw-scsi.c | 125 +++++++++++++++++++++++++++++++++++++++++++++ hw/s390x/virtio-ccw.c | 104 ------------------------------------- 3 files changed, 126 insertions(+), 104 deletions(-) create mode 100644 hw/s390x/virtio-ccw-scsi.c
hw/s390x/Makefile.objs +1 -0
@@ -10,6 +10,7 @@ obj-y += 3270-ccw.o obj-y += virtio-ccw.o obj-$(CONFIG_VIRTIO_SERIAL) += virtio-ccw-serial.o obj-$(CONFIG_VIRTIO_BALLOON) += virtio-ccw-balloon.o +obj-$(CONFIG_VIRTIO_SCSI) += virtio-ccw-scsi.o obj-y += css-bridge.o obj-y += ccw-device.o obj-$(CONFIG_PCI) += s390-pci-bus.o s390-pci-inst.o
hw/s390x/virtio-ccw-scsi.c new file +125 -0
125 lines not on this page · raw message
hw/s390x/virtio-ccw.c +0 -104
122 lines not on this page · raw message
Signature · 1 line
2.14.4
[Qemu-devel] [PULL 11/19] hw/s390x: Move virtio-ccw-rng code to a separate file
In reply to Cornelia HuckFrom: Thomas Huth <[email protected]>
The code should only be enabled if CONFIG_VIRTIO_RNG has been set. This can be done best if the code resides in a separate file.
Message-Id: <[email protected]>
--- hw/s390x/Makefile.objs | 1 + hw/s390x/virtio-ccw-rng.c | 74 +++++++++++++++++++++++++++++++++++++++++++++++ hw/s390x/virtio-ccw.c | 53 --------------------------------- 3 files changed, 75 insertions(+), 53 deletions(-) create mode 100644 hw/s390x/virtio-ccw-rng.c
hw/s390x/Makefile.objs +1 -0
@@ -11,6 +11,7 @@ obj-y += virtio-ccw.o obj-$(CONFIG_VIRTIO_SERIAL) += virtio-ccw-serial.o obj-$(CONFIG_VIRTIO_BALLOON) += virtio-ccw-balloon.o obj-$(CONFIG_VIRTIO_SCSI) += virtio-ccw-scsi.o +obj-$(CONFIG_VIRTIO_RNG) += virtio-ccw-rng.o obj-y += css-bridge.o obj-y += ccw-device.o obj-$(CONFIG_PCI) += s390-pci-bus.o s390-pci-inst.o
hw/s390x/virtio-ccw-rng.c new file +74 -0
74 lines not on this page · raw message
hw/s390x/virtio-ccw.c +0 -53
71 lines not on this page · raw message
Signature · 1 line
2.14.4
[Qemu-devel] [PULL 07/19] hw/s390x/virtio-ccw: Consolidate calls to virtio_ccw_unrealize()
In reply to Cornelia HuckFrom: Thomas Huth <[email protected]>
Currently, every virtio-ccw device explicitely sets its unrealize function to virtio_ccw_unrealize() in its class_init function. We can simplify this by using a common unrealize function, just like it is already done for the realize functions.
Message-Id: <[email protected]>
--- hw/s390x/virtio-ccw.c | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-)
hw/s390x/virtio-ccw.c +7 -15
@@ -747,11 +747,16 @@ out_err:g_free (sch); } -static void virtio_ccw_unrealize (VirtioCcwDevice *dev,Error **errp) +static void virtio_ccw_device_unrealize (VirtioCcwDevice *dev,Error **errp) { +VirtIOCCWDeviceClass *dc =VIRTIO_CCW_DEVICE_GET_CLASS (dev);CcwDevice *ccw_dev =CCW_DEVICE (dev);SubchDev *sch = ccw_dev->sch; +if (dc->unrealize) { + dc->unrealize (dev, errp); + } +if (sch) {css_subch_assign (sch->cssid, sch->ssid, sch->schid, sch->devno,NULL );g_free (sch);
@@ -1346,7 +1351,6 @@ static void virtio_ccw_net_class_init(ObjectClass *klass, void *data)VirtIOCCWDeviceClass *k =VIRTIO_CCW_DEVICE_CLASS (klass); k->realize = virtio_ccw_net_realize; - k->unrealize = virtio_ccw_unrealize; dc->props = virtio_ccw_net_properties;set_bit (DEVICE_CATEGORY_NETWORK , dc->categories); }
@@ -1373,7 +1377,6 @@ static void virtio_ccw_blk_class_init(ObjectClass *klass, void *data)VirtIOCCWDeviceClass *k =VIRTIO_CCW_DEVICE_CLASS (klass); k->realize = virtio_ccw_blk_realize; - k->unrealize = virtio_ccw_unrealize; dc->props = virtio_ccw_blk_properties;set_bit (DEVICE_CATEGORY_STORAGE , dc->categories); }
@@ -1400,7 +1403,6 @@ static void virtio_ccw_serial_class_init(ObjectClass *klass, void *data)VirtIOCCWDeviceClass *k =VIRTIO_CCW_DEVICE_CLASS (klass); k->realize = virtio_ccw_serial_realize; - k->unrealize = virtio_ccw_unrealize; dc->props = virtio_ccw_serial_properties;set_bit (DEVICE_CATEGORY_INPUT , dc->categories); }
@@ -1427,7 +1429,6 @@ static void virtio_ccw_balloon_class_init(ObjectClass *klass, void *data)VirtIOCCWDeviceClass *k =VIRTIO_CCW_DEVICE_CLASS (klass); k->realize = virtio_ccw_balloon_realize; - k->unrealize = virtio_ccw_unrealize; dc->props = virtio_ccw_balloon_properties;set_bit (DEVICE_CATEGORY_MISC , dc->categories); }
@@ -1454,7 +1455,6 @@ static void virtio_ccw_scsi_class_init(ObjectClass *klass, void *data)VirtIOCCWDeviceClass *k =VIRTIO_CCW_DEVICE_CLASS (klass); k->realize = virtio_ccw_scsi_realize; - k->unrealize = virtio_ccw_unrealize; dc->props = virtio_ccw_scsi_properties;set_bit (DEVICE_CATEGORY_STORAGE , dc->categories); }
@@ -1480,7 +1480,6 @@ static void vhost_ccw_scsi_class_init(ObjectClass *klass, void *data)VirtIOCCWDeviceClass *k =VIRTIO_CCW_DEVICE_CLASS (klass); k->realize = vhost_ccw_scsi_realize; - k->unrealize = virtio_ccw_unrealize; dc->props = vhost_ccw_scsi_properties;set_bit (DEVICE_CATEGORY_STORAGE , dc->categories); }
@@ -1516,7 +1515,6 @@ static void virtio_ccw_rng_class_init(ObjectClass *klass, void *data)VirtIOCCWDeviceClass *k =VIRTIO_CCW_DEVICE_CLASS (klass); k->realize = virtio_ccw_rng_realize; - k->unrealize = virtio_ccw_unrealize; dc->props = virtio_ccw_rng_properties;set_bit (DEVICE_CATEGORY_MISC , dc->categories); }
@@ -1553,7 +1551,6 @@ static void virtio_ccw_crypto_class_init(ObjectClass *klass, void *data)VirtIOCCWDeviceClass *k =VIRTIO_CCW_DEVICE_CLASS (klass); k->realize = virtio_ccw_crypto_realize; - k->unrealize = virtio_ccw_unrealize; dc->props = virtio_ccw_crypto_properties;set_bit (DEVICE_CATEGORY_MISC , dc->categories); }
@@ -1590,7 +1587,6 @@ static void virtio_ccw_gpu_class_init(ObjectClass *klass, void *data)VirtIOCCWDeviceClass *k =VIRTIO_CCW_DEVICE_CLASS (klass); k->realize = virtio_ccw_gpu_realize; - k->unrealize = virtio_ccw_unrealize; dc->props = virtio_ccw_gpu_properties; dc->hotpluggable = false;set_bit (DEVICE_CATEGORY_DISPLAY , dc->categories);
@@ -1618,7 +1614,6 @@ static void virtio_ccw_input_class_init(ObjectClass *klass, void *data)VirtIOCCWDeviceClass *k =VIRTIO_CCW_DEVICE_CLASS (klass); k->realize = virtio_ccw_input_realize; - k->unrealize = virtio_ccw_unrealize; dc->props = virtio_ccw_input_properties;set_bit (DEVICE_CATEGORY_INPUT , dc->categories); }
@@ -1700,9 +1695,8 @@ static void virtio_ccw_busdev_realize(DeviceState *dev, Error **errp)static void virtio_ccw_busdev_unrealize (DeviceState *dev,Error **errp) {VirtioCcwDevice *_dev = (VirtioCcwDevice *)dev; -VirtIOCCWDeviceClass *_info =VIRTIO_CCW_DEVICE_GET_CLASS (dev); - _info->unrealize (_dev, errp); +virtio_ccw_device_unrealize (_dev, errp); } static void virtio_ccw_busdev_unplug(HotplugHandler *hotplug_dev,
@@ -1798,7 +1792,6 @@ static void virtio_ccw_9p_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass);VirtIOCCWDeviceClass *k =VIRTIO_CCW_DEVICE_CLASS (klass); - k->unrealize = virtio_ccw_unrealize; k->realize = virtio_ccw_9p_realize; dc->props = virtio_ccw_9p_properties;set_bit (DEVICE_CATEGORY_STORAGE , dc->categories);
@@ -1844,7 +1837,6 @@ static void vhost_vsock_ccw_class_init(ObjectClass *klass, void *data)VirtIOCCWDeviceClass *k =VIRTIO_CCW_DEVICE_CLASS (klass); k->realize = vhost_vsock_ccw_realize; - k->unrealize = virtio_ccw_unrealize;set_bit (DEVICE_CATEGORY_MISC , dc->categories); dc->props = vhost_vsock_ccw_properties; }
Signature · 1 line
2.14.4
[Qemu-devel] [PULL 08/19] hw/s390x: Move virtio-ccw-serial code to a separate file
In reply to Cornelia HuckFrom: Thomas Huth <[email protected]>
The code should only be enabled if CONFIG_VIRTIO_SERIAL has been set. This can be done best if the code resides in a separate file.
Message-Id: <[email protected]>
--- MAINTAINERS | 2 +- hw/s390x/Makefile.objs | 1 + hw/s390x/virtio-ccw-serial.c | 78 ++++++++++++++++++++++++++++++++++++++++++++ hw/s390x/virtio-ccw.c | 58 -------------------------------- 4 files changed, 80 insertions(+), 59 deletions(-) create mode 100644 hw/s390x/virtio-ccw-serial.c
MAINTAINERS +1 -1
@@ -1237,7 +1237,7 @@ virtio-ccw M: Cornelia Huck <[email protected]> M: Christian Borntraeger <[email protected]> S: Supported -F: hw/s390x/virtio-ccw.[hc] +F: hw/s390x/virtio-ccw*.[hc] T: git git://github.com/cohuck/qemu.git s390-next T: git git://github.com/borntraeger/qemu.git s390-next L: [email protected]
hw/s390x/Makefile.objs +1 -0
@@ -8,6 +8,7 @@ obj-y += css.o obj-y += s390-virtio-ccw.o obj-y += 3270-ccw.o obj-y += virtio-ccw.o +obj-$(CONFIG_VIRTIO_SERIAL) += virtio-ccw-serial.o obj-y += css-bridge.o obj-y += ccw-device.o obj-$(CONFIG_PCI) += s390-pci-bus.o s390-pci-inst.o
hw/s390x/virtio-ccw-serial.c new file +78 -0
78 lines not on this page · raw message
hw/s390x/virtio-ccw.c +0 -58
82 lines not on this page · raw message
Signature · 1 line
2.14.4
[Qemu-devel] [PULL 04/19] target/s390x: fix IPM polluting irrelevant bits
In reply to Cornelia HuckFrom: Pavel Zbitskiy <[email protected]>
Suppose psw.mask=0x0000000080000000, cc=2, r1=0 and we do "ipm 1". This command must touch only bits 32-39, so the expected output is r1=0x20000000. However, currently qemu yields r1=0x20008000, because irrelevant parts of PSW leak into r1 during program mask transfer.
Message-Id: <[email protected]>
--- target/s390x/translate.c | 17 +++++++---------- tests/tcg/s390x/Makefile.target | 1 + tests/tcg/s390x/ipm.c | 22 ++++++++++++++++++++++ 3 files changed, 30 insertions(+), 10 deletions(-) create mode 100644 tests/tcg/s390x/ipm.c
target/s390x/translate.c +7 -10
@@ -2444,20 +2444,17 @@ static DisasJumpType op_insi(DisasContext *s, DisasOps *o)static DisasJumpType op_ipm (DisasContext *s,DisasOps *o) { -TCGv_i64 t1; +TCGv_i64 t1, t2;gen_op_calc_cc (s); -tcg_gen_andi_i64 (o->out, o->out, ~0xff000000ull ); - t1 =tcg_temp_new_i64 (); -tcg_gen_shli_i64 (t1, psw_mask,20 ); -tcg_gen_shri_i64 (t1, t1,36 ); -tcg_gen_or_i64 (o->out, o->out, t1); - -tcg_gen_extu_i32_i64 (t1, cc_op); -tcg_gen_shli_i64 (t1, t1,28 ); -tcg_gen_or_i64 (o->out, o->out, t1); +tcg_gen_extract_i64 (t1, psw_mask,40 ,4 ); + t2 =tcg_temp_new_i64 (); +tcg_gen_extu_i32_i64 (t2, cc_op); +tcg_gen_deposit_i64 (t1, t1, t2,4 ,60 ); +tcg_gen_deposit_i64 (o->out, o->out, t1,24 ,8 );tcg_temp_free_i64 (t1); +tcg_temp_free_i64 (t2);return DISAS_NEXT ; }
tests/tcg/s390x/Makefile.target +1 -0
@@ -2,3 +2,4 @@ VPATH+=$(SRC_PATH)/tests/tcg/s390x CFLAGS+=-march=zEC12 -m64 TESTS+=hello-s390x TESTS+=csst +TESTS+=ipm
tests/tcg/s390x/ipm.c new file +22 -0
@@ -0,0 +1,22 @@ +#include <stdint.h> +#include <unistd.h> + +int main (void ) +{ +uint32_t op1 =0x55555555 ; +uint32_t op2 =0x44444444 ; +uint64_t cc =0xffffffffffffffffull ; + + asmvolatile ( +" clc 0(4,%[op1]),0(%[op2])\n" +" ipm %[cc]\n" + : [cc]"+r" (cc) + : [op1]"r" (&op1), + [op2]"r" (&op2) + :"cc" ); +if (cc !=0xffffffff20ffffffull ) { +write (1 ,"bad cc\n" ,7 ); +return 1 ; + } +return 0 ; +}
Signature · 1 line
2.14.4
[Qemu-devel] [PULL 05/19] target/s390x: add EX support for TRT and TRTR
In reply to Cornelia HuckFrom: Pavel Zbitskiy <[email protected]>
Improves "b213c9f5: target/s390x: Implement TRTR" by introducing the intermediate functions, which are compatible with dx_helper type.
Message-Id: <[email protected]>
--- target/s390x/mem_helper.c | 16 ++++++++++++++ tests/tcg/s390x/Makefile.target | 2 ++ tests/tcg/s390x/exrl-trt.c | 48 +++++++++++++++++++++++++++++++++++++++++ tests/tcg/s390x/exrl-trtr.c | 48 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 114 insertions(+) create mode 100644 tests/tcg/s390x/exrl-trt.c create mode 100644 tests/tcg/s390x/exrl-trtr.c
target/s390x/mem_helper.c +16 -0
@@ -1299,12 +1299,26 @@ static inline uint32_t do_helper_trt(CPUS390XState *env, int len,return 0 ; } +static uint32_t do_helper_trt_fwd (CPUS390XState *env,uint32_t len, +uint64_t array,uint64_t trans, +uintptr_t ra) +{ +return do_helper_trt (env, len, array, trans,1 , ra); +} +uint32_t HELPER (trt )(CPUS390XState *env,uint32_t len,uint64_t array,uint64_t trans) {return do_helper_trt (env, len, array, trans,1 ,GETPC ()); } +static uint32_t do_helper_trt_bkwd (CPUS390XState *env,uint32_t len, +uint64_t array,uint64_t trans, +uintptr_t ra) +{ +return do_helper_trt (env, len, array, trans,-1 , ra); +} +uint32_t HELPER (trtr )(CPUS390XState *env,uint32_t len,uint64_t array,uint64_t trans) {
@@ -2193,12 +2207,14 @@ void HELPER(ex)(CPUS390XState *env, uint32_t ilen, uint64_t r1, uint64_t addr)typedef uint32_t (*dx_helper )(CPUS390XState *,uint32_t ,uint64_t ,uint64_t ,uintptr_t );static const dx_helper dx[16 ] = { + [0x0 ] = do_helper_trt_bkwd, [0x2 ] = do_helper_mvc, [0x4 ] = do_helper_nc, [0x5 ] = do_helper_clc, [0x6 ] = do_helper_oc, [0x7 ] = do_helper_xc, [0xc ] = do_helper_tr, + [0xd ] = do_helper_trt_fwd, };dx_helper helper = dx[opc &0xf ];
tests/tcg/s390x/Makefile.target +2 -0
@@ -3,3 +3,5 @@ CFLAGS+=-march=zEC12 -m64 TESTS+=hello-s390x TESTS+=csst TESTS+=ipm +TESTS+=exrl-trt +TESTS+=exrl-trtr
tests/tcg/s390x/exrl-trt.c new file +48 -0
48 lines not on this page · raw message
tests/tcg/s390x/exrl-trtr.c new file +48 -0
48 lines not on this page · raw message
Signature · 1 line
2.14.4
[Qemu-devel] [PULL 06/19] target/s390x: fix PACK reading 1 byte less and writing 1 byte more
In reply to Cornelia HuckFrom: Pavel Zbitskiy <[email protected]>
PACK fails on the test from the Principles of Operation: F1F2F3F4 becomes 0000234C instead of 0001234C due to an off-by-one error. Furthermore, it overwrites one extra byte to the left of F1.
If len_dest is 0, then we only want to flip the 1st byte and never loop over the rest. Therefore, the loop condition should be > and not >=.
If len_src is 1, then we should flip the 1st byte and pack the 2nd. Since len_src is already decremented before the loop, the first condition should be >=, and not >.
Likewise for len_src == 2 and the second condition.
Message-Id: <[email protected]>
--- target/s390x/mem_helper.c | 6 +++--- tests/tcg/s390x/Makefile.target | 1 + tests/tcg/s390x/pack.c | 21 +++++++++++++++++++++ 3 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 tests/tcg/s390x/pack.c
target/s390x/mem_helper.c +3 -3
@@ -1019,15 +1019,15 @@ void HELPER(pack)(CPUS390XState *env, uint32_t len, uint64_t dest, uint64_t src) len_src--;/* now pack every value */ -while (len_dest >=0 ) { +while (len_dest >0 ) { b =0 ; -if (len_src >0 ) { +if (len_src >=0 ) { b =cpu_ldub_data_ra (env, src, ra) &0x0f ; src--; len_src--; } -if (len_src >0 ) { +if (len_src >=0 ) { b |=cpu_ldub_data_ra (env, src, ra) <<4 ; src--; len_src--;
tests/tcg/s390x/Makefile.target +1 -0
@@ -5,3 +5,4 @@ TESTS+=csst TESTS+=ipm TESTS+=exrl-trt TESTS+=exrl-trtr +TESTS+=pack
tests/tcg/s390x/pack.c new file +21 -0
@@ -0,0 +1,21 @@ +#include <unistd.h> + +int main (void ) +{ +char data[] = {0xaa ,0xaa ,0xf1 ,0xf2 ,0xf3 ,0xc4 ,0xaa ,0xaa }; +char exp[] = {0xaa ,0xaa ,0x00 ,0x01 ,0x23 ,0x4c ,0xaa ,0xaa }; +int i; + + asmvolatile ( +" pack 2(4,%[data]),2(4,%[data])\n" + : + : [data]"r" (&data[0 ]) + :"memory" ); +for (i =0 ; i <8 ; i++) { +if (data[i] != exp[i]) { +write (1 ,"bad data\n" ,9 ); +return 1 ; + } + } +return 0 ; +}
Signature · 1 line
2.14.4
[Qemu-devel] [PULL 01/19] tests/tcg: add a simple s390x test
In reply to Cornelia HuckFrom: Pavel Zbitskiy <[email protected]>
Copied from alpha.
Message-Id: <[email protected]>
--- MAINTAINERS | 1 + tests/tcg/s390x/Makefile.target | 3 +++ tests/tcg/s390x/hello-s390x.c | 7 +++++++ 3 files changed, 11 insertions(+) create mode 100644 tests/tcg/s390x/Makefile.target create mode 100644 tests/tcg/s390x/hello-s390x.c
MAINTAINERS +1 -0
@@ -253,6 +253,7 @@ S: Maintained F: target/s390x/ F: hw/s390x/ F: disas/s390.c +F: tests/tcg/s390x/ L: [email protected] SH4
tests/tcg/s390x/Makefile.target new file +3 -0
@@ -0,0 +1,3 @@ +VPATH+=$(SRC_PATH)/tests/tcg/s390x +CFLAGS+=-march=zEC12 -m64 +TESTS+=hello-s390x
tests/tcg/s390x/hello-s390x.c new file +7 -0
@@ -0,0 +1,7 @@ +#include <unistd.h> + +int main (void ) +{ +write (1 ,"hello\n" ,6 ); +return 0 ; +}
Signature · 1 line
2.14.4
[Qemu-devel] [PULL 02/19] target/s390x: add BAL and BALR instructions
In reply to Cornelia HuckFrom: Pavel Zbitskiy <[email protected]>
These instructions are provided for compatibility purposes and are used only by old software, in the new code BAS and BASR are preferred. The difference between the old and new instruction exists only in the 24-bit mode.
In addition, fix BAS polluting high 32 bits of the first operand in 24- and 31-bit addressing modes.
Message-Id: <[email protected]>
--- target/s390x/insn-data.def | 3 +++ target/s390x/translate.c | 54 ++++++++++++++++++++++++++++++++++++++++------ 2 files changed, 50 insertions(+), 7 deletions(-)
target/s390x/insn-data.def +3 -0
@@ -102,6 +102,9 @@ D(0x9400, NI, SI, Z, la1, i2_8u, new, 0, ni, nz64, MO_UB) D(0xeb54, NIY, SIY, LD, la1, i2_8u, new, 0, ni, nz64, MO_UB) +/* BRANCH AND LINK */ + C(0x0500, BALR, RR_a, Z, 0, r2_nz, r1, 0, bal, 0) + C(0x4500, BAL, RX_a, Z, 0, a2, r1, 0, bal, 0) /* BRANCH AND SAVE */ C(0x0d00, BASR, RR_a, Z, 0, r2_nz, r1, 0, bas, 0) C(0x4d00, BAS, RX_a, Z, 0, a2, r1, 0, bas, 0)
target/s390x/translate.c +47 -7
75 lines not on this page · raw message
Signature · 1 line
2.14.4
[Qemu-devel] [PULL 03/19] target/s390x: fix CSST decoding and runtime alignment check
In reply to Cornelia HuckFrom: Pavel Zbitskiy <[email protected]>
CSST is defined as:
C(0xc802, CSST, SSF, CASS, la1, a2, 0, 0, csst, 0)
It means that the first parameter is handled by in1_la1(). in1_la1() fills addr1 field, and not in1.
Furthermore, when extract32() is used for the alignment check, the third parameter should specify the number of trailing bits that must be 0. For FC these numbers are:
FC=0 (word, 4 bytes): 2
FC=1 (double word, 8 bytes): 3
FC=2 (quad word, 16 bytes): 4For SC these numbers correspond to the size:
SC=0: 0
SC=1: 1
SC=2: 2
SC=3: 3
SC=4: 4Message-Id: <[email protected]>
--- target/s390x/mem_helper.c | 2 +- target/s390x/translate.c | 4 ++-- tests/tcg/s390x/Makefile.target | 1 + tests/tcg/s390x/csst.c | 43 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 47 insertions(+), 3 deletions(-) create mode 100644 tests/tcg/s390x/csst.c
target/s390x/mem_helper.c +1 -1
@@ -1442,7 +1442,7 @@ static uint32_t do_csst(CPUS390XState *env, uint32_t r3, uint64_t a1, }/* Sanity check the alignments. */ -if (extract32 (a1,0 ,4 << fc) ||extract32 (a2,0 ,1 << sc)) { +if (extract32 (a1,0 , fc +2 ) ||extract32 (a2,0 , sc)) { goto spec_exception; }
target/s390x/translate.c +2 -2
@@ -2058,9 +2058,9 @@ static DisasJumpType op_csst(DisasContext *s, DisasOps *o)TCGv_i32 t_r3 =tcg_const_i32 (r3);if (tb_cflags (s->base.tb) &CF_PARALLEL ) { -gen_helper_csst_parallel (cc_op, cpu_env, t_r3, o->in1, o->in2); +gen_helper_csst_parallel (cc_op, cpu_env, t_r3, o->addr1, o->in2); }else { -gen_helper_csst (cc_op, cpu_env, t_r3, o->in1, o->in2); +gen_helper_csst (cc_op, cpu_env, t_r3, o->addr1, o->in2); }tcg_temp_free_i32 (t_r3);
tests/tcg/s390x/Makefile.target +1 -0
@@ -1,3 +1,4 @@ VPATH+=$(SRC_PATH)/tests/tcg/s390x CFLAGS+=-march=zEC12 -m64 TESTS+=hello-s390x +TESTS+=csst
tests/tcg/s390x/csst.c new file +43 -0
43 lines not on this page · raw message
Signature · 1 line
2.14.4
The following changes since commit 19b599f7664b2ebfd0f405fb79c14dd241557452:
Merge remote-tracking branch 'remotes/armbru/tags/pull-error-2018-08-27-v2' into staging (2018-08-27 16:44:20 +0100)
are available in the Git repository at:
git://github.com/cohuck/qemu tags/s390x-20180829
for you to fetch changes up to ef17064acc752d47377b1b263ef328e1281ab48e:
target/s390x: use regular spaces in translate.c (2018-08-28 17:37:01 +0200)
----------------------------------------------------------------
- various fixes and improvements in the tcg code
- split off the individual virtio-ccw devices into separate files
----------------------------------------------------------------
Pavel Zbitskiy (7):
tests/tcg: add a simple s390x test
target/s390x: add BAL and BALR instructions target/s390x: fix CSST decoding and runtime alignment check target/s390x: fix IPM polluting irrelevant bits target/s390x: add EX support for TRT and TRTR target/s390x: fix PACK reading 1 byte less and writing 1 byte more target/s390x: use regular spaces in translate.c
Thomas Huth (12):
hw/s390x/virtio-ccw: Consolidate calls to virtio_ccw_unrealize() hw/s390x: Move virtio-ccw-serial code to a separate file hw/s390x: Move virtio-ccw-balloon code to a separate file hw/s390x: Move virtio-ccw-scsi code to a separate file hw/s390x: Move virtio-ccw-rng code to a separate file hw/s390x: Move virtio-ccw-9p code to a separate file hw/s390x: Move virtio-ccw-crypto code to a separate file hw/s390x: Move vhost-vsock-ccw code to a separate file hw/s390x: Move virtio-ccw-gpu code to a separate file hw/s390x: Move virtio-ccw-input code to a separate file hw/s390x: Move virtio-ccw-net code to a separate file hw/s390x: Move virtio-ccw-blk code to a separate file
MAINTAINERS | 4 +- hw/s390x/Makefile.objs | 11 + hw/s390x/vhost-vsock-ccw.c | 60 ++++ hw/s390x/virtio-ccw-9p.c | 65 ++++ hw/s390x/virtio-ccw-balloon.c | 70 +++++ hw/s390x/virtio-ccw-blk.c | 67 ++++ hw/s390x/virtio-ccw-crypto.c | 75 +++++ hw/s390x/virtio-ccw-gpu.c | 67 ++++ hw/s390x/virtio-ccw-input.c | 118 +++++++ hw/s390x/virtio-ccw-net.c | 70 +++++ hw/s390x/virtio-ccw-rng.c | 74 +++++ hw/s390x/virtio-ccw-scsi.c | 125 ++++++++ hw/s390x/virtio-ccw-serial.c | 78 +++++ hw/s390x/virtio-ccw.c | 676 +--------------------------------------- target/s390x/insn-data.def | 3 + target/s390x/mem_helper.c | 24 +- target/s390x/translate.c | 79 +++-- tests/tcg/s390x/Makefile.target | 8 + tests/tcg/s390x/csst.c | 43 +++ tests/tcg/s390x/exrl-trt.c | 48 +++ tests/tcg/s390x/exrl-trtr.c | 48 +++ tests/tcg/s390x/hello-s390x.c | 7 + tests/tcg/s390x/ipm.c | 22 ++ tests/tcg/s390x/pack.c | 21 ++ 24 files changed, 1168 insertions(+), 695 deletions(-) create mode 100644 hw/s390x/vhost-vsock-ccw.c create mode 100644 hw/s390x/virtio-ccw-9p.c create mode 100644 hw/s390x/virtio-ccw-balloon.c create mode 100644 hw/s390x/virtio-ccw-blk.c create mode 100644 hw/s390x/virtio-ccw-crypto.c create mode 100644 hw/s390x/virtio-ccw-gpu.c create mode 100644 hw/s390x/virtio-ccw-input.c create mode 100644 hw/s390x/virtio-ccw-net.c create mode 100644 hw/s390x/virtio-ccw-rng.c create mode 100644 hw/s390x/virtio-ccw-scsi.c create mode 100644 hw/s390x/virtio-ccw-serial.c create mode 100644 tests/tcg/s390x/Makefile.target create mode 100644 tests/tcg/s390x/csst.c create mode 100644 tests/tcg/s390x/exrl-trt.c create mode 100644 tests/tcg/s390x/exrl-trtr.c create mode 100644 tests/tcg/s390x/hello-s390x.c create mode 100644 tests/tcg/s390x/ipm.c create mode 100644 tests/tcg/s390x/pack.c
Signature · 1 line
2.14.4