qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v5 0/7] virtio-serial refactoring.
@ 2013-04-04 14:28 fred.konrad
  2013-04-04 14:28 ` [Qemu-devel] [PATCH v5 1/7] virtio-serial: add the virtio-serial device fred.konrad
                   ` (9 more replies)
  0 siblings, 10 replies; 16+ messages in thread
From: fred.konrad @ 2013-04-04 14:28 UTC (permalink / raw)
  To: qemu-devel, aliguori
  Cc: cornelia.huck, peter.maydell, mark.burton, fred.konrad

From: KONRAD Frederic <fred.konrad@greensocs.com>

This is the next part of virtio-refactoring.

Basically it creates virtio-serial device which extends virtio-device.
Then a virtio-serial can be connected on a virtio-bus.
virtio-serial-pci, virtio-serial-s390 and virtio-serial-ccw are created too,
they extend respectively virtio-pci, virtio-s390-device, virtio-ccw-device and
have a virtio-serial.

You can checkout my branch here:

git://project.greensocs.com/qemu-virtio.git virtio-serial-v5

Note that it is nearly the same series as virtio-blk and virtio-scsi
refactoring.

I made basic tests (with linux guests) on:
 * qemu-system-i386

Changes v4 -> v5:
    * Fixed rebase issue with nvector and the clarifying comment.
    * Changed property macro for s390 and ccw device too.

Changes v3 -> v4:
    * Removed serial configuration field ommited in VirtioCCWDevice structure.

Changes v2 -> v3:
    * Added CCW device.
    * Rebased.

Thanks,

Fred

KONRAD Frederic (7):
  virtio-serial: add the virtio-serial device.
  virtio-serial-pci: switch to the new API.
  virtio-serial-s390: switch to the new API.
  virtio-serial-ccw: switch to the new API.
  virtio-serial: cleanup: init and exit functions.
  virtio-serial: cleanup: use QOM casts.
  virtio-serial: cleanup: remove qdev field.

 hw/s390x/s390-virtio-bus.c |  31 +++++----
 hw/s390x/s390-virtio-bus.h |  12 +++-
 hw/s390x/virtio-ccw.c      |  29 +++++----
 hw/s390x/virtio-ccw.h      |  12 +++-
 hw/virtio-pci.c            | 131 +++++++++++++++++++------------------
 hw/virtio-pci.h            |  14 +++-
 hw/virtio-serial-bus.c     | 157 +++++++++++++++++++++++++++------------------
 hw/virtio-serial.h         |  13 +++-
 8 files changed, 239 insertions(+), 160 deletions(-)

-- 
1.7.11.7

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Qemu-devel] [PATCH v5 1/7] virtio-serial: add the virtio-serial device.
  2013-04-04 14:28 [Qemu-devel] [PATCH v5 0/7] virtio-serial refactoring fred.konrad
@ 2013-04-04 14:28 ` fred.konrad
  2013-04-04 14:29 ` [Qemu-devel] [PATCH v5 2/7] virtio-serial-pci: switch to the new API fred.konrad
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 16+ messages in thread
From: fred.konrad @ 2013-04-04 14:28 UTC (permalink / raw)
  To: qemu-devel, aliguori
  Cc: cornelia.huck, peter.maydell, mark.burton, Amit Shah, fred.konrad

From: KONRAD Frederic <fred.konrad@greensocs.com>

Create virtio-serial which extends virtio-device, so it can be connected
on virtio-bus.

Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>
---
 hw/s390x/s390-virtio-bus.c |  3 +-
 hw/s390x/virtio-ccw.c      |  3 +-
 hw/virtio-pci.c            |  2 +-
 hw/virtio-serial-bus.c     | 95 ++++++++++++++++++++++++++++++++++++++++++----
 hw/virtio-serial.h         |  9 +++++
 5 files changed, 100 insertions(+), 12 deletions(-)

diff --git a/hw/s390x/s390-virtio-bus.c b/hw/s390x/s390-virtio-bus.c
index 8c529c1..9dea36c 100644
--- a/hw/s390x/s390-virtio-bus.c
+++ b/hw/s390x/s390-virtio-bus.c
@@ -465,8 +465,7 @@ static const TypeInfo s390_virtio_blk = {
 };
 
 static Property s390_virtio_serial_properties[] = {
-    DEFINE_PROP_UINT32("max_ports", VirtIOS390Device,
-                       serial.max_virtserial_ports, 31),
+    DEFINE_VIRTIO_SERIAL_PROPERTIES(VirtIOS390Device, serial),
     DEFINE_PROP_END_OF_LIST(),
 };
 
diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c
index 5dce791..3710905 100644
--- a/hw/s390x/virtio-ccw.c
+++ b/hw/s390x/virtio-ccw.c
@@ -786,8 +786,7 @@ static const TypeInfo virtio_ccw_blk = {
 
 static Property virtio_ccw_serial_properties[] = {
     DEFINE_PROP_STRING("devno", VirtioCcwDevice, bus_id),
-    DEFINE_PROP_UINT32("max_ports", VirtioCcwDevice,
-                       serial.max_virtserial_ports, 31),
+    DEFINE_VIRTIO_SERIAL_PROPERTIES(VirtioCcwDevice, serial),
     DEFINE_VIRTIO_COMMON_FEATURES(VirtioCcwDevice, host_features[0]),
     DEFINE_PROP_END_OF_LIST(),
 };
diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c
index fb20722..6db67bf 100644
--- a/hw/virtio-pci.c
+++ b/hw/virtio-pci.c
@@ -1075,7 +1075,7 @@ static Property virtio_serial_properties[] = {
     DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors, 2),
     DEFINE_PROP_HEX32("class", VirtIOPCIProxy, class_code, 0),
     DEFINE_VIRTIO_COMMON_FEATURES(VirtIOPCIProxy, host_features),
-    DEFINE_PROP_UINT32("max_ports", VirtIOPCIProxy, serial.max_virtserial_ports, 31),
+    DEFINE_VIRTIO_SERIAL_PROPERTIES(VirtIOPCIProxy, serial),
     DEFINE_PROP_END_OF_LIST(),
 };
 
diff --git a/hw/virtio-serial-bus.c b/hw/virtio-serial-bus.c
index a9cb114..9608039 100644
--- a/hw/virtio-serial-bus.c
+++ b/hw/virtio-serial-bus.c
@@ -887,10 +887,12 @@ static int virtser_port_qdev_exit(DeviceState *qdev)
     return 0;
 }
 
-VirtIODevice *virtio_serial_init(DeviceState *dev, virtio_serial_conf *conf)
+static VirtIODevice *virtio_serial_common_init(DeviceState *dev,
+                                               virtio_serial_conf *conf,
+                                               VirtIODevice **pvdev)
 {
     VirtIOSerial *vser;
-    VirtIODevice *vdev;
+    VirtIODevice *vdev = *pvdev;
     uint32_t i, max_supported_ports;
 
     if (!conf->max_virtserial_ports)
@@ -904,11 +906,22 @@ VirtIODevice *virtio_serial_init(DeviceState *dev, virtio_serial_conf *conf)
         return NULL;
     }
 
-    vdev = virtio_common_init("virtio-serial", VIRTIO_ID_CONSOLE,
-                              sizeof(struct virtio_console_config),
-                              sizeof(VirtIOSerial));
-
-    vser = DO_UPCAST(VirtIOSerial, vdev, vdev);
+    /*
+     * We have two cases here: the old virtio-serial-pci device, and the
+     * refactored virtio-serial.
+     */
+    if (vdev == NULL) {
+        /* virtio-serial-pci */
+        vdev = virtio_common_init("virtio-serial", VIRTIO_ID_CONSOLE,
+                                  sizeof(struct virtio_console_config),
+                                  sizeof(VirtIOSerial));
+        vser = DO_UPCAST(VirtIOSerial, vdev, vdev);
+    } else {
+        /* virtio-serial */
+        virtio_init(vdev, "virtio-serial", VIRTIO_ID_CONSOLE,
+                    sizeof(struct virtio_console_config));
+        vser = VIRTIO_SERIAL(vdev);
+    }
 
     /* Spawn a new virtio-serial bus on which the ports will ride as devices */
     qbus_create_inplace(&vser->bus.qbus, TYPE_VIRTIO_SERIAL_BUS, dev, NULL);
@@ -972,6 +985,16 @@ VirtIODevice *virtio_serial_init(DeviceState *dev, virtio_serial_conf *conf)
     return vdev;
 }
 
+/*
+ * The two following functions will be cleaned up at the end.
+ */
+
+VirtIODevice *virtio_serial_init(DeviceState *dev, virtio_serial_conf *conf)
+{
+    VirtIODevice *vdev = NULL;
+    return virtio_serial_common_init(dev, conf, &vdev);
+}
+
 void virtio_serial_exit(VirtIODevice *vdev)
 {
     VirtIOSerial *vser = DO_UPCAST(VirtIOSerial, vdev, vdev);
@@ -1009,10 +1032,68 @@ static const TypeInfo virtio_serial_port_type_info = {
     .class_init = virtio_serial_port_class_init,
 };
 
+static int virtio_serial_device_init(VirtIODevice *vdev)
+{
+    DeviceState *qdev = DEVICE(vdev);
+    VirtIOSerial *vser = VIRTIO_SERIAL(vdev);
+    virtio_serial_conf *conf = &(vser->serial);
+    if (virtio_serial_common_init(qdev, conf, &vdev) == NULL) {
+        return -1;
+    }
+    return 0;
+}
+
+static int virtio_serial_device_exit(DeviceState *dev)
+{
+    VirtIOSerial *vser = VIRTIO_SERIAL(dev);
+    VirtIODevice *vdev = VIRTIO_DEVICE(dev);
+
+    unregister_savevm(dev, "virtio-console", vser);
+
+    g_free(vser->ivqs);
+    g_free(vser->ovqs);
+    g_free(vser->ports_map);
+    if (vser->post_load) {
+        g_free(vser->post_load->connected);
+        qemu_del_timer(vser->post_load->timer);
+        qemu_free_timer(vser->post_load->timer);
+        g_free(vser->post_load);
+    }
+    virtio_common_cleanup(vdev);
+    return 0;
+}
+
+static Property virtio_serial_properties[] = {
+    DEFINE_VIRTIO_SERIAL_PROPERTIES(VirtIOSerial, serial),
+    DEFINE_PROP_END_OF_LIST(),
+};
+
+static void virtio_serial_class_init(ObjectClass *klass, void *data)
+{
+    DeviceClass *dc = DEVICE_CLASS(klass);
+    VirtioDeviceClass *vdc = VIRTIO_DEVICE_CLASS(klass);
+    dc->exit = virtio_serial_device_exit;
+    dc->props = virtio_serial_properties;
+    vdc->init = virtio_serial_device_init;
+    vdc->get_features = get_features;
+    vdc->get_config = get_config;
+    vdc->set_config = set_config;
+    vdc->set_status = set_status;
+    vdc->reset = vser_reset;
+}
+
+static const TypeInfo virtio_device_info = {
+    .name = TYPE_VIRTIO_SERIAL,
+    .parent = TYPE_VIRTIO_DEVICE,
+    .instance_size = sizeof(VirtIOSerial),
+    .class_init = virtio_serial_class_init,
+};
+
 static void virtio_serial_register_types(void)
 {
     type_register_static(&virtser_bus_info);
     type_register_static(&virtio_serial_port_type_info);
+    type_register_static(&virtio_device_info);
 }
 
 type_init(virtio_serial_register_types)
diff --git a/hw/virtio-serial.h b/hw/virtio-serial.h
index 516400f..05f1ae4 100644
--- a/hw/virtio-serial.h
+++ b/hw/virtio-serial.h
@@ -210,6 +210,8 @@ struct VirtIOSerial {
     struct virtio_console_config config;
 
     struct VirtIOSerialPostLoad *post_load;
+
+    virtio_serial_conf serial;
 };
 
 /* Interface to the virtio-serial bus */
@@ -244,4 +246,11 @@ size_t virtio_serial_guest_ready(VirtIOSerialPort *port);
  */
 void virtio_serial_throttle_port(VirtIOSerialPort *port, bool throttle);
 
+#define TYPE_VIRTIO_SERIAL "virtio-serial"
+#define VIRTIO_SERIAL(obj) \
+        OBJECT_CHECK(VirtIOSerial, (obj), TYPE_VIRTIO_SERIAL)
+
+#define DEFINE_VIRTIO_SERIAL_PROPERTIES(_state, _field) \
+        DEFINE_PROP_UINT32("max_ports", _state, _field.max_virtserial_ports, 31)
+
 #endif
-- 
1.7.11.7

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Qemu-devel] [PATCH v5 2/7] virtio-serial-pci: switch to the new API.
  2013-04-04 14:28 [Qemu-devel] [PATCH v5 0/7] virtio-serial refactoring fred.konrad
  2013-04-04 14:28 ` [Qemu-devel] [PATCH v5 1/7] virtio-serial: add the virtio-serial device fred.konrad
@ 2013-04-04 14:29 ` fred.konrad
  2013-04-04 14:29 ` [Qemu-devel] [PATCH v5 3/7] virtio-serial-s390: " fred.konrad
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 16+ messages in thread
From: fred.konrad @ 2013-04-04 14:29 UTC (permalink / raw)
  To: qemu-devel, aliguori
  Cc: cornelia.huck, peter.maydell, mark.burton, fred.konrad

From: KONRAD Frederic <fred.konrad@greensocs.com>

Here the virtio-serial-pci is modified for the new API. The device
virtio-serial-pci extends virtio-pci. It creates and connects a
virtio-serial during the init. The properties are not changed.

Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>
---
 hw/virtio-pci.c | 131 ++++++++++++++++++++++++++++----------------------------
 hw/virtio-pci.h |  14 +++++-
 2 files changed, 78 insertions(+), 67 deletions(-)

diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c
index 6db67bf..58b8d39 100644
--- a/hw/virtio-pci.c
+++ b/hw/virtio-pci.c
@@ -942,40 +942,6 @@ static void virtio_exit_pci(PCIDevice *pci_dev)
     msix_uninit_exclusive_bar(pci_dev);
 }
 
-static int virtio_serial_init_pci(PCIDevice *pci_dev)
-{
-    VirtIOPCIProxy *proxy = DO_UPCAST(VirtIOPCIProxy, pci_dev, pci_dev);
-    VirtIODevice *vdev;
-
-    if (proxy->class_code != PCI_CLASS_COMMUNICATION_OTHER &&
-        proxy->class_code != PCI_CLASS_DISPLAY_OTHER && /* qemu 0.10 */
-        proxy->class_code != PCI_CLASS_OTHERS)          /* qemu-kvm  */
-        proxy->class_code = PCI_CLASS_COMMUNICATION_OTHER;
-
-    vdev = virtio_serial_init(&pci_dev->qdev, &proxy->serial);
-    if (!vdev) {
-        return -1;
-    }
-
-    /* backwards-compatibility with machines that were created with
-       DEV_NVECTORS_UNSPECIFIED */
-    vdev->nvectors = proxy->nvectors == DEV_NVECTORS_UNSPECIFIED
-                                        ? proxy->serial.max_virtserial_ports + 1
-                                        : proxy->nvectors;
-    virtio_init_pci(proxy, vdev);
-    proxy->nvectors = vdev->nvectors;
-    return 0;
-}
-
-static void virtio_serial_exit_pci(PCIDevice *pci_dev)
-{
-    VirtIOPCIProxy *proxy = DO_UPCAST(VirtIOPCIProxy, pci_dev, pci_dev);
-
-    virtio_pci_stop_ioeventfd(proxy);
-    virtio_serial_exit(proxy->vdev);
-    virtio_exit_pci(pci_dev);
-}
-
 static int virtio_net_init_pci(PCIDevice *pci_dev)
 {
     VirtIOPCIProxy *proxy = DO_UPCAST(VirtIOPCIProxy, pci_dev, pci_dev);
@@ -1070,37 +1036,6 @@ static const TypeInfo virtio_net_info = {
     .class_init    = virtio_net_class_init,
 };
 
-static Property virtio_serial_properties[] = {
-    DEFINE_PROP_BIT("ioeventfd", VirtIOPCIProxy, flags, VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT, true),
-    DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors, 2),
-    DEFINE_PROP_HEX32("class", VirtIOPCIProxy, class_code, 0),
-    DEFINE_VIRTIO_COMMON_FEATURES(VirtIOPCIProxy, host_features),
-    DEFINE_VIRTIO_SERIAL_PROPERTIES(VirtIOPCIProxy, serial),
-    DEFINE_PROP_END_OF_LIST(),
-};
-
-static void virtio_serial_class_init(ObjectClass *klass, void *data)
-{
-    DeviceClass *dc = DEVICE_CLASS(klass);
-    PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
-
-    k->init = virtio_serial_init_pci;
-    k->exit = virtio_serial_exit_pci;
-    k->vendor_id = PCI_VENDOR_ID_REDHAT_QUMRANET;
-    k->device_id = PCI_DEVICE_ID_VIRTIO_CONSOLE;
-    k->revision = VIRTIO_PCI_ABI_VERSION;
-    k->class_id = PCI_CLASS_COMMUNICATION_OTHER;
-    dc->reset = virtio_pci_reset;
-    dc->props = virtio_serial_properties;
-}
-
-static const TypeInfo virtio_serial_info = {
-    .name          = "virtio-serial-pci",
-    .parent        = TYPE_PCI_DEVICE,
-    .instance_size = sizeof(VirtIOPCIProxy),
-    .class_init    = virtio_serial_class_init,
-};
-
 static void virtio_rng_initfn(Object *obj)
 {
     PCIDevice *pci_dev = PCI_DEVICE(obj);
@@ -1460,6 +1395,70 @@ static const TypeInfo virtio_balloon_pci_info = {
     .class_init    = virtio_balloon_pci_class_init,
 };
 
+/* virtio-serial-pci */
+
+static int virtio_serial_pci_init(VirtIOPCIProxy *vpci_dev)
+{
+    VirtIOSerialPCI *dev = VIRTIO_SERIAL_PCI(vpci_dev);
+    DeviceState *vdev = DEVICE(&dev->vdev);
+
+    if (vpci_dev->class_code != PCI_CLASS_COMMUNICATION_OTHER &&
+        vpci_dev->class_code != PCI_CLASS_DISPLAY_OTHER && /* qemu 0.10 */
+        vpci_dev->class_code != PCI_CLASS_OTHERS) {        /* qemu-kvm  */
+            vpci_dev->class_code = PCI_CLASS_COMMUNICATION_OTHER;
+    }
+
+    /* backwards-compatibility with machines that were created with
+       DEV_NVECTORS_UNSPECIFIED */
+    if (vpci_dev->nvectors == DEV_NVECTORS_UNSPECIFIED) {
+        vpci_dev->nvectors = dev->vdev.serial.max_virtserial_ports + 1;
+    }
+
+    qdev_set_parent_bus(vdev, BUS(&vpci_dev->bus));
+    if (qdev_init(vdev) < 0) {
+        return -1;
+    }
+    return 0;
+}
+
+static Property virtio_serial_pci_properties[] = {
+    DEFINE_PROP_BIT("ioeventfd", VirtIOPCIProxy, flags,
+                    VIRTIO_PCI_FLAG_USE_IOEVENTFD_BIT, true),
+    DEFINE_PROP_UINT32("vectors", VirtIOPCIProxy, nvectors, 2),
+    DEFINE_PROP_HEX32("class", VirtIOPCIProxy, class_code, 0),
+    DEFINE_VIRTIO_COMMON_FEATURES(VirtIOPCIProxy, host_features),
+    DEFINE_VIRTIO_SERIAL_PROPERTIES(VirtIOSerialPCI, vdev.serial),
+    DEFINE_PROP_END_OF_LIST(),
+};
+
+static void virtio_serial_pci_class_init(ObjectClass *klass, void *data)
+{
+    DeviceClass *dc = DEVICE_CLASS(klass);
+    VirtioPCIClass *k = VIRTIO_PCI_CLASS(klass);
+    PCIDeviceClass *pcidev_k = PCI_DEVICE_CLASS(klass);
+    k->init = virtio_serial_pci_init;
+    dc->props = virtio_serial_pci_properties;
+    pcidev_k->vendor_id = PCI_VENDOR_ID_REDHAT_QUMRANET;
+    pcidev_k->device_id = PCI_DEVICE_ID_VIRTIO_CONSOLE;
+    pcidev_k->revision = VIRTIO_PCI_ABI_VERSION;
+    pcidev_k->class_id = PCI_CLASS_COMMUNICATION_OTHER;
+}
+
+static void virtio_serial_pci_instance_init(Object *obj)
+{
+    VirtIOSerialPCI *dev = VIRTIO_SERIAL_PCI(obj);
+    object_initialize(OBJECT(&dev->vdev), TYPE_VIRTIO_SERIAL);
+    object_property_add_child(obj, "virtio-backend", OBJECT(&dev->vdev), NULL);
+}
+
+static const TypeInfo virtio_serial_pci_info = {
+    .name          = TYPE_VIRTIO_SERIAL_PCI,
+    .parent        = TYPE_VIRTIO_PCI,
+    .instance_size = sizeof(VirtIOSerialPCI),
+    .instance_init = virtio_serial_pci_instance_init,
+    .class_init    = virtio_serial_pci_class_init,
+};
+
 /* virtio-pci-bus */
 
 void virtio_pci_bus_new(VirtioBusState *bus, VirtIOPCIProxy *dev)
@@ -1499,7 +1498,6 @@ static const TypeInfo virtio_pci_bus_info = {
 static void virtio_pci_register_types(void)
 {
     type_register_static(&virtio_net_info);
-    type_register_static(&virtio_serial_info);
     type_register_static(&virtio_rng_info);
     type_register_static(&virtio_pci_bus_info);
     type_register_static(&virtio_pci_info);
@@ -1509,6 +1507,7 @@ static void virtio_pci_register_types(void)
     type_register_static(&virtio_blk_pci_info);
     type_register_static(&virtio_scsi_pci_info);
     type_register_static(&virtio_balloon_pci_info);
+    type_register_static(&virtio_serial_pci_info);
 }
 
 type_init(virtio_pci_register_types)
diff --git a/hw/virtio-pci.h b/hw/virtio-pci.h
index f99f2eb..97cfce1 100644
--- a/hw/virtio-pci.h
+++ b/hw/virtio-pci.h
@@ -29,6 +29,7 @@ typedef struct VirtIOPCIProxy VirtIOPCIProxy;
 typedef struct VirtIOBlkPCI VirtIOBlkPCI;
 typedef struct VirtIOSCSIPCI VirtIOSCSIPCI;
 typedef struct VirtIOBalloonPCI VirtIOBalloonPCI;
+typedef struct VirtIOSerialPCI VirtIOSerialPCI;
 
 /* virtio-pci-bus */
 
@@ -82,7 +83,6 @@ struct VirtIOPCIProxy {
 #ifdef CONFIG_VIRTFS
     V9fsConf fsconf;
 #endif
-    virtio_serial_conf serial;
     virtio_net_conf net;
     VirtIORNGConf rng;
     bool ioeventfd_disabled;
@@ -130,6 +130,18 @@ struct VirtIOBalloonPCI {
     VirtIOBalloon vdev;
 };
 
+/*
+ * virtio-serial-pci: This extends VirtioPCIProxy.
+ */
+#define TYPE_VIRTIO_SERIAL_PCI "virtio-serial-pci"
+#define VIRTIO_SERIAL_PCI(obj) \
+        OBJECT_CHECK(VirtIOSerialPCI, (obj), TYPE_VIRTIO_SERIAL_PCI)
+
+struct VirtIOSerialPCI {
+    VirtIOPCIProxy parent_obj;
+    VirtIOSerial vdev;
+};
+
 void virtio_init_pci(VirtIOPCIProxy *proxy, VirtIODevice *vdev);
 void virtio_pci_bus_new(VirtioBusState *bus, VirtIOPCIProxy *dev);
 
-- 
1.7.11.7

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Qemu-devel] [PATCH v5 3/7] virtio-serial-s390: switch to the new API.
  2013-04-04 14:28 [Qemu-devel] [PATCH v5 0/7] virtio-serial refactoring fred.konrad
  2013-04-04 14:28 ` [Qemu-devel] [PATCH v5 1/7] virtio-serial: add the virtio-serial device fred.konrad
  2013-04-04 14:29 ` [Qemu-devel] [PATCH v5 2/7] virtio-serial-pci: switch to the new API fred.konrad
@ 2013-04-04 14:29 ` fred.konrad
  2013-04-04 14:29 ` [Qemu-devel] [PATCH v5 4/7] virtio-serial-ccw: " fred.konrad
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 16+ messages in thread
From: fred.konrad @ 2013-04-04 14:29 UTC (permalink / raw)
  To: qemu-devel, aliguori
  Cc: cornelia.huck, peter.maydell, mark.burton, fred.konrad

From: KONRAD Frederic <fred.konrad@greensocs.com>

Here the virtio-serial-s390 is modified for the new API. The device
virtio-serial-s390 extends virtio-s390-device as before. It creates and
connects a virtio-serial during the init. The properties are not
modified.

Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>
---
 hw/s390x/s390-virtio-bus.c | 30 ++++++++++++++++++++----------
 hw/s390x/s390-virtio-bus.h | 12 +++++++++++-
 2 files changed, 31 insertions(+), 11 deletions(-)

diff --git a/hw/s390x/s390-virtio-bus.c b/hw/s390x/s390-virtio-bus.c
index 9dea36c..a0103f1 100644
--- a/hw/s390x/s390-virtio-bus.c
+++ b/hw/s390x/s390-virtio-bus.c
@@ -181,27 +181,36 @@ static void s390_virtio_blk_instance_init(Object *obj)
     object_property_add_child(obj, "virtio-backend", OBJECT(&dev->vdev), NULL);
 }
 
-static int s390_virtio_serial_init(VirtIOS390Device *dev)
+static int s390_virtio_serial_init(VirtIOS390Device *s390_dev)
 {
+    VirtIOSerialS390 *dev = VIRTIO_SERIAL_S390(s390_dev);
+    DeviceState *vdev = DEVICE(&dev->vdev);
+    DeviceState *qdev = DEVICE(s390_dev);
     VirtIOS390Bus *bus;
-    VirtIODevice *vdev;
     int r;
 
-    bus = DO_UPCAST(VirtIOS390Bus, bus, dev->qdev.parent_bus);
+    bus = DO_UPCAST(VirtIOS390Bus, bus, qdev->parent_bus);
 
-    vdev = virtio_serial_init((DeviceState *)dev, &dev->serial);
-    if (!vdev) {
+    qdev_set_parent_bus(vdev, BUS(&s390_dev->bus));
+    if (qdev_init(vdev) < 0) {
         return -1;
     }
 
-    r = s390_virtio_device_init(dev, vdev);
+    r = s390_virtio_device_init(s390_dev, VIRTIO_DEVICE(vdev));
     if (!r) {
-        bus->console = dev;
+        bus->console = s390_dev;
     }
 
     return r;
 }
 
+static void s390_virtio_serial_instance_init(Object *obj)
+{
+    VirtIOSerialS390 *dev = VIRTIO_SERIAL_S390(obj);
+    object_initialize(OBJECT(&dev->vdev), TYPE_VIRTIO_SERIAL);
+    object_property_add_child(obj, "virtio-backend", OBJECT(&dev->vdev), NULL);
+}
+
 static int s390_virtio_scsi_init(VirtIOS390Device *s390_dev)
 {
     VirtIOSCSIS390 *dev = VIRTIO_SCSI_S390(s390_dev);
@@ -465,7 +474,7 @@ static const TypeInfo s390_virtio_blk = {
 };
 
 static Property s390_virtio_serial_properties[] = {
-    DEFINE_VIRTIO_SERIAL_PROPERTIES(VirtIOS390Device, serial),
+    DEFINE_VIRTIO_SERIAL_PROPERTIES(VirtIOSerialS390, vdev.serial),
     DEFINE_PROP_END_OF_LIST(),
 };
 
@@ -479,9 +488,10 @@ static void s390_virtio_serial_class_init(ObjectClass *klass, void *data)
 }
 
 static const TypeInfo s390_virtio_serial = {
-    .name          = "virtio-serial-s390",
+    .name          = TYPE_VIRTIO_SERIAL_S390,
     .parent        = TYPE_VIRTIO_S390_DEVICE,
-    .instance_size = sizeof(VirtIOS390Device),
+    .instance_size = sizeof(VirtIOSerialS390),
+    .instance_init = s390_virtio_serial_instance_init,
     .class_init    = s390_virtio_serial_class_init,
 };
 
diff --git a/hw/s390x/s390-virtio-bus.h b/hw/s390x/s390-virtio-bus.h
index ebe8794..95610e0 100644
--- a/hw/s390x/s390-virtio-bus.h
+++ b/hw/s390x/s390-virtio-bus.h
@@ -91,7 +91,6 @@ struct VirtIOS390Device {
     VirtIODevice *vdev;
     NICConf nic;
     uint32_t host_features;
-    virtio_serial_conf serial;
     virtio_net_conf net;
     VirtIORNGConf rng;
     VirtioBusState bus;
@@ -141,4 +140,15 @@ typedef struct VirtIOSCSIS390 {
     VirtIOSCSI vdev;
 } VirtIOSCSIS390;
 
+/* virtio-serial-s390 */
+
+#define TYPE_VIRTIO_SERIAL_S390 "virtio-serial-s390"
+#define VIRTIO_SERIAL_S390(obj) \
+        OBJECT_CHECK(VirtIOSerialS390, (obj), TYPE_VIRTIO_SERIAL_S390)
+
+typedef struct VirtIOSerialS390 {
+    VirtIOS390Device parent_obj;
+    VirtIOSerial vdev;
+} VirtIOSerialS390;
+
 #endif
-- 
1.7.11.7

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Qemu-devel] [PATCH v5 4/7] virtio-serial-ccw: switch to the new API.
  2013-04-04 14:28 [Qemu-devel] [PATCH v5 0/7] virtio-serial refactoring fred.konrad
                   ` (2 preceding siblings ...)
  2013-04-04 14:29 ` [Qemu-devel] [PATCH v5 3/7] virtio-serial-s390: " fred.konrad
@ 2013-04-04 14:29 ` fred.konrad
  2013-04-04 14:29 ` [Qemu-devel] [PATCH v5 5/7] virtio-serial: cleanup: init and exit functions fred.konrad
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 16+ messages in thread
From: fred.konrad @ 2013-04-04 14:29 UTC (permalink / raw)
  To: qemu-devel, aliguori
  Cc: cornelia.huck, peter.maydell, mark.burton, fred.konrad

From: KONRAD Frederic <fred.konrad@greensocs.com>

Here the virtio-serial-ccw is modified for the new API. The device
virtio-serial-ccw extends virtio-ccw-device as before. It creates and
connects a virtio-serial during the init. The properties are not modified.

Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>
---
 hw/s390x/virtio-ccw.c | 28 ++++++++++++++++------------
 hw/s390x/virtio-ccw.h | 12 +++++++++++-
 2 files changed, 27 insertions(+), 13 deletions(-)

diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c
index 3710905..e6977b8 100644
--- a/hw/s390x/virtio-ccw.c
+++ b/hw/s390x/virtio-ccw.c
@@ -590,22 +590,25 @@ static void virtio_ccw_blk_instance_init(Object *obj)
     object_property_add_child(obj, "virtio-backend", OBJECT(&dev->vdev), NULL);
 }
 
-static int virtio_ccw_serial_init(VirtioCcwDevice *dev)
+static int virtio_ccw_serial_init(VirtioCcwDevice *ccw_dev)
 {
-    VirtIODevice *vdev;
+    VirtioSerialCcw *dev = VIRTIO_SERIAL_CCW(ccw_dev);
+    DeviceState *vdev = DEVICE(&dev->vdev);
 
-    vdev = virtio_serial_init((DeviceState *)dev, &dev->serial);
-    if (!vdev) {
+    qdev_set_parent_bus(vdev, BUS(&ccw_dev->bus));
+    if (qdev_init(vdev) < 0) {
         return -1;
     }
 
-    return virtio_ccw_device_init(dev, vdev);
+    return virtio_ccw_device_init(ccw_dev, VIRTIO_DEVICE(vdev));
 }
 
-static int virtio_ccw_serial_exit(VirtioCcwDevice *dev)
+
+static void virtio_ccw_serial_instance_init(Object *obj)
 {
-    virtio_serial_exit(dev->vdev);
-    return virtio_ccw_exit(dev);
+    VirtioSerialCcw *dev = VIRTIO_SERIAL_CCW(obj);
+    object_initialize(OBJECT(&dev->vdev), TYPE_VIRTIO_SERIAL);
+    object_property_add_child(obj, "virtio-backend", OBJECT(&dev->vdev), NULL);
 }
 
 static int virtio_ccw_balloon_init(VirtioCcwDevice *ccw_dev)
@@ -786,7 +789,7 @@ static const TypeInfo virtio_ccw_blk = {
 
 static Property virtio_ccw_serial_properties[] = {
     DEFINE_PROP_STRING("devno", VirtioCcwDevice, bus_id),
-    DEFINE_VIRTIO_SERIAL_PROPERTIES(VirtioCcwDevice, serial),
+    DEFINE_VIRTIO_SERIAL_PROPERTIES(VirtioSerialCcw, vdev.serial),
     DEFINE_VIRTIO_COMMON_FEATURES(VirtioCcwDevice, host_features[0]),
     DEFINE_PROP_END_OF_LIST(),
 };
@@ -797,15 +800,16 @@ static void virtio_ccw_serial_class_init(ObjectClass *klass, void *data)
     VirtIOCCWDeviceClass *k = VIRTIO_CCW_DEVICE_CLASS(klass);
 
     k->init = virtio_ccw_serial_init;
-    k->exit = virtio_ccw_serial_exit;
+    k->exit = virtio_ccw_exit;
     dc->reset = virtio_ccw_reset;
     dc->props = virtio_ccw_serial_properties;
 }
 
 static const TypeInfo virtio_ccw_serial = {
-    .name          = "virtio-serial-ccw",
+    .name          = TYPE_VIRTIO_SERIAL_CCW,
     .parent        = TYPE_VIRTIO_CCW_DEVICE,
-    .instance_size = sizeof(VirtioCcwDevice),
+    .instance_size = sizeof(VirtioSerialCcw),
+    .instance_init = virtio_ccw_serial_instance_init,
     .class_init    = virtio_ccw_serial_class_init,
 };
 
diff --git a/hw/s390x/virtio-ccw.h b/hw/s390x/virtio-ccw.h
index d580510..cebcbcd 100644
--- a/hw/s390x/virtio-ccw.h
+++ b/hw/s390x/virtio-ccw.h
@@ -75,7 +75,6 @@ struct VirtioCcwDevice {
     char *bus_id;
     NICConf nic;
     uint32_t host_features[VIRTIO_CCW_FEATURE_SIZE];
-    virtio_serial_conf serial;
     virtio_net_conf net;
     VirtIORNGConf rng;
     VirtioBusState bus;
@@ -127,6 +126,17 @@ typedef struct VirtIOBalloonCcw {
     VirtIOBalloon vdev;
 } VirtIOBalloonCcw;
 
+/* virtio-serial-ccw */
+
+#define TYPE_VIRTIO_SERIAL_CCW "virtio-serial-ccw"
+#define VIRTIO_SERIAL_CCW(obj) \
+        OBJECT_CHECK(VirtioSerialCcw, (obj), TYPE_VIRTIO_SERIAL_CCW)
+
+typedef struct VirtioSerialCcw {
+    VirtioCcwDevice parent_obj;
+    VirtIOSerial vdev;
+} VirtioSerialCcw;
+
 VirtualCssBus *virtual_css_bus_init(void);
 void virtio_ccw_device_update_status(SubchDev *sch);
 VirtIODevice *virtio_ccw_get_vdev(SubchDev *sch);
-- 
1.7.11.7

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Qemu-devel] [PATCH v5 5/7] virtio-serial: cleanup: init and exit functions.
  2013-04-04 14:28 [Qemu-devel] [PATCH v5 0/7] virtio-serial refactoring fred.konrad
                   ` (3 preceding siblings ...)
  2013-04-04 14:29 ` [Qemu-devel] [PATCH v5 4/7] virtio-serial-ccw: " fred.konrad
@ 2013-04-04 14:29 ` fred.konrad
  2013-04-04 14:29 ` [Qemu-devel] [PATCH v5 6/7] virtio-serial: cleanup: use QOM casts fred.konrad
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 16+ messages in thread
From: fred.konrad @ 2013-04-04 14:29 UTC (permalink / raw)
  To: qemu-devel, aliguori
  Cc: cornelia.huck, peter.maydell, mark.burton, Amit Shah, fred.konrad

From: KONRAD Frederic <fred.konrad@greensocs.com>

This remove old init and exit function as they are no longer needed.

Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>
---
 hw/virtio-serial-bus.c | 94 +++++++++++---------------------------------------
 1 file changed, 21 insertions(+), 73 deletions(-)

diff --git a/hw/virtio-serial-bus.c b/hw/virtio-serial-bus.c
index 9608039..b2b5529 100644
--- a/hw/virtio-serial-bus.c
+++ b/hw/virtio-serial-bus.c
@@ -887,51 +887,38 @@ static int virtser_port_qdev_exit(DeviceState *qdev)
     return 0;
 }
 
-static VirtIODevice *virtio_serial_common_init(DeviceState *dev,
-                                               virtio_serial_conf *conf,
-                                               VirtIODevice **pvdev)
+static int virtio_serial_device_init(VirtIODevice *vdev)
 {
-    VirtIOSerial *vser;
-    VirtIODevice *vdev = *pvdev;
+    DeviceState *qdev = DEVICE(vdev);
+    VirtIOSerial *vser = VIRTIO_SERIAL(vdev);
     uint32_t i, max_supported_ports;
 
-    if (!conf->max_virtserial_ports)
-        return NULL;
+    if (!vser->serial.max_virtserial_ports) {
+        return -1;
+    }
 
     /* Each port takes 2 queues, and one pair is for the control queue */
     max_supported_ports = VIRTIO_PCI_QUEUE_MAX / 2 - 1;
 
-    if (conf->max_virtserial_ports > max_supported_ports) {
+    if (vser->serial.max_virtserial_ports > max_supported_ports) {
         error_report("maximum ports supported: %u", max_supported_ports);
-        return NULL;
+        return -1;
     }
 
-    /*
-     * We have two cases here: the old virtio-serial-pci device, and the
-     * refactored virtio-serial.
-     */
-    if (vdev == NULL) {
-        /* virtio-serial-pci */
-        vdev = virtio_common_init("virtio-serial", VIRTIO_ID_CONSOLE,
-                                  sizeof(struct virtio_console_config),
-                                  sizeof(VirtIOSerial));
-        vser = DO_UPCAST(VirtIOSerial, vdev, vdev);
-    } else {
-        /* virtio-serial */
-        virtio_init(vdev, "virtio-serial", VIRTIO_ID_CONSOLE,
-                    sizeof(struct virtio_console_config));
-        vser = VIRTIO_SERIAL(vdev);
-    }
+    virtio_init(vdev, "virtio-serial", VIRTIO_ID_CONSOLE,
+                sizeof(struct virtio_console_config));
 
     /* Spawn a new virtio-serial bus on which the ports will ride as devices */
-    qbus_create_inplace(&vser->bus.qbus, TYPE_VIRTIO_SERIAL_BUS, dev, NULL);
+    qbus_create_inplace(&vser->bus.qbus, TYPE_VIRTIO_SERIAL_BUS, qdev, NULL);
     vser->bus.qbus.allow_hotplug = 1;
     vser->bus.vser = vser;
     QTAILQ_INIT(&vser->ports);
 
-    vser->bus.max_nr_ports = conf->max_virtserial_ports;
-    vser->ivqs = g_malloc(conf->max_virtserial_ports * sizeof(VirtQueue *));
-    vser->ovqs = g_malloc(conf->max_virtserial_ports * sizeof(VirtQueue *));
+    vser->bus.max_nr_ports = vser->serial.max_virtserial_ports;
+    vser->ivqs = g_malloc(vser->serial.max_virtserial_ports
+                          * sizeof(VirtQueue *));
+    vser->ovqs = g_malloc(vser->serial.max_virtserial_ports
+                          * sizeof(VirtQueue *));
 
     /* Add a queue for host to guest transfers for port 0 (backward compat) */
     vser->ivqs[0] = virtio_add_queue(vdev, 128, handle_input);
@@ -956,8 +943,8 @@ static VirtIODevice *virtio_serial_common_init(DeviceState *dev,
         vser->ovqs[i] = virtio_add_queue(vdev, 128, handle_output);
     }
 
-    vser->config.max_nr_ports = tswap32(conf->max_virtserial_ports);
-    vser->ports_map = g_malloc0(((conf->max_virtserial_ports + 31) / 32)
+    vser->config.max_nr_ports = tswap32(vser->serial.max_virtserial_ports);
+    vser->ports_map = g_malloc0(((vser->serial.max_virtserial_ports + 31) / 32)
         * sizeof(vser->ports_map[0]));
     /*
      * Reserve location 0 for a console port for backward compat
@@ -971,7 +958,7 @@ static VirtIODevice *virtio_serial_common_init(DeviceState *dev,
     vser->vdev.set_status = set_status;
     vser->vdev.reset = vser_reset;
 
-    vser->qdev = dev;
+    vser->qdev = qdev;
 
     vser->post_load = NULL;
 
@@ -979,38 +966,10 @@ static VirtIODevice *virtio_serial_common_init(DeviceState *dev,
      * Register for the savevm section with the virtio-console name
      * to preserve backward compat
      */
-    register_savevm(dev, "virtio-console", -1, 3, virtio_serial_save,
+    register_savevm(qdev, "virtio-console", -1, 3, virtio_serial_save,
                     virtio_serial_load, vser);
 
-    return vdev;
-}
-
-/*
- * The two following functions will be cleaned up at the end.
- */
-
-VirtIODevice *virtio_serial_init(DeviceState *dev, virtio_serial_conf *conf)
-{
-    VirtIODevice *vdev = NULL;
-    return virtio_serial_common_init(dev, conf, &vdev);
-}
-
-void virtio_serial_exit(VirtIODevice *vdev)
-{
-    VirtIOSerial *vser = DO_UPCAST(VirtIOSerial, vdev, vdev);
-
-    unregister_savevm(vser->qdev, "virtio-console", vser);
-
-    g_free(vser->ivqs);
-    g_free(vser->ovqs);
-    g_free(vser->ports_map);
-    if (vser->post_load) {
-        g_free(vser->post_load->connected);
-        qemu_del_timer(vser->post_load->timer);
-        qemu_free_timer(vser->post_load->timer);
-        g_free(vser->post_load);
-    }
-    virtio_cleanup(vdev);
+    return 0;
 }
 
 static void virtio_serial_port_class_init(ObjectClass *klass, void *data)
@@ -1032,17 +991,6 @@ static const TypeInfo virtio_serial_port_type_info = {
     .class_init = virtio_serial_port_class_init,
 };
 
-static int virtio_serial_device_init(VirtIODevice *vdev)
-{
-    DeviceState *qdev = DEVICE(vdev);
-    VirtIOSerial *vser = VIRTIO_SERIAL(vdev);
-    virtio_serial_conf *conf = &(vser->serial);
-    if (virtio_serial_common_init(qdev, conf, &vdev) == NULL) {
-        return -1;
-    }
-    return 0;
-}
-
 static int virtio_serial_device_exit(DeviceState *dev)
 {
     VirtIOSerial *vser = VIRTIO_SERIAL(dev);
-- 
1.7.11.7

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Qemu-devel] [PATCH v5 6/7] virtio-serial: cleanup: use QOM casts.
  2013-04-04 14:28 [Qemu-devel] [PATCH v5 0/7] virtio-serial refactoring fred.konrad
                   ` (4 preceding siblings ...)
  2013-04-04 14:29 ` [Qemu-devel] [PATCH v5 5/7] virtio-serial: cleanup: init and exit functions fred.konrad
@ 2013-04-04 14:29 ` fred.konrad
  2013-04-04 14:29 ` [Qemu-devel] [PATCH v5 7/7] virtio-serial: cleanup: remove qdev field fred.konrad
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 16+ messages in thread
From: fred.konrad @ 2013-04-04 14:29 UTC (permalink / raw)
  To: qemu-devel, aliguori
  Cc: cornelia.huck, peter.maydell, mark.burton, Amit Shah, fred.konrad

From: KONRAD Frederic <fred.konrad@greensocs.com>

As the virtio-serial-pci and virtio-serial-s390 are switched to the new
API, we can use QOM casts.

Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>
---
 hw/virtio-serial-bus.c | 50 ++++++++++++++++++++++++++------------------------
 hw/virtio-serial.h     |  2 +-
 2 files changed, 27 insertions(+), 25 deletions(-)

diff --git a/hw/virtio-serial-bus.c b/hw/virtio-serial-bus.c
index b2b5529..05bbb47 100644
--- a/hw/virtio-serial-bus.c
+++ b/hw/virtio-serial-bus.c
@@ -53,7 +53,8 @@ static VirtIOSerialPort *find_port_by_vq(VirtIOSerial *vser, VirtQueue *vq)
 
 static bool use_multiport(VirtIOSerial *vser)
 {
-    return vser->vdev.guest_features & (1 << VIRTIO_CONSOLE_F_MULTIPORT);
+    VirtIODevice *vdev = VIRTIO_DEVICE(vser);
+    return vdev->guest_features & (1 << VIRTIO_CONSOLE_F_MULTIPORT);
 }
 
 static size_t write_to_port(VirtIOSerialPort *port,
@@ -83,7 +84,7 @@ static size_t write_to_port(VirtIOSerialPort *port,
         virtqueue_push(vq, &elem, len);
     }
 
-    virtio_notify(&port->vser->vdev, vq);
+    virtio_notify(VIRTIO_DEVICE(port->vser), vq);
     return offset;
 }
 
@@ -156,7 +157,7 @@ static void flush_queued_data(VirtIOSerialPort *port)
     if (!virtio_queue_ready(port->ovq)) {
         return;
     }
-    do_flush_queued_data(port, port->ovq, &port->vser->vdev);
+    do_flush_queued_data(port, port->ovq, VIRTIO_DEVICE(port->vser));
 }
 
 static size_t send_control_msg(VirtIOSerial *vser, void *buf, size_t len)
@@ -175,7 +176,7 @@ static size_t send_control_msg(VirtIOSerial *vser, void *buf, size_t len)
     memcpy(elem.in_sg[0].iov_base, buf, len);
 
     virtqueue_push(vq, &elem, len);
-    virtio_notify(&vser->vdev, vq);
+    virtio_notify(VIRTIO_DEVICE(vser), vq);
     return len;
 }
 
@@ -214,7 +215,7 @@ int virtio_serial_close(VirtIOSerialPort *port)
      * consume, reset the throttling flag and discard the data.
      */
     port->throttled = false;
-    discard_vq_data(port->ovq, &port->vser->vdev);
+    discard_vq_data(port->ovq, VIRTIO_DEVICE(port->vser));
 
     send_control_event(port->vser, port->id, VIRTIO_CONSOLE_PORT_OPEN, 0);
 
@@ -237,11 +238,12 @@ ssize_t virtio_serial_write(VirtIOSerialPort *port, const uint8_t *buf,
  */
 size_t virtio_serial_guest_ready(VirtIOSerialPort *port)
 {
+    VirtIODevice *vdev = VIRTIO_DEVICE(port->vser);
     VirtQueue *vq = port->ivq;
     unsigned int bytes;
 
     if (!virtio_queue_ready(vq) ||
-        !(port->vser->vdev.status & VIRTIO_CONFIG_S_DRIVER_OK) ||
+        !(vdev->status & VIRTIO_CONFIG_S_DRIVER_OK) ||
         virtio_queue_empty(vq)) {
         return 0;
     }
@@ -391,7 +393,7 @@ static void control_out(VirtIODevice *vdev, VirtQueue *vq)
     uint8_t *buf;
     size_t len;
 
-    vser = DO_UPCAST(VirtIOSerial, vdev, vdev);
+    vser = VIRTIO_SERIAL(vdev);
 
     len = 0;
     buf = NULL;
@@ -424,7 +426,7 @@ static void handle_output(VirtIODevice *vdev, VirtQueue *vq)
     VirtIOSerial *vser;
     VirtIOSerialPort *port;
 
-    vser = DO_UPCAST(VirtIOSerial, vdev, vdev);
+    vser = VIRTIO_SERIAL(vdev);
     port = find_port_by_vq(vser, vq);
 
     if (!port || !port->host_connected) {
@@ -446,7 +448,7 @@ static uint32_t get_features(VirtIODevice *vdev, uint32_t features)
 {
     VirtIOSerial *vser;
 
-    vser = DO_UPCAST(VirtIOSerial, vdev, vdev);
+    vser = VIRTIO_SERIAL(vdev);
 
     if (vser->bus.max_nr_ports > 1) {
         features |= (1 << VIRTIO_CONSOLE_F_MULTIPORT);
@@ -459,7 +461,7 @@ static void get_config(VirtIODevice *vdev, uint8_t *config_data)
 {
     VirtIOSerial *vser;
 
-    vser = DO_UPCAST(VirtIOSerial, vdev, vdev);
+    vser = VIRTIO_SERIAL(vdev);
     memcpy(config_data, &vser->config, sizeof(struct virtio_console_config));
 }
 
@@ -491,7 +493,7 @@ static void set_status(VirtIODevice *vdev, uint8_t status)
     VirtIOSerial *vser;
     VirtIOSerialPort *port;
 
-    vser = DO_UPCAST(VirtIOSerial, vdev, vdev);
+    vser = VIRTIO_SERIAL(vdev);
     port = find_port_by_id(vser, 0);
 
     if (port && !use_multiport(port->vser)
@@ -513,19 +515,19 @@ static void vser_reset(VirtIODevice *vdev)
 {
     VirtIOSerial *vser;
 
-    vser = DO_UPCAST(VirtIOSerial, vdev, vdev);
+    vser = VIRTIO_SERIAL(vdev);
     guest_reset(vser);
 }
 
 static void virtio_serial_save(QEMUFile *f, void *opaque)
 {
-    VirtIOSerial *s = opaque;
+    VirtIOSerial *s = VIRTIO_SERIAL(opaque);
     VirtIOSerialPort *port;
     uint32_t nr_active_ports;
     unsigned int i, max_nr_ports;
 
     /* The virtio device */
-    virtio_save(&s->vdev, f);
+    virtio_save(VIRTIO_DEVICE(s), f);
 
     /* The config space */
     qemu_put_be16s(f, &s->config.cols);
@@ -576,7 +578,7 @@ static void virtio_serial_save(QEMUFile *f, void *opaque)
 static void virtio_serial_post_load_timer_cb(void *opaque)
 {
     uint32_t i;
-    VirtIOSerial *s = opaque;
+    VirtIOSerial *s = VIRTIO_SERIAL(opaque);
     VirtIOSerialPort *port;
     uint8_t host_connected;
     VirtIOSerialPortClass *vsc;
@@ -664,7 +666,7 @@ static int fetch_active_ports_list(QEMUFile *f, int version_id,
 
 static int virtio_serial_load(QEMUFile *f, void *opaque, int version_id)
 {
-    VirtIOSerial *s = opaque;
+    VirtIOSerial *s = VIRTIO_SERIAL(opaque);
     uint32_t max_nr_ports, nr_active_ports, ports_map;
     unsigned int i;
     int ret;
@@ -674,7 +676,7 @@ static int virtio_serial_load(QEMUFile *f, void *opaque, int version_id)
     }
 
     /* The virtio device */
-    ret = virtio_load(&s->vdev, f);
+    ret = virtio_load(VIRTIO_DEVICE(s), f);
     if (ret) {
         return ret;
     }
@@ -801,7 +803,7 @@ static void remove_port(VirtIOSerial *vser, uint32_t port_id)
     assert(port);
 
     /* Flush out any unconsumed buffers first */
-    discard_vq_data(port->ovq, &port->vser->vdev);
+    discard_vq_data(port->ovq, VIRTIO_DEVICE(port->vser));
 
     send_control_event(vser, port->id, VIRTIO_CONSOLE_PORT_REMOVE, 1);
 }
@@ -865,7 +867,7 @@ static int virtser_port_qdev_init(DeviceState *qdev)
     add_port(port->vser, port->id);
 
     /* Send an update to the guest about this new port added */
-    virtio_notify_config(&port->vser->vdev);
+    virtio_notify_config(VIRTIO_DEVICE(port->vser));
 
     return ret;
 }
@@ -952,11 +954,11 @@ static int virtio_serial_device_init(VirtIODevice *vdev)
      */
     mark_port_added(vser, 0);
 
-    vser->vdev.get_features = get_features;
-    vser->vdev.get_config = get_config;
-    vser->vdev.set_config = set_config;
-    vser->vdev.set_status = set_status;
-    vser->vdev.reset = vser_reset;
+    vdev->get_features = get_features;
+    vdev->get_config = get_config;
+    vdev->set_config = set_config;
+    vdev->set_status = set_status;
+    vdev->reset = vser_reset;
 
     vser->qdev = qdev;
 
diff --git a/hw/virtio-serial.h b/hw/virtio-serial.h
index 05f1ae4..6a01e8b 100644
--- a/hw/virtio-serial.h
+++ b/hw/virtio-serial.h
@@ -192,7 +192,7 @@ typedef struct VirtIOSerialPostLoad {
 } VirtIOSerialPostLoad;
 
 struct VirtIOSerial {
-    VirtIODevice vdev;
+    VirtIODevice parent_obj;
 
     VirtQueue *c_ivq, *c_ovq;
     /* Arrays of ivqs and ovqs: one per port */
-- 
1.7.11.7

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Qemu-devel] [PATCH v5 7/7] virtio-serial: cleanup: remove qdev field.
  2013-04-04 14:28 [Qemu-devel] [PATCH v5 0/7] virtio-serial refactoring fred.konrad
                   ` (5 preceding siblings ...)
  2013-04-04 14:29 ` [Qemu-devel] [PATCH v5 6/7] virtio-serial: cleanup: use QOM casts fred.konrad
@ 2013-04-04 14:29 ` fred.konrad
  2013-04-04 14:45 ` [Qemu-devel] [PATCH v5 0/7] virtio-serial refactoring Cornelia Huck
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 16+ messages in thread
From: fred.konrad @ 2013-04-04 14:29 UTC (permalink / raw)
  To: qemu-devel, aliguori
  Cc: cornelia.huck, peter.maydell, mark.burton, Amit Shah, fred.konrad

From: KONRAD Frederic <fred.konrad@greensocs.com>

The qdev field is no longer needed, just drop it.

Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>
---
 hw/virtio-serial-bus.c | 2 --
 hw/virtio-serial.h     | 2 --
 2 files changed, 4 deletions(-)

diff --git a/hw/virtio-serial-bus.c b/hw/virtio-serial-bus.c
index 05bbb47..fbb38d1 100644
--- a/hw/virtio-serial-bus.c
+++ b/hw/virtio-serial-bus.c
@@ -960,8 +960,6 @@ static int virtio_serial_device_init(VirtIODevice *vdev)
     vdev->set_status = set_status;
     vdev->reset = vser_reset;
 
-    vser->qdev = qdev;
-
     vser->post_load = NULL;
 
     /*
diff --git a/hw/virtio-serial.h b/hw/virtio-serial.h
index 6a01e8b..4037cba 100644
--- a/hw/virtio-serial.h
+++ b/hw/virtio-serial.h
@@ -200,8 +200,6 @@ struct VirtIOSerial {
 
     VirtIOSerialBus bus;
 
-    DeviceState *qdev;
-
     QTAILQ_HEAD(, VirtIOSerialPort) ports;
 
     /* bitmap for identifying active ports */
-- 
1.7.11.7

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [Qemu-devel] [PATCH v5 0/7] virtio-serial refactoring.
  2013-04-04 14:28 [Qemu-devel] [PATCH v5 0/7] virtio-serial refactoring fred.konrad
                   ` (6 preceding siblings ...)
  2013-04-04 14:29 ` [Qemu-devel] [PATCH v5 7/7] virtio-serial: cleanup: remove qdev field fred.konrad
@ 2013-04-04 14:45 ` Cornelia Huck
  2013-04-04 17:16 ` Peter Maydell
  2013-04-05 15:36 ` Anthony Liguori
  9 siblings, 0 replies; 16+ messages in thread
From: Cornelia Huck @ 2013-04-04 14:45 UTC (permalink / raw)
  To: fred.konrad; +Cc: peter.maydell, aliguori, mark.burton, qemu-devel

On Thu,  4 Apr 2013 16:28:58 +0200
fred.konrad@greensocs.com wrote:

> From: KONRAD Frederic <fred.konrad@greensocs.com>
> 
> This is the next part of virtio-refactoring.
> 
> Basically it creates virtio-serial device which extends virtio-device.
> Then a virtio-serial can be connected on a virtio-bus.
> virtio-serial-pci, virtio-serial-s390 and virtio-serial-ccw are created too,
> they extend respectively virtio-pci, virtio-s390-device, virtio-ccw-device and
> have a virtio-serial.
> 
> You can checkout my branch here:
> 
> git://project.greensocs.com/qemu-virtio.git virtio-serial-v5
> 
> Note that it is nearly the same series as virtio-blk and virtio-scsi
> refactoring.
> 
> I made basic tests (with linux guests) on:
>  * qemu-system-i386

Still looks sane on s390-virtio and virtio-ccw.

Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>

> 
> Changes v4 -> v5:
>     * Fixed rebase issue with nvector and the clarifying comment.
>     * Changed property macro for s390 and ccw device too.
> 
> Changes v3 -> v4:
>     * Removed serial configuration field ommited in VirtioCCWDevice structure.
> 
> Changes v2 -> v3:
>     * Added CCW device.
>     * Rebased.
> 
> Thanks,
> 
> Fred
> 
> KONRAD Frederic (7):
>   virtio-serial: add the virtio-serial device.
>   virtio-serial-pci: switch to the new API.
>   virtio-serial-s390: switch to the new API.
>   virtio-serial-ccw: switch to the new API.
>   virtio-serial: cleanup: init and exit functions.
>   virtio-serial: cleanup: use QOM casts.
>   virtio-serial: cleanup: remove qdev field.
> 
>  hw/s390x/s390-virtio-bus.c |  31 +++++----
>  hw/s390x/s390-virtio-bus.h |  12 +++-
>  hw/s390x/virtio-ccw.c      |  29 +++++----
>  hw/s390x/virtio-ccw.h      |  12 +++-
>  hw/virtio-pci.c            | 131 +++++++++++++++++++------------------
>  hw/virtio-pci.h            |  14 +++-
>  hw/virtio-serial-bus.c     | 157 +++++++++++++++++++++++++++------------------
>  hw/virtio-serial.h         |  13 +++-
>  8 files changed, 239 insertions(+), 160 deletions(-)
> 

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [Qemu-devel] [PATCH v5 0/7] virtio-serial refactoring.
  2013-04-04 14:28 [Qemu-devel] [PATCH v5 0/7] virtio-serial refactoring fred.konrad
                   ` (7 preceding siblings ...)
  2013-04-04 14:45 ` [Qemu-devel] [PATCH v5 0/7] virtio-serial refactoring Cornelia Huck
@ 2013-04-04 17:16 ` Peter Maydell
  2013-04-05 15:36 ` Anthony Liguori
  9 siblings, 0 replies; 16+ messages in thread
From: Peter Maydell @ 2013-04-04 17:16 UTC (permalink / raw)
  To: fred.konrad; +Cc: cornelia.huck, aliguori, mark.burton, qemu-devel

On 4 April 2013 15:28,  <fred.konrad@greensocs.com> wrote:
> From: KONRAD Frederic <fred.konrad@greensocs.com>
>
> This is the next part of virtio-refactoring.
>
> Basically it creates virtio-serial device which extends virtio-device.
> Then a virtio-serial can be connected on a virtio-bus.
> virtio-serial-pci, virtio-serial-s390 and virtio-serial-ccw are created too,
> they extend respectively virtio-pci, virtio-s390-device, virtio-ccw-device and
> have a virtio-serial.


Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

-- PMM

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [Qemu-devel] [PATCH v5 0/7] virtio-serial refactoring.
  2013-04-04 14:28 [Qemu-devel] [PATCH v5 0/7] virtio-serial refactoring fred.konrad
                   ` (8 preceding siblings ...)
  2013-04-04 17:16 ` Peter Maydell
@ 2013-04-05 15:36 ` Anthony Liguori
  2013-04-08 17:00   ` KONRAD Frédéric
  9 siblings, 1 reply; 16+ messages in thread
From: Anthony Liguori @ 2013-04-05 15:36 UTC (permalink / raw)
  To: fred.konrad, qemu-devel; +Cc: cornelia.huck, peter.maydell, mark.burton

fred.konrad@greensocs.com writes:

> From: KONRAD Frederic <fred.konrad@greensocs.com>
>
> This is the next part of virtio-refactoring.
>
> Basically it creates virtio-serial device which extends virtio-device.
> Then a virtio-serial can be connected on a virtio-bus.
> virtio-serial-pci, virtio-serial-s390 and virtio-serial-ccw are created too,
> they extend respectively virtio-pci, virtio-s390-device, virtio-ccw-device and
> have a virtio-serial.
>
> You can checkout my branch here:
>
> git://project.greensocs.com/qemu-virtio.git virtio-serial-v5
>
> Note that it is nearly the same series as virtio-blk and virtio-scsi
> refactoring.

/home/aliguori/build/qemu/x86_64-softmmu/qemu-system-x86_64 -kernel /usr/local/share/qemu-jeos/kernel-x86_64-pc -initrd .tmp-11584/initramfs-11584.img.gz -device isa-debug-exit -append console=ttyS0 seed=42872 -nographic -enable-kvm -hda .tmp-11584/disk-11584.img -M pc-0.13 -drive file=.tmp-11584/disk-11584.img,if=virtio,snapshot=on -device virtio-balloon-pci -device virtio-serial -net nic,model=virtio -net user -pidfile .tmp-11584/pidfile-11584.pid -qmp unix:.tmp-11584/qmpsock-11584.sock,server,nowait
qemu-system-x86_64: -device virtio-serial: No 'virtio-bus' bus found for
device 'virtio-serial'

I think we need to go back and name the devices 'virtio-serial-device'
et al to avoid breaking aliases.

Regards,

Anthony Liguori

>
> I made basic tests (with linux guests) on:
>  * qemu-system-i386
>
> Changes v4 -> v5:
>     * Fixed rebase issue with nvector and the clarifying comment.
>     * Changed property macro for s390 and ccw device too.
>
> Changes v3 -> v4:
>     * Removed serial configuration field ommited in VirtioCCWDevice structure.
>
> Changes v2 -> v3:
>     * Added CCW device.
>     * Rebased.
>
> Thanks,
>
> Fred
>
> KONRAD Frederic (7):
>   virtio-serial: add the virtio-serial device.
>   virtio-serial-pci: switch to the new API.
>   virtio-serial-s390: switch to the new API.
>   virtio-serial-ccw: switch to the new API.
>   virtio-serial: cleanup: init and exit functions.
>   virtio-serial: cleanup: use QOM casts.
>   virtio-serial: cleanup: remove qdev field.
>
>  hw/s390x/s390-virtio-bus.c |  31 +++++----
>  hw/s390x/s390-virtio-bus.h |  12 +++-
>  hw/s390x/virtio-ccw.c      |  29 +++++----
>  hw/s390x/virtio-ccw.h      |  12 +++-
>  hw/virtio-pci.c            | 131 +++++++++++++++++++------------------
>  hw/virtio-pci.h            |  14 +++-
>  hw/virtio-serial-bus.c     | 157 +++++++++++++++++++++++++++------------------
>  hw/virtio-serial.h         |  13 +++-
>  8 files changed, 239 insertions(+), 160 deletions(-)
>
> -- 
> 1.7.11.7

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [Qemu-devel] [PATCH v5 0/7] virtio-serial refactoring.
  2013-04-05 15:36 ` Anthony Liguori
@ 2013-04-08 17:00   ` KONRAD Frédéric
  2013-04-08 17:03     ` Peter Maydell
  0 siblings, 1 reply; 16+ messages in thread
From: KONRAD Frédéric @ 2013-04-08 17:00 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: cornelia.huck, peter.maydell, mark.burton, qemu-devel

On 05/04/2013 17:36, Anthony Liguori wrote:
> fred.konrad@greensocs.com writes:
>
>> From: KONRAD Frederic <fred.konrad@greensocs.com>
>>
>> This is the next part of virtio-refactoring.
>>
>> Basically it creates virtio-serial device which extends virtio-device.
>> Then a virtio-serial can be connected on a virtio-bus.
>> virtio-serial-pci, virtio-serial-s390 and virtio-serial-ccw are created too,
>> they extend respectively virtio-pci, virtio-s390-device, virtio-ccw-device and
>> have a virtio-serial.
>>
>> You can checkout my branch here:
>>
>> git://project.greensocs.com/qemu-virtio.git virtio-serial-v5
>>
>> Note that it is nearly the same series as virtio-blk and virtio-scsi
>> refactoring.
> /home/aliguori/build/qemu/x86_64-softmmu/qemu-system-x86_64 -kernel /usr/local/share/qemu-jeos/kernel-x86_64-pc -initrd .tmp-11584/initramfs-11584.img.gz -device isa-debug-exit -append console=ttyS0 seed=42872 -nographic -enable-kvm -hda .tmp-11584/disk-11584.img -M pc-0.13 -drive file=.tmp-11584/disk-11584.img,if=virtio,snapshot=on -device virtio-balloon-pci -device virtio-serial -net nic,model=virtio -net user -pidfile .tmp-11584/pidfile-11584.pid -qmp unix:.tmp-11584/qmpsock-11584.sock,server,nowait
> qemu-system-x86_64: -device virtio-serial: No 'virtio-bus' bus found for
> device 'virtio-serial'
>
> I think we need to go back and name the devices 'virtio-serial-device'
> et al to avoid breaking aliases.
>
> Regards,
>
> Anthony Liguori
Hi Anthony,

I'm making a patch for that, and I'm wondering if the name in 
register_savevm must be changed too?

eg for virtio-balloon:

-    register_savevm(qdev, "virtio-balloon", -1, 1,
+    register_savevm(qdev, TYPE_VIRTIO_BALLOON, -1, 1,
                      virtio_balloon_save, virtio_balloon_load, s);

with TYPE_VIRTIO_BALLOON "virtio-balloon-device"?

Thanks,
Fred

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [Qemu-devel] [PATCH v5 0/7] virtio-serial refactoring.
  2013-04-08 17:00   ` KONRAD Frédéric
@ 2013-04-08 17:03     ` Peter Maydell
  2013-04-08 17:14       ` KONRAD Frédéric
  0 siblings, 1 reply; 16+ messages in thread
From: Peter Maydell @ 2013-04-08 17:03 UTC (permalink / raw)
  To: KONRAD Frédéric
  Cc: cornelia.huck, Anthony Liguori, mark.burton, qemu-devel

On 8 April 2013 18:00, KONRAD Frédéric <fred.konrad@greensocs.com> wrote:
> I'm making a patch for that, and I'm wondering if the name in
> register_savevm must be changed too?
>
> eg for virtio-balloon:
>
> -    register_savevm(qdev, "virtio-balloon", -1, 1,
> +    register_savevm(qdev, TYPE_VIRTIO_BALLOON, -1, 1,
>                      virtio_balloon_save, virtio_balloon_load, s);
>
> with TYPE_VIRTIO_BALLOON "virtio-balloon-device"?

You specifically don't want to change the register_savevm name,
because otherwise you'll break migration (we use the ID string
to identify what incoming migration data is).

-- PMM

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [Qemu-devel] [PATCH v5 0/7] virtio-serial refactoring.
  2013-04-08 17:03     ` Peter Maydell
@ 2013-04-08 17:14       ` KONRAD Frédéric
  2013-04-08 17:16         ` Peter Maydell
  0 siblings, 1 reply; 16+ messages in thread
From: KONRAD Frédéric @ 2013-04-08 17:14 UTC (permalink / raw)
  To: Peter Maydell; +Cc: cornelia.huck, Anthony Liguori, mark.burton, qemu-devel

On 08/04/2013 19:03, Peter Maydell wrote:
> On 8 April 2013 18:00, KONRAD Frédéric <fred.konrad@greensocs.com> wrote:
>> I'm making a patch for that, and I'm wondering if the name in
>> register_savevm must be changed too?
>>
>> eg for virtio-balloon:
>>
>> -    register_savevm(qdev, "virtio-balloon", -1, 1,
>> +    register_savevm(qdev, TYPE_VIRTIO_BALLOON, -1, 1,
>>                       virtio_balloon_save, virtio_balloon_load, s);
>>
>> with TYPE_VIRTIO_BALLOON "virtio-balloon-device"?
> You specifically don't want to change the register_savevm name,
> because otherwise you'll break migration (we use the ID string
> to identify what incoming migration data is).
>
> -- PMM
Ok, you mean migration between two qemu's version with the different name?

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [Qemu-devel] [PATCH v5 0/7] virtio-serial refactoring.
  2013-04-08 17:14       ` KONRAD Frédéric
@ 2013-04-08 17:16         ` Peter Maydell
  2013-04-08 21:58           ` KONRAD Frédéric
  0 siblings, 1 reply; 16+ messages in thread
From: Peter Maydell @ 2013-04-08 17:16 UTC (permalink / raw)
  To: KONRAD Frédéric
  Cc: cornelia.huck, Anthony Liguori, mark.burton, qemu-devel

On 8 April 2013 18:14, KONRAD Frédéric <fred.konrad@greensocs.com> wrote:
> On 08/04/2013 19:03, Peter Maydell wrote:
>> You specifically don't want to change the register_savevm name,
>> because otherwise you'll break migration (we use the ID string
>> to identify what incoming migration data is).

> Ok, you mean migration between two qemu's version with the different
> name?

Yes; that is, if you commit a patch which changes that string
then migration between a QEMU before that patch and one after
it will not work.

-- PMM

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [Qemu-devel] [PATCH v5 0/7] virtio-serial refactoring.
  2013-04-08 17:16         ` Peter Maydell
@ 2013-04-08 21:58           ` KONRAD Frédéric
  0 siblings, 0 replies; 16+ messages in thread
From: KONRAD Frédéric @ 2013-04-08 21:58 UTC (permalink / raw)
  To: Peter Maydell; +Cc: cornelia.huck, Anthony Liguori, mark.burton, qemu-devel

On 08/04/2013 19:16, Peter Maydell wrote:
> On 8 April 2013 18:14, KONRAD Frédéric <fred.konrad@greensocs.com> wrote:
>> On 08/04/2013 19:03, Peter Maydell wrote:
>>> You specifically don't want to change the register_savevm name,
>>> because otherwise you'll break migration (we use the ID string
>>> to identify what incoming migration data is).
>> Ok, you mean migration between two qemu's version with the different
>> name?
> Yes; that is, if you commit a patch which changes that string
> then migration between a QEMU before that patch and one after
> it will not work.
>
> -- PMM
Ok, it's what I thought, so I'll just change TYPE_VIRTIO_X.

Thanks,
Fred

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2013-04-08 21:58 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-04 14:28 [Qemu-devel] [PATCH v5 0/7] virtio-serial refactoring fred.konrad
2013-04-04 14:28 ` [Qemu-devel] [PATCH v5 1/7] virtio-serial: add the virtio-serial device fred.konrad
2013-04-04 14:29 ` [Qemu-devel] [PATCH v5 2/7] virtio-serial-pci: switch to the new API fred.konrad
2013-04-04 14:29 ` [Qemu-devel] [PATCH v5 3/7] virtio-serial-s390: " fred.konrad
2013-04-04 14:29 ` [Qemu-devel] [PATCH v5 4/7] virtio-serial-ccw: " fred.konrad
2013-04-04 14:29 ` [Qemu-devel] [PATCH v5 5/7] virtio-serial: cleanup: init and exit functions fred.konrad
2013-04-04 14:29 ` [Qemu-devel] [PATCH v5 6/7] virtio-serial: cleanup: use QOM casts fred.konrad
2013-04-04 14:29 ` [Qemu-devel] [PATCH v5 7/7] virtio-serial: cleanup: remove qdev field fred.konrad
2013-04-04 14:45 ` [Qemu-devel] [PATCH v5 0/7] virtio-serial refactoring Cornelia Huck
2013-04-04 17:16 ` Peter Maydell
2013-04-05 15:36 ` Anthony Liguori
2013-04-08 17:00   ` KONRAD Frédéric
2013-04-08 17:03     ` Peter Maydell
2013-04-08 17:14       ` KONRAD Frédéric
2013-04-08 17:16         ` Peter Maydell
2013-04-08 21:58           ` KONRAD Frédéric

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).