[Qemu-devel] [PATCH 22/61] virtio-scsi : show the VirtIOSCSI structure.

2013-01-07 Thread fred . konrad
From: KONRAD Frederic As we discuss with anthony and andreas, this structure must be showed to avoid two memory allocations for virtio-scsi-x. Signed-off-by: KONRAD Frederic --- hw/virtio-scsi.c | 15 --- hw/virtio-scsi.h | 16 2 files changed, 16 insertions(+), 15

[Qemu-devel] [PATCH 57/61] virtio : remove the function pointer.

2013-01-07 Thread fred . konrad
From: KONRAD Frederic This remove the function pointer in VirtIODevice, and use only VirtioDeviceClass function pointer. It should be applied after all the device have been refactored. Signed-off-by: KONRAD Frederic --- hw/9pfs/virtio-9p-device.c | 2 -- hw/virtio-balloon.c| 8 --

[Qemu-devel] [PATCH 59/61] s390-virtio-bus : cleanup

2013-01-07 Thread fred . konrad
From: KONRAD Frederic This is a cleanup for s390-virtio-bus : the init function is called by virtio-bus just after the device is plugged. Signed-off-by: KONRAD Frederic --- hw/s390-virtio-bus.c | 38 -- 1 file changed, 16 insertions(+), 22 deletions(-) diff

[Qemu-devel] [PATCH 56/61] virtio-9p : cleanup : QOM casts.

2013-01-07 Thread fred . konrad
From: KONRAD Frederic As the virtio-9p-pci is switched to the new API, we can use QOM casts. This shouldn't been applyied before virtio-9p-pci refactoring as its VirtIODevice was not a QOM object. Signed-off-by: KONRAD Frederic --- hw/9pfs/virtio-9p-device.c | 11 +++ hw/9pfs/virtio-9p

[Qemu-devel] [PATCH 51/61] virtio-serial : cleanup : use QOM casts.

2013-01-07 Thread fred . konrad
From: KONRAD Frederic As the virtio-serial-pci and virtio-serial-s390 are switched to the new API, we can use QOM casts. This shouldn't been applyied before virtio-serial-pci and virtio-serial-s390 refactoring as their VirtIODevice were not a QOM object. Signed-off-by: KONRAD Frederic --- hw/v

[Qemu-devel] [PATCH 61/61] virtio : cleanup : init and exit function.

2013-01-07 Thread fred . konrad
From: KONRAD Frederic Clean the init and the exit function. It should be applied when all the device have been refactored. Signed-off-by: KONRAD Frederic --- hw/virtio.c | 15 --- hw/virtio.h | 4 2 files changed, 19 deletions(-) diff --git a/hw/virtio.c b/hw/virtio.c index

[Qemu-devel] [PATCH 47/61] virtio-serial : add the virtio-serial device.

2013-01-07 Thread fred . konrad
From: KONRAD Frederic Create virtio-serial which extends virtio-device, so it can be connected on virtio-bus. Signed-off-by: KONRAD Frederic --- hw/virtio-pci.c| 8 +++- hw/virtio-serial-bus.c | 100 + hw/virtio-serial.h | 11 +

[Qemu-devel] [PATCH 13/61] virtio-blk : cleanup : use QOM cast.

2013-01-07 Thread fred . konrad
From: KONRAD Frederic As the virtio-blk-pci and virtio-blk-s390 are switched to the new API, we can use QOM casts and remove the separate init/exit for the old API. This shouldn't been applyied before virtio-blk-pci and virtio-blk-s390 refactoring as their VirtIODevice were not a QOM object. Sig

[Qemu-devel] [PATCH 36/61] virtio-balloon : cleanup : QOM casts.

2013-01-07 Thread fred . konrad
From: KONRAD Frederic As the virtio-balloon-pci is switched to the new API, we can use QOM casts. This shouldn't been applyied before virtio-balloon-pci refactoring as its VirtIODevice was not a QOM object. Signed-off-by: KONRAD Frederic --- hw/virtio-balloon.c | 39 +--

[Qemu-devel] [PATCH 50/61] virtio-serial : cleanup : init and exit functions.

2013-01-07 Thread fred . konrad
From: KONRAD Frederic This remove old init and exit function as they are no longer needed. This shouldn't been applyied before virtio-serial-pci and virtio-serial-s390 refactoring. Signed-off-by: KONRAD Frederic --- hw/virtio-serial-bus.c | 94 --

[Qemu-devel] [PATCH 48/61] virtio-serial-pci : switch to the new API.

2013-01-07 Thread fred . konrad
From: KONRAD Frederic 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 --- hw/virtio-pci.c | 123 +

[Qemu-devel] [PATCH 34/61] virtio-balloon-pci : switch to the new API.

2013-01-07 Thread fred . konrad
From: KONRAD Frederic Here the virtio-balloon-pci is modified for the new API. The device virtio-balloon-pci extends virtio-pci. It creates and connects a virtio-balloon during the init. The properties are not changed. Signed-off-by: KONRAD Frederic --- hw/virtio-pci.c | 106 ++

[Qemu-devel] [PATCH 33/61] virtio-balloon : add the virtio-balloon device.

2013-01-07 Thread fred . konrad
From: KONRAD Frederic Create virtio-balloon which extends virtio-device, so it can be connected on virtio-bus. Signed-off-by: KONRAD Frederic --- hw/virtio-balloon.c | 99 + hw/virtio-balloon.h | 4 +++ hw/virtio-pci.c | 6 3 files

[Qemu-devel] [PATCH 17/61] virtio-net-pci : switch to the new API.

2013-01-07 Thread fred . konrad
From: KONRAD Frederic Here the virtio-net-pci is modified for the new API. The device virtio-net-pci extends virtio-pci. It creates and connects a virtio-net during the init. The properties are not changed. Signed-off-by: KONRAD Frederic --- hw/virtio-pci.c | 108 +++---

[Qemu-devel] [PATCH 32/61] virtio-balloon : show the VirtIOBalloon structure.

2013-01-07 Thread fred . konrad
From: KONRAD Frederic As we discuss with anthony and andreas, this structure must be showed to avoid two memory allocations for virtio-balloon-x. Signed-off-by: KONRAD Frederic --- hw/virtio-balloon.c | 12 hw/virtio-balloon.h | 11 +++ 2 files changed, 11 insertions(+), 1

[Qemu-devel] [PATCH 30/61] virtio-scsi : cleanup : init and exit functions.

2013-01-07 Thread fred . konrad
From: KONRAD Frederic This remove old init and exit function as they are no longer needed. This shouldn't been applyied before virtio-scsi-pci and virtio-scsi-s390 refactoring. Signed-off-by: KONRAD Frederic --- hw/virtio-scsi.c | 59 ++-- 1

[Qemu-devel] [PATCH 10/61] virtio-blk : add the virtio-blk device.

2013-01-07 Thread fred . konrad
From: KONRAD Frederic Create virtio-blk which extends virtio-device, so it can be connected on virtio-bus. Signed-off-by: KONRAD Frederic --- hw/virtio-blk.c | 97 ++--- hw/virtio-blk.h | 28 + hw/virtio-pci.c | 18 ---

[Qemu-devel] [PATCH 02/61] virtio-bus : introduce virtio-bus

2013-01-07 Thread fred . konrad
From: KONRAD Frederic Introduce virtio-bus. Refactored transport device will create a bus which extends virtio-bus. Signed-off-by: KONRAD Frederic --- hw/Makefile.objs | 1 + hw/virtio-bus.c | 178 +++ hw/virtio-bus.h | 98 ++

[Qemu-devel] [PATCH 03/61] virtio-pci-bus : introduce virtio-pci-bus.

2013-01-07 Thread fred . konrad
From: KONRAD Frederic Introduce virtio-pci-bus, which extends virtio-bus. It is used with virtio-pci transport device. Signed-off-by: KONRAD Frederic --- hw/virtio-pci.c | 37 + hw/virtio-pci.h | 18 -- 2 files changed, 53 insertions(+), 2 de

[Qemu-devel] [RFC V9 07/12] virtio-s390-device : create a virtio-s390-bus during init.

2013-01-03 Thread fred . konrad
From: KONRAD Frederic A virtio-s390-bus is created during the init. So one VirtIODevice can be connected on the virtio-s390-device through this bus. Signed-off-by: KONRAD Frederic --- hw/s390-virtio-bus.c | 2 ++ hw/s390-virtio-bus.h | 1 + 2 files changed, 3 insertions(+) diff --git a/hw/s39

[Qemu-devel] [RFC V9 03/12] virtio-pci-bus : introduce virtio-pci-bus.

2013-01-03 Thread fred . konrad
From: KONRAD Frederic Introduce virtio-pci-bus, which extends virtio-bus. It is used with virtio-pci transport device. Signed-off-by: KONRAD Frederic --- hw/virtio-pci.c | 37 + hw/virtio-pci.h | 19 +-- 2 files changed, 54 insertions(+), 2 d

[Qemu-devel] [RFC V9 06/12] virtio-s390-bus : add virtio-s390-bus.

2013-01-03 Thread fred . konrad
From: KONRAD Frederic This add the virtio-s390-bus which extends virtio-bus. So one VirtIODevice can be connected on this bus. Signed-off-by: KONRAD Frederic --- hw/s390-virtio-bus.c | 28 hw/s390-virtio-bus.h | 13 + 2 files changed, 41 insertions(+)

[Qemu-devel] [RFC V9 12/12] virtio-blk : cleanup : remove qdev field.

2013-01-03 Thread fred . konrad
From: KONRAD Frederic The qdev field is no longer needed, just drop it. Signed-off-by: KONRAD Frederic --- hw/virtio-blk.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c index 67e58da..0363419 100644 --- a/hw/virtio-blk.c +++ b/hw/virti

[Qemu-devel] [RFC V9 05/12] virtio-device : refactor virtio-device.

2013-01-03 Thread fred . konrad
From: KONRAD Frederic Create the virtio-device which is abstract. All the virtio-device can extend this class. Signed-off-by: KONRAD Frederic --- hw/virtio.c | 70 ++--- hw/virtio.h | 31 +++ 2 files changed, 89 in

[Qemu-devel] [RFC V9 08/12] virtio-blk : add the virtio-blk device.

2013-01-03 Thread fred . konrad
From: KONRAD Frederic Create virtio-blk which extends virtio-device, so it can be connected on virtio-bus. Signed-off-by: KONRAD Frederic --- hw/virtio-blk.c | 101 +++- hw/virtio-blk.h | 19 +++ hw/virtio-pci.c | 7 ++-- 3 files c

[Qemu-devel] [RFC V9 04/12] virtio-pci : refactor virtio-pci device.

2013-01-03 Thread fred . konrad
From: KONRAD Frederic Create the virtio-pci device. This transport device will create a virtio-pci-bus, so one VirtIODevice can be connected. Signed-off-by: KONRAD Frederic --- hw/virtio-pci.c | 133 hw/virtio-pci.h | 18 2 fil

[Qemu-devel] [RFC V9 11/12] virtio-blk : cleanup : use QOM cast.

2013-01-03 Thread fred . konrad
From: KONRAD Frederic As the virtio-blk-pci and virtio-blk-s390 are switched to the new API, we can use QOM casts and remove the separate init/exit for the old API. This shouldn't been applyied before virtio-blk-pci and virtio-blk-s390 refactoring as their VirtIODevice were not a QOM object. Sig

[Qemu-devel] [RFC V9 09/12] virtio-blk-pci : switch to new API.

2013-01-03 Thread fred . konrad
From: KONRAD Frederic Here the virtio-blk-pci is modified for the new API. The device virtio-blk-pci extends virtio-pci. It creates and connects a virtio-blk during the init. The properties are not changed. Signed-off-by: KONRAD Frederic --- hw/virtio-pci.c | 113 +++---

[Qemu-devel] [RFC V9 10/12] virtio-blk-s390 : switch to the new API.

2013-01-03 Thread fred . konrad
From: KONRAD Frederic Here the virtio-blk-s390 is modified for the new API. The device virtio-blk-s390 extends virtio-s390-device as before. It creates and connects a virtio-blk during the init. The properties are not modified. Signed-off-by: KONRAD Frederic --- hw/s390-virtio-bus.c | 17 +

[Qemu-devel] [RFC V9 00/12] Virtio refactoring.

2013-01-03 Thread fred . konrad
From: KONRAD Frederic You can clone that from here : git.greensocs.com/home/greensocs/git/qemu_virtio.git virtio_refactoring_rfc_v9 This new version fix the name issues with the function name (in virtio-bus) and the initialisation of virtio-blk-x. If you're all ok with that, I will send the full

[Qemu-devel] [RFC V9 02/12] virtio-bus : introduce virtio-bus

2013-01-03 Thread fred . konrad
From: KONRAD Frederic Introduce virtio-bus. Refactored transport device will create a bus which extends virtio-bus. Signed-off-by: KONRAD Frederic --- hw/Makefile.objs | 1 + hw/virtio-bus.c | 178 +++ hw/virtio-bus.h | 98 ++

[Qemu-devel] [RFC V9 01/12] qdev : add a maximum device allowed field for the bus.

2013-01-03 Thread fred . konrad
From: KONRAD Frederic Add a max_dev field to BusState to specify the maximum amount of devices allowed on the bus ( have no effect if max_dev=0 ) Signed-off-by: KONRAD Frederic --- hw/qdev-core.h| 2 ++ hw/qdev-monitor.c | 11 +++ 2 files changed, 13 insertions(+) diff --git a/hw

[Qemu-devel] [RFC PATCH V8 03/15] virtio-pci-bus : Introduce virtio-pci-bus.

2012-12-19 Thread fred . konrad
From: KONRAD Frederic Introduce virtio-pci-bus, which extends virtio-bus. It is used with virtio-pci transport device. Signed-off-by: KONRAD Frederic --- hw/virtio-pci.c | 37 + hw/virtio-pci.h | 19 +-- 2 files changed, 54 insertions(+), 2 d

[Qemu-devel] [RFC PATCH V8 14/15] virtio : Remove VirtIOBindings.

2012-12-19 Thread fred . konrad
From: KONRAD Frederic This remove VirtIOBindings and use VirtioBusClass instead. It should be applied when all the device have been refactored. Signed-off-by: KONRAD Frederic --- hw/virtio-bus.c | 20 hw/virtio-bus.h | 6 -- hw/virtio.c | 52 ++

[Qemu-devel] [RFC PATCH V8 06/15] virtio-s390-bus : Add virtio-s390-bus.

2012-12-19 Thread fred . konrad
From: KONRAD Frederic Introduce virtio-s390-bus, which extends virtio-bus. It is used with s390 transport device. Signed-off-by: KONRAD Frederic --- hw/s390-virtio-bus.c | 28 hw/s390-virtio-bus.h | 13 + 2 files changed, 41 insertions(+) diff --git a/

[Qemu-devel] [RFC PATCH V8 08/15] virtio-blk : Add the virtio-blk device.

2012-12-19 Thread fred . konrad
From: KONRAD Frederic Create virtio-blk which extends virtio-device, so it can be connected on virtio-bus. Signed-off-by: KONRAD Frederic --- hw/virtio-blk.c | 101 +++- hw/virtio-blk.h | 19 +++ hw/virtio-pci.c | 7 ++-- 3 files c

[Qemu-devel] [RFC PATCH V8 15/15] virtio : cleanup : init and exit function.

2012-12-19 Thread fred . konrad
From: KONRAD Frederic Clean the init and the exit function. It should be applied when all the device have been refactored. Signed-off-by: KONRAD Frederic --- hw/virtio.c | 15 --- hw/virtio.h | 4 2 files changed, 19 deletions(-) diff --git a/hw/virtio.c b/hw/virtio.c index

[Qemu-devel] [RFC PATCH V8 11/15] virtio-blk : cleanup : use QOM cast.

2012-12-19 Thread fred . konrad
From: KONRAD Frederic As the virtio-blk-pci is switched to the new API, we can use QOM casts and remove the separate init for the old API. This shouldn't been applyied before virtio-blk-pci refactoring and virtio-blk-s390 refactoring. Signed-off-by: KONRAD Frederic --- hw/virtio-blk.c | 117 ++

[Qemu-devel] [RFC PATCH V8 02/15] virtio-bus : Introduce virtio-bus

2012-12-19 Thread fred . konrad
From: KONRAD Frederic Introduce virtio-bus. Refactored transport device will create a bus which extends virtio-bus. Signed-off-by: KONRAD Frederic --- hw/Makefile.objs | 1 + hw/virtio-bus.c | 169 +++ hw/virtio-bus.h | 98 ++

[Qemu-devel] [RFC PATCH V8 07/15] virtio-s390-device : create a virtio-s390-bus during init.

2012-12-19 Thread fred . konrad
From: KONRAD Frederic Create a virtio-s390-bus during init, so the refactored virtio device can be connected. Signed-off-by: KONRAD Frederic --- hw/s390-virtio-bus.c | 2 ++ hw/s390-virtio-bus.h | 1 + 2 files changed, 3 insertions(+) diff --git a/hw/s390-virtio-bus.c b/hw/s390-virtio-bus.c i

[Qemu-devel] [RFC PATCH V8 01/15] qdev : add a maximum device allowed field for the bus.

2012-12-19 Thread fred . konrad
From: KONRAD Frederic Add a max_dev field to BusState to specify the maximum amount of devices allowed on the bus ( have no effect if max_dev=0 ) Signed-off-by: KONRAD Frederic --- hw/qdev-core.h| 2 ++ hw/qdev-monitor.c | 11 +++ 2 files changed, 13 insertions(+) diff --git a/hw

[Qemu-devel] [RFC PATCH V8 00/15] Virtio refactoring.

2012-12-19 Thread fred . konrad
ded virtio_bus_reset(). * Added cast macros VIRTIO_BUS. * Added virtio_bus_plug_device. * Replaced the old-style "bus->qbus" by BUS() macro. Fred. KONRAD Frederic (15): qdev : add a maximum device allowed field for the bus. virtio-bus : Introduce virtio-bus virtio-pci-bu

[Qemu-devel] [RFC PATCH V8 10/15] virtio-blk-s390 : Switch to the new API.

2012-12-19 Thread fred . konrad
From: KONRAD Frederic Here the virtio-blk-s390 is modified for the new API. The device virtio-blk-s390 extends virtio-s390-device. It creates and connects a virtio-blk during the init. Signed-off-by: KONRAD Frederic --- hw/s390-virtio-bus.c | 11 +-- 1 file changed, 5 insertions(+), 6

[Qemu-devel] [RFC PATCH V8 05/15] virtio-device : Refactor virtio-device.

2012-12-19 Thread fred . konrad
From: KONRAD Frederic Create the virtio-device which is abstract. All the virtio-device can extend this class. Signed-off-by: KONRAD Frederic --- hw/virtio.c | 70 ++--- hw/virtio.h | 31 +++ 2 files changed, 89 in

[Qemu-devel] [RFC PATCH V8 12/15] virtio-blk : cleanup : remove qdev field.

2012-12-19 Thread fred . konrad
From: KONRAD Frederic The qdev field is not needed, just drop it. Signed-off-by: KONRAD Frederic --- hw/virtio-blk.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c index 93b9746..65932fd 100644 --- a/hw/virtio-blk.c +++ b/hw/virtio-blk.

[Qemu-devel] [RFC PATCH V8 13/15] virtio : Remove the function pointer.

2012-12-19 Thread fred . konrad
From: KONRAD Frederic This remove the function pointer in VirtIODevice, and use only VirtioDeviceClass function pointer. It should be applied after all the device have been refactored. Signed-off-by: KONRAD Frederic --- hw/virtio-blk.c | 5 - hw/virtio-pci.c | 2 +- hw/virtio.c | 41

[Qemu-devel] [RFC PATCH V8 09/15] virtio-blk-pci : Switch to new API.

2012-12-19 Thread fred . konrad
From: KONRAD Frederic Here the virtio-blk-pci is modified for the new API. The device virtio-blk-pci extends virtio-pci. It creates and connects a virtio-blk during the init. Signed-off-by: KONRAD Frederic --- hw/virtio-pci.c | 106 +--- hw/v

[Qemu-devel] [RFC PATCH V8 04/15] virtio-pci : Refactor virtio-pci device.

2012-12-19 Thread fred . konrad
From: KONRAD Frederic Create the virtio-pci device. This transport device will create a virtio-pci-bus, so one VirtIODevice can be connected. Signed-off-by: KONRAD Frederic --- hw/virtio-pci.c | 130 hw/virtio-pci.h | 19 + 2 fi

[Qemu-devel] [RFC PATCH v7 6/8] virtio-blk : Add the virtio-blk device.

2012-12-10 Thread fred . konrad
From: KONRAD Frederic Create virtio-blk which extends virtio-device, so it can be connected on virtio-bus. Signed-off-by: KONRAD Frederic --- hw/virtio-blk.c | 107 +++- hw/virtio-blk.h | 6 2 files changed, 104 insertions(+), 9 deleti

[Qemu-devel] [RFC PATCH v7 3/8] virtio-pci-bus : Introduce virtio-pci-bus.

2012-12-10 Thread fred . konrad
From: KONRAD Frederic Introduce virtio-pci-bus, which extends virtio-bus. It is used with virtio-pci transport device. Signed-off-by: KONRAD Frederic --- hw/virtio-pci.c | 37 + hw/virtio-pci.h | 19 +-- 2 files changed, 54 insertions(+), 2 d

[Qemu-devel] [RFC PATCH v7 5/8] virtio-device : Refactor virtio-device.

2012-12-10 Thread fred . konrad
From: KONRAD Frederic Create the virtio-device which is abstract. All the virtio-device can extend this class. Signed-off-by: KONRAD Frederic --- hw/virtio.c | 50 +++--- hw/virtio.h | 28 2 files changed, 67 insertions(+

[Qemu-devel] [RFC PATCH v7 8/8] virtio-blk : QOM modifications.

2012-12-10 Thread fred . konrad
From: KONRAD Frederic As the virtio-blk-pci is switched to the new API, we can use QOM casts and remove the separate init for the old API. Signed-off-by: KONRAD Frederic --- hw/virtio-blk.c | 69 ++--- 1 file changed, 26 insertions(+), 43 del

[Qemu-devel] [RFC PATCH v7 0/8] Virtio refactoring.

2012-12-10 Thread fred . konrad
t ( License, Debug printf, naming convention, ...) * Added get_virtio_device_id(), and remove the pci_id* from the VirtioBus structure. * Added virtio_bus_reset(). * Added cast macros VIRTIO_BUS. * Added virtio_bus_plug_device. * Replaced the old-style "bus->qbus" by

[Qemu-devel] [RFC PATCH v7 4/8] virtio-pci : Refactor virtio-pci device.

2012-12-10 Thread fred . konrad
From: KONRAD Frederic Create the virtio-pci device. This transport device will create a virtio-pci-bus, so one VirtIODevice can be connected. Signed-off-by: KONRAD Frederic --- hw/virtio-pci.c | 127 hw/virtio-pci.h | 19 + 2 fi

[Qemu-devel] [RFC PATCH v7 7/8] virtio-pci-blk : Switch to new API.

2012-12-10 Thread fred . konrad
From: KONRAD Frederic Here the virtio-blk-pci is modified for the new API. The device virtio-pci-blk extends virtio-pci. It creates and connects a virtio-blk during the init. Signed-off-by: KONRAD Frederic --- hw/virtio-pci.c | 113 +++- hw/v

[Qemu-devel] [RFC PATCH v7 2/8] virtio-bus : Introduce virtio-bus

2012-12-10 Thread fred . konrad
From: KONRAD Frederic Introduce virtio-bus. Refactored transport device will create a bus which extends virtio-bus. Signed-off-by: KONRAD Frederic --- hw/Makefile.objs | 1 + hw/virtio-bus.c | 120 +++ hw/virtio-bus.h | 83 ++

[Qemu-devel] [RFC PATCH v7 1/8] qdev : add a maximum device allowed field for the bus.

2012-12-10 Thread fred . konrad
From: KONRAD Frederic Add a max_dev field to BusState to specify the maximum amount of devices allowed on the bus ( have no effect if max_dev=0 ) Signed-off-by: KONRAD Frederic --- hw/qdev-core.h| 2 ++ hw/qdev-monitor.c | 11 +++ 2 files changed, 13 insertions(+) diff --git a/hw

[Qemu-devel] [RFC PATCH v6 4/6] virtio-pci : Refactor virtio-pci device.

2012-12-07 Thread fred . konrad
From: KONRAD Frederic Create the virtio-pci device. This transport device will create a virtio-pci-bus, so one VirtIODevice can be connected. Signed-off-by: KONRAD Frederic --- hw/virtio-pci.c | 112 hw/virtio-pci.h | 14 +++ 2 file

[Qemu-devel] [RFC PATCH v6 5/6] virtio-device : Refactor virtio-device.

2012-12-07 Thread fred . konrad
From: KONRAD Frederic Create the virtio-device which is abstract. All the virtio-device can extend this class. Signed-off-by: KONRAD Frederic --- hw/virtio.c | 50 +++--- hw/virtio.h | 28 2 files changed, 67 insertions(+

[Qemu-devel] [RFC PATCH v6 6/6] virtio-blk : Add the virtio-blk device.

2012-12-07 Thread fred . konrad
From: KONRAD Frederic Create virtio-blk which extends virtio-device, so it can be connected on virtio-bus. I suggest one step to refactor virtio-blk-pci, and one more to clean virtio-blk. Signed-off-by: KONRAD Frederic --- hw/virtio-blk.c | 101 +

[Qemu-devel] [RFC PATCH v6 1/6] qdev : add a maximum device allowed field for the bus.

2012-12-07 Thread fred . konrad
From: KONRAD Frederic Add a max_dev field to BusState to specify the maximum amount of devices allowed on the bus ( have no effect if max_dev=0 ) Signed-off-by: KONRAD Frederic --- hw/qdev-core.h| 2 ++ hw/qdev-monitor.c | 11 +++ 2 files changed, 13 insertions(+) diff --git a/hw

[Qemu-devel] [RFC PATCH v6 2/6] virtio-bus : Introduce virtio-bus

2012-12-07 Thread fred . konrad
From: KONRAD Frederic Introduce virtio-bus. Refactored transport device will create a bus which extends virtio-bus. Signed-off-by: KONRAD Frederic --- hw/Makefile.objs | 1 + hw/virtio-bus.c | 111 +++ hw/virtio-bus.h | 82 ++

[Qemu-devel] [RFC PATCH v6 3/6] virtio-pci-bus : Introduce virtio-pci-bus.

2012-12-07 Thread fred . konrad
From: KONRAD Frederic Introduce virtio-pci-bus, which extends virtio-bus. It is used with virtio-pci transport device. Signed-off-by: KONRAD Frederic --- hw/virtio-pci.c | 37 + hw/virtio-pci.h | 19 +-- 2 files changed, 54 insertions(+), 2 d

[Qemu-devel] [RFC PATCH v6 0/6] Virtio refactoring.

2012-12-07 Thread fred . konrad
License, Debug printf, naming convention, ...) * Added get_virtio_device_id(), and remove the pci_id* from the VirtioBus structure. * Added virtio_bus_reset(). * Added cast macros VIRTIO_BUS. * Added virtio_bus_plug_device. * Replaced the old-style "bus->qbus&quo

[Qemu-devel] [RFC PATCH v5 5/6] virtio-device : Refactor virtio-device.

2012-12-04 Thread fred . konrad
From: KONRAD Frederic Create the virtio-device which is abstract. All the virtio-device can extend this class. Signed-off-by: KONRAD Frederic --- hw/virtio.c | 56 hw/virtio.h | 29 + 2 files changed, 85 inser

[Qemu-devel] [RFC PATCH v5 2/6] virtio-bus : Introduce virtio-bus

2012-12-04 Thread fred . konrad
From: KONRAD Frederic Introduce virtio-bus. Refactored transport device will create a bus which extends virtio-bus. Signed-off-by: KONRAD Frederic --- hw/Makefile.objs | 1 + hw/virtio-bus.c | 111 +++ hw/virtio-bus.h | 76 ++

[Qemu-devel] [RFC PATCH v5 0/6] Virtio refactoring.

2012-12-04 Thread fred . konrad
e old-style "bus->qbus" by BUS() macro. Fred. KONRAD Frederic (6): qdev : add a maximum device allowed field for the bus. virtio-bus : Introduce virtio-bus virtio-pci-bus : Introduce virtio-pci-bus. virtio-pci : Refactor virtio-pci device. virtio-device : Refactor virt

[Qemu-devel] [RFC PATCH v5 4/6] virtio-pci : Refactor virtio-pci device.

2012-12-04 Thread fred . konrad
From: KONRAD Frederic Create the virtio-pci device. This transport device will create a virtio-pci-bus, so one VirtIODevice can be connected. Signed-off-by: KONRAD Frederic --- hw/virtio-pci.c | 112 hw/virtio-pci.h | 14 +++ 2 file

[Qemu-devel] [RFC PATCH v5 6/6] virtio-blk : Refactor virtio-blk.

2012-12-04 Thread fred . konrad
From: KONRAD Frederic Create virtio-blk which extends virtio-device, so it can be connected on virtio-bus. Signed-off-by: KONRAD Frederic --- hw/virtio-blk.c | 170 hw/virtio-blk.h | 4 ++ 2 files changed, 150 insertions(+), 24 deletio

[Qemu-devel] [RFC PATCH v5 1/6] qdev : add a maximum device allowed field for the bus.

2012-12-04 Thread fred . konrad
From: KONRAD Frederic Add a max_dev field to BusState to specify the maximum amount of devices allowed on the bus ( have no effect if max_dev=0 ) Signed-off-by: KONRAD Frederic --- hw/qdev-core.h| 2 ++ hw/qdev-monitor.c | 11 +++ 2 files changed, 13 insertions(+) diff --git a/hw

[Qemu-devel] [RFC PATCH v5 3/6] virtio-pci-bus : Introduce virtio-pci-bus.

2012-12-04 Thread fred . konrad
From: KONRAD Frederic Introduce virtio-pci-bus, which extends virtio-bus. It is used with virtio-pci transport device. Signed-off-by: KONRAD Frederic --- hw/virtio-pci.c | 37 + hw/virtio-pci.h | 19 +-- 2 files changed, 54 insertions(+), 2 d

[Qemu-devel] [RFC PATCH V4 3/6] virtio-pci-bus : Introduce virtio-pci-bus.

2012-11-30 Thread fred . konrad
From: KONRAD Frederic Signed-off-by: KONRAD Frederic --- hw/virtio-pci.c | 45 + hw/virtio-pci.h | 19 +-- 2 files changed, 62 insertions(+), 2 deletions(-) diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c index 71f4fb5..a73704d 100

[Qemu-devel] [RFC PATCH V4 6/6] virtio-blk : Refactoring virtio-blk.

2012-11-30 Thread fred . konrad
From: KONRAD Frederic Signed-off-by: KONRAD Frederic --- hw/virtio-blk.c | 61 +++ hw/virtio-blk.h | 16 ++ 2 files changed, 77 insertions(+), 0 deletions(-) diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c index e25cc96..354788

[Qemu-devel] [RFC PATCH V4 2/6] virtio-bus : Introduce virtio-bus

2012-11-30 Thread fred . konrad
From: KONRAD Frederic Signed-off-by: KONRAD Frederic --- hw/Makefile.objs |1 + hw/virtio-bus.c | 114 ++ hw/virtio-bus.h | 78 + 3 files changed, 193 insertions(+), 0 deletions(-) create mode 1006

[Qemu-devel] [RFC PATCH V4 5/6] virtio-device : Introduce virtio-device.

2012-11-30 Thread fred . konrad
From: KONRAD Frederic Signed-off-by: KONRAD Frederic --- hw/virtio.c | 28 hw/virtio.h | 27 +++ 2 files changed, 55 insertions(+), 0 deletions(-) diff --git a/hw/virtio.c b/hw/virtio.c index f40a8c5..1c72d17 100644 --- a/hw/virtio.c +++

[Qemu-devel] [RFC PATCH V4 4/6] virtio-pci : Introduce virtio-pci device.

2012-11-30 Thread fred . konrad
From: KONRAD Frederic Signed-off-by: KONRAD Frederic --- hw/virtio-pci.c | 48 +++- hw/virtio-pci.h | 15 +++ 2 files changed, 62 insertions(+), 1 deletions(-) diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c index a73704d..1fb1905 1006

[Qemu-devel] [RFC PATCH V4 0/6] Virtio refactoring.

2012-11-30 Thread fred . konrad
nd remove the pci_id* from the VirtioBus structure. * Added virtio_bus_reset(). * Added cast macros VIRTIO_BUS. * Added virtio_bus_plug_device. * Replaced the old-style "bus->qbus" by BUS() macro. Fred. KONRAD Frederic (6): qdev : add a maximum device allowed field for

[Qemu-devel] [RFC PATCH V4 1/6] qdev : add a maximum device allowed field for the bus.

2012-11-30 Thread fred . konrad
From: KONRAD Frederic Only one device can be connected to virtio-bus. This patch add a field max_dev which is : * the maximum amount of devices connected on the bus ( when * max_dev!=0 ). * have no effect ( when max_dev=0 ). The function qbus_find_recursive is modified : * to ret

[Qemu-devel] [RFC PATCH v3 1/2] virtio-bus : Introduce virtio-bus

2012-11-27 Thread fred . konrad
From: KONRAD Frederic This patch create VirtioBus which is abstract, we can create virtio-x-bus which extends this virtio-bus. The virtio-x-bus need to implement all the methods from the VirtioBusClass. Signed-off-by: KONRAD Frederic --- hw/virtio-bus.c | 118

[Qemu-devel] [RFC PATCH v3 2/2] qbus : add a maximum device.

2012-11-27 Thread fred . konrad
From: KONRAD Frederic Only one device can be connected to virtio-bus. This patch add a field max_dev which is : * the maximum amount of devices connected on the bus ( when * max_dev!=0 ). * have no effect ( when max_dev=0 ). The function qbus_find_recursive is modified : * to ret

[Qemu-devel] [RFC PATCH v3 0/2] Introduce virtio-bus.

2012-11-27 Thread fred . konrad
cast macros VIRTIO_BUS. * Added virtio_bus_plug_device. * Replaced the old-style "bus->qbus" by BUS() macro. Fred KONRAD Frederic (2): virtio-bus : Introduce virtio-bus qbus : add a maximum device. hw/qdev-core.h|1 + hw/qdev-monitor.c |

[Qemu-devel] [RFC PATCH v2 2/3] virtio-pci : add a virtio-bus interface

2012-11-22 Thread fred . konrad
From: KONRAD Frederic This patch add a VirtioBus in the VirtIOPCIProxy structure. It creates a new device : "virtio-pci" which init the VirtioBus. Two callback are written : * void virtio_pci_init_cb(DeviceState *dev) to initialize the PCI interface after the VirtIODevice init, it is a

[Qemu-devel] [RFC PATCH v2 1/3] virtio-bus : Introduce VirtioBus.

2012-11-22 Thread fred . konrad
From: KONRAD Frederic This patch create a new VirtioBus, which can be added to Virtio transports like virtio-pci, virtio-mmio,... One VirtIODevice can be connected to this device, like virtio-blk in the 3rd patch. The VirtioBus shares through a VirtioBusInfo structure : * two callbacks wit

[Qemu-devel] [RFC PATCH v2 3/3] virtio-blk : add the virtio-blk device.

2012-11-22 Thread fred . konrad
From: KONRAD Frederic This patch just add the virtio-blk device which can connect on a Virtio-Bus. The initialization fail if no free VirtioBus are present. Signed-off-by: KONRAD Frederic --- hw/virtio-blk.c | 82 + hw/virtio-blk.h | 10 +

[Qemu-devel] [RFC PATCH v2 0/3] Virtio-refactoring.

2012-11-22 Thread fred . konrad
. git available here : git://git.greensocs.com/qemu_virtio.git virtio_refactoring_2 or with http : http://git.greensocs.com/?p=qemu_virtio.git;a=shortlog; \ h=refs/heads/virtio_refactoring_2 Fred KONRAD Frederic (3): virtio-bus : Introduce VirtioBus. virtio-pci : add a virtio-bus i

[Qemu-devel] [RFC PATCH 3/3] virtio-blk : add the virtio-blk device.

2012-11-16 Thread fred . konrad
From: KONRAD Frederic This patch just add the virtio-blk device which can connect on a Virtio-Bus. The initialization fail if no free VirtioBus are present. Signed-off-by: KONRAD Frederic --- hw/virtio-blk.c | 84 + hw/virtio-blk.h | 7 +

[Qemu-devel] [RFC PATCH 2/3] virtio-pci : Add a virtio-bus interface

2012-11-16 Thread fred . konrad
From: KONRAD Frederic This patch add a VirtioBus in the VirtIOPCIProxy structure. It creates a new device : "virtio-pci" which init the VirtioBus. Two callback are written : * void virtio_pci_init_cb(DeviceState *dev) to initialize the PCI interface after the VirtIODevice init, it is a

[Qemu-devel] [RFC PATCH 1/3] virtio-bus : Introduce VirtioBus.

2012-11-16 Thread fred . konrad
From: KONRAD Frederic This patch create a new VirtioBus, which can be added to Virtio transports like virtio-pci, virtio-mmio,... One VirtIODevice can be connected to this device, like virtio-blk in the 3rd patch. The VirtioBus shares through a VirtioBusInfo structure : * two callbacks wit

[Qemu-devel] [RFC PATCH 0/3] Virtio refactoring.

2012-11-16 Thread fred . konrad
Hi, I submit this RFC to be sure I'm doing the right thing about the VirtioBus. I push the patchset here : git://git.greensocs.com/qemu_virtio.git virtio_refact What I proposed to do : * Introduce a new VirtioBus ( same way as scsi-bus.c ), with VirtIODevice interface : ->

<    3   4   5   6   7   8