* [Qemu-devel] [PATCH 0/9] virtio-1.0: cleanups and preparations for virtio-vga
@ 2015-04-10 12:31 Gerd Hoffmann
2015-04-10 12:31 ` [Qemu-devel] [PATCH 1/9] virtio: add struct VirtIOPCIRegion for virtio-1 regions Gerd Hoffmann
` (9 more replies)
0 siblings, 10 replies; 15+ messages in thread
From: Gerd Hoffmann @ 2015-04-10 12:31 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann, mst
Hi,
Here is a series of patches for virtio-pci, with some cleanups and
preparations for virtio-vga.
Patches 1-6 clean up the modern (virtio-1.0) memory region
initialization a bit. They are preparations for the other patches,
but IMHO are also a useful cleanup on their own.
Patches 7+8 changes initialization so virtio-vga has a chance to
arrange things as it pleases.
Patches 1-8 should apply fine on top of mst's virtio-1.0 branch, and
I'm looking for reviews of them.
Patch 9 is the showcase for patches 7+8. It has more dependencies
though, if you wanna play with that I'd suggest to fetch
https://www.kraxel.org/cgit/qemu/log/?h=rebase/vga-wip
cheers,
Gerd
Gerd Hoffmann (9):
virtio: add struct VirtIOPCIRegion for virtio-1 regions
virtio: add virtio_pci_modern_regions_init()
virtio: add virtio_pci_modern_region_map()
virtio: move virtio_pci_add_mem_cap call to
virtio_pci_modern_region_map
virtio: move cap type to VirtIOPCIRegion
virtio: drop identical virtio_pci_cap
virtio: move bar assignments to VirtIOPCIProxy
virtio: init from virtio_pci_device_plugged to virtio_pci_realize
virtio-vga: make compatible with stdvga
hw/display/vga-pci.c | 8 +-
hw/display/vga_int.h | 6 ++
hw/display/virtio-vga.c | 20 ++++-
hw/virtio/virtio-pci.c | 228 ++++++++++++++++++++++++------------------------
hw/virtio/virtio-pci.h | 17 +++-
5 files changed, 157 insertions(+), 122 deletions(-)
--
1.8.3.1
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Qemu-devel] [PATCH 1/9] virtio: add struct VirtIOPCIRegion for virtio-1 regions
2015-04-10 12:31 [Qemu-devel] [PATCH 0/9] virtio-1.0: cleanups and preparations for virtio-vga Gerd Hoffmann
@ 2015-04-10 12:31 ` Gerd Hoffmann
2015-04-10 12:31 ` [Qemu-devel] [PATCH 2/9] virtio: add virtio_pci_modern_regions_init() Gerd Hoffmann
` (8 subsequent siblings)
9 siblings, 0 replies; 15+ messages in thread
From: Gerd Hoffmann @ 2015-04-10 12:31 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann, mst
For now just place the MemoryRegion there,
following patches will add more.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
hw/virtio/virtio-pci.c | 18 ++++++++++--------
hw/virtio/virtio-pci.h | 12 ++++++++----
2 files changed, 18 insertions(+), 12 deletions(-)
diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index 4c653fe..9c84f5a 100644
--- a/hw/virtio/virtio-pci.c
+++ b/hw/virtio/virtio-pci.c
@@ -1307,28 +1307,30 @@ static void virtio_pci_device_plugged(DeviceState *d)
memory_region_init(&proxy->modern_bar, OBJECT(proxy), "virtio-pci",
2 * QEMU_VIRTIO_PCI_QUEUE_MEM_MULT *
VIRTIO_PCI_QUEUE_MAX);
- memory_region_init_io(&proxy->common, OBJECT(proxy),
+ memory_region_init_io(&proxy->common.mr, OBJECT(proxy),
&common_ops,
proxy,
"virtio-pci-common", 0x1000);
- memory_region_add_subregion(&proxy->modern_bar, 0, &proxy->common);
- memory_region_init_io(&proxy->isr, OBJECT(proxy),
+ memory_region_add_subregion(&proxy->modern_bar, 0, &proxy->common.mr);
+ memory_region_init_io(&proxy->isr.mr, OBJECT(proxy),
&isr_ops,
proxy,
"virtio-pci-isr", 0x1000);
- memory_region_add_subregion(&proxy->modern_bar, 0x1000, &proxy->isr);
- memory_region_init_io(&proxy->device, OBJECT(proxy),
+ memory_region_add_subregion(&proxy->modern_bar, 0x1000, &proxy->isr.mr);
+ memory_region_init_io(&proxy->device.mr, OBJECT(proxy),
&device_ops,
virtio_bus_get_device(&proxy->bus),
"virtio-pci-device", 0x1000);
- memory_region_add_subregion(&proxy->modern_bar, 0x2000, &proxy->device);
- memory_region_init_io(&proxy->notify, OBJECT(proxy),
+ memory_region_add_subregion(&proxy->modern_bar, 0x2000,
+ &proxy->device.mr);
+ memory_region_init_io(&proxy->notify.mr, OBJECT(proxy),
¬ify_ops,
virtio_bus_get_device(&proxy->bus),
"virtio-pci-notify",
QEMU_VIRTIO_PCI_QUEUE_MEM_MULT *
VIRTIO_PCI_QUEUE_MAX);
- memory_region_add_subregion(&proxy->modern_bar, 0x3000, &proxy->notify);
+ memory_region_add_subregion(&proxy->modern_bar, 0x3000,
+ &proxy->notify.mr);
pci_register_bar(&proxy->pci_dev, modern_mem_bar,
PCI_BASE_ADDRESS_SPACE_MEMORY |
PCI_BASE_ADDRESS_MEM_PREFETCH |
diff --git a/hw/virtio/virtio-pci.h b/hw/virtio/virtio-pci.h
index efe8d31..6c717cf 100644
--- a/hw/virtio/virtio-pci.h
+++ b/hw/virtio/virtio-pci.h
@@ -93,13 +93,17 @@ typedef struct VirtioPCIClass {
void (*realize)(VirtIOPCIProxy *vpci_dev, Error **errp);
} VirtioPCIClass;
+typedef struct VirtIOPCIRegion {
+ MemoryRegion mr;
+} VirtIOPCIRegion;
+
struct VirtIOPCIProxy {
PCIDevice pci_dev;
MemoryRegion bar;
- MemoryRegion common;
- MemoryRegion isr;
- MemoryRegion device;
- MemoryRegion notify;
+ VirtIOPCIRegion common;
+ VirtIOPCIRegion isr;
+ VirtIOPCIRegion device;
+ VirtIOPCIRegion notify;
MemoryRegion modern_bar;
uint32_t flags;
uint32_t class_code;
--
1.8.3.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [Qemu-devel] [PATCH 2/9] virtio: add virtio_pci_modern_regions_init()
2015-04-10 12:31 [Qemu-devel] [PATCH 0/9] virtio-1.0: cleanups and preparations for virtio-vga Gerd Hoffmann
2015-04-10 12:31 ` [Qemu-devel] [PATCH 1/9] virtio: add struct VirtIOPCIRegion for virtio-1 regions Gerd Hoffmann
@ 2015-04-10 12:31 ` Gerd Hoffmann
2015-04-10 12:31 ` [Qemu-devel] [PATCH 3/9] virtio: add virtio_pci_modern_region_map() Gerd Hoffmann
` (7 subsequent siblings)
9 siblings, 0 replies; 15+ messages in thread
From: Gerd Hoffmann @ 2015-04-10 12:31 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann, mst
Add init function for the modern pci regions,
move over the init code.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
hw/virtio/virtio-pci.c | 117 +++++++++++++++++++++++++------------------------
1 file changed, 59 insertions(+), 58 deletions(-)
diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index 9c84f5a..8ade641 100644
--- a/hw/virtio/virtio-pci.c
+++ b/hw/virtio/virtio-pci.c
@@ -1177,6 +1177,64 @@ static void virtio_pci_device_write(void *opaque, hwaddr addr,
}
}
+static void virtio_pci_modern_regions_init(VirtIOPCIProxy *proxy)
+{
+ static const MemoryRegionOps common_ops = {
+ .read = virtio_pci_common_read,
+ .write = virtio_pci_common_write,
+ .impl = {
+ .min_access_size = 1,
+ .max_access_size = 4,
+ },
+ .endianness = DEVICE_LITTLE_ENDIAN,
+ };
+ static const MemoryRegionOps isr_ops = {
+ .read = virtio_pci_isr_read,
+ .write = virtio_pci_isr_write,
+ .impl = {
+ .min_access_size = 1,
+ .max_access_size = 4,
+ },
+ .endianness = DEVICE_LITTLE_ENDIAN,
+ };
+ static const MemoryRegionOps device_ops = {
+ .read = virtio_pci_device_read,
+ .write = virtio_pci_device_write,
+ .impl = {
+ .min_access_size = 1,
+ .max_access_size = 4,
+ },
+ .endianness = DEVICE_LITTLE_ENDIAN,
+ };
+ static const MemoryRegionOps notify_ops = {
+ .read = virtio_pci_notify_read,
+ .write = virtio_pci_notify_write,
+ .impl = {
+ .min_access_size = 1,
+ .max_access_size = 4,
+ },
+ .endianness = DEVICE_LITTLE_ENDIAN,
+ };
+
+ memory_region_init_io(&proxy->common.mr, OBJECT(proxy),
+ &common_ops,
+ proxy,
+ "virtio-pci-common", 0x1000);
+ memory_region_init_io(&proxy->isr.mr, OBJECT(proxy),
+ &isr_ops,
+ proxy,
+ "virtio-pci-isr", 0x1000);
+ memory_region_init_io(&proxy->device.mr, OBJECT(proxy),
+ &device_ops,
+ virtio_bus_get_device(&proxy->bus),
+ "virtio-pci-device", 0x1000);
+ memory_region_init_io(&proxy->notify.mr, OBJECT(proxy),
+ ¬ify_ops,
+ virtio_bus_get_device(&proxy->bus),
+ "virtio-pci-notify",
+ QEMU_VIRTIO_PCI_QUEUE_MEM_MULT *
+ VIRTIO_PCI_QUEUE_MAX);
+}
/* This is called by virtio-bus just after the device is plugged. */
static void virtio_pci_device_plugged(DeviceState *d)
@@ -1257,46 +1315,6 @@ static void virtio_pci_device_plugged(DeviceState *d)
.notify_off_multiplier = cpu_to_le32(QEMU_VIRTIO_PCI_QUEUE_MEM_MULT),
};
- static const MemoryRegionOps common_ops = {
- .read = virtio_pci_common_read,
- .write = virtio_pci_common_write,
- .impl = {
- .min_access_size = 1,
- .max_access_size = 4,
- },
- .endianness = DEVICE_LITTLE_ENDIAN,
- };
-
- static const MemoryRegionOps isr_ops = {
- .read = virtio_pci_isr_read,
- .write = virtio_pci_isr_write,
- .impl = {
- .min_access_size = 1,
- .max_access_size = 4,
- },
- .endianness = DEVICE_LITTLE_ENDIAN,
- };
-
- static const MemoryRegionOps device_ops = {
- .read = virtio_pci_device_read,
- .write = virtio_pci_device_write,
- .impl = {
- .min_access_size = 1,
- .max_access_size = 4,
- },
- .endianness = DEVICE_LITTLE_ENDIAN,
- };
-
- static const MemoryRegionOps notify_ops = {
- .read = virtio_pci_notify_read,
- .write = virtio_pci_notify_write,
- .impl = {
- .min_access_size = 1,
- .max_access_size = 4,
- },
- .endianness = DEVICE_LITTLE_ENDIAN,
- };
-
/* TODO: add io access for speed */
virtio_pci_add_mem_cap(proxy, &common);
virtio_pci_add_mem_cap(proxy, &isr);
@@ -1307,28 +1325,11 @@ static void virtio_pci_device_plugged(DeviceState *d)
memory_region_init(&proxy->modern_bar, OBJECT(proxy), "virtio-pci",
2 * QEMU_VIRTIO_PCI_QUEUE_MEM_MULT *
VIRTIO_PCI_QUEUE_MAX);
- memory_region_init_io(&proxy->common.mr, OBJECT(proxy),
- &common_ops,
- proxy,
- "virtio-pci-common", 0x1000);
+ virtio_pci_modern_regions_init(proxy);
memory_region_add_subregion(&proxy->modern_bar, 0, &proxy->common.mr);
- memory_region_init_io(&proxy->isr.mr, OBJECT(proxy),
- &isr_ops,
- proxy,
- "virtio-pci-isr", 0x1000);
memory_region_add_subregion(&proxy->modern_bar, 0x1000, &proxy->isr.mr);
- memory_region_init_io(&proxy->device.mr, OBJECT(proxy),
- &device_ops,
- virtio_bus_get_device(&proxy->bus),
- "virtio-pci-device", 0x1000);
memory_region_add_subregion(&proxy->modern_bar, 0x2000,
&proxy->device.mr);
- memory_region_init_io(&proxy->notify.mr, OBJECT(proxy),
- ¬ify_ops,
- virtio_bus_get_device(&proxy->bus),
- "virtio-pci-notify",
- QEMU_VIRTIO_PCI_QUEUE_MEM_MULT *
- VIRTIO_PCI_QUEUE_MAX);
memory_region_add_subregion(&proxy->modern_bar, 0x3000,
&proxy->notify.mr);
pci_register_bar(&proxy->pci_dev, modern_mem_bar,
--
1.8.3.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [Qemu-devel] [PATCH 3/9] virtio: add virtio_pci_modern_region_map()
2015-04-10 12:31 [Qemu-devel] [PATCH 0/9] virtio-1.0: cleanups and preparations for virtio-vga Gerd Hoffmann
2015-04-10 12:31 ` [Qemu-devel] [PATCH 1/9] virtio: add struct VirtIOPCIRegion for virtio-1 regions Gerd Hoffmann
2015-04-10 12:31 ` [Qemu-devel] [PATCH 2/9] virtio: add virtio_pci_modern_regions_init() Gerd Hoffmann
@ 2015-04-10 12:31 ` Gerd Hoffmann
2015-04-10 12:31 ` [Qemu-devel] [PATCH 4/9] virtio: move virtio_pci_add_mem_cap call to virtio_pci_modern_region_map Gerd Hoffmann
` (6 subsequent siblings)
9 siblings, 0 replies; 15+ messages in thread
From: Gerd Hoffmann @ 2015-04-10 12:31 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann, mst
Add funxction to map modern virtio regions.
Add offset to VirtIOPCIRegion.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
hw/virtio/virtio-pci.c | 25 +++++++++++++++++++------
hw/virtio/virtio-pci.h | 2 ++
2 files changed, 21 insertions(+), 6 deletions(-)
diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index 8ade641..44386cd 100644
--- a/hw/virtio/virtio-pci.c
+++ b/hw/virtio/virtio-pci.c
@@ -1220,20 +1220,35 @@ static void virtio_pci_modern_regions_init(VirtIOPCIProxy *proxy)
&common_ops,
proxy,
"virtio-pci-common", 0x1000);
+ proxy->common.offset = 0x0;
+
memory_region_init_io(&proxy->isr.mr, OBJECT(proxy),
&isr_ops,
proxy,
"virtio-pci-isr", 0x1000);
+ proxy->isr.offset = 0x1000;
+
memory_region_init_io(&proxy->device.mr, OBJECT(proxy),
&device_ops,
virtio_bus_get_device(&proxy->bus),
"virtio-pci-device", 0x1000);
+ proxy->device.offset = 0x2000;
+
memory_region_init_io(&proxy->notify.mr, OBJECT(proxy),
¬ify_ops,
virtio_bus_get_device(&proxy->bus),
"virtio-pci-notify",
QEMU_VIRTIO_PCI_QUEUE_MEM_MULT *
VIRTIO_PCI_QUEUE_MAX);
+ proxy->notify.offset = 0x3000;
+}
+
+static void virtio_pci_modern_region_map(VirtIOPCIProxy *proxy,
+ VirtIOPCIRegion *region)
+{
+ memory_region_add_subregion(&proxy->modern_bar,
+ region->offset,
+ ®ion->mr);
}
/* This is called by virtio-bus just after the device is plugged. */
@@ -1326,12 +1341,10 @@ static void virtio_pci_device_plugged(DeviceState *d)
2 * QEMU_VIRTIO_PCI_QUEUE_MEM_MULT *
VIRTIO_PCI_QUEUE_MAX);
virtio_pci_modern_regions_init(proxy);
- memory_region_add_subregion(&proxy->modern_bar, 0, &proxy->common.mr);
- memory_region_add_subregion(&proxy->modern_bar, 0x1000, &proxy->isr.mr);
- memory_region_add_subregion(&proxy->modern_bar, 0x2000,
- &proxy->device.mr);
- memory_region_add_subregion(&proxy->modern_bar, 0x3000,
- &proxy->notify.mr);
+ virtio_pci_modern_region_map(proxy, &proxy->common);
+ virtio_pci_modern_region_map(proxy, &proxy->isr);
+ virtio_pci_modern_region_map(proxy, &proxy->device);
+ virtio_pci_modern_region_map(proxy, &proxy->notify);
pci_register_bar(&proxy->pci_dev, modern_mem_bar,
PCI_BASE_ADDRESS_SPACE_MEMORY |
PCI_BASE_ADDRESS_MEM_PREFETCH |
diff --git a/hw/virtio/virtio-pci.h b/hw/virtio/virtio-pci.h
index 6c717cf..d1cd924 100644
--- a/hw/virtio/virtio-pci.h
+++ b/hw/virtio/virtio-pci.h
@@ -95,6 +95,8 @@ typedef struct VirtioPCIClass {
typedef struct VirtIOPCIRegion {
MemoryRegion mr;
+ uint32_t offset;
+ uint32_t type;
} VirtIOPCIRegion;
struct VirtIOPCIProxy {
--
1.8.3.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [Qemu-devel] [PATCH 4/9] virtio: move virtio_pci_add_mem_cap call to virtio_pci_modern_region_map
2015-04-10 12:31 [Qemu-devel] [PATCH 0/9] virtio-1.0: cleanups and preparations for virtio-vga Gerd Hoffmann
` (2 preceding siblings ...)
2015-04-10 12:31 ` [Qemu-devel] [PATCH 3/9] virtio: add virtio_pci_modern_region_map() Gerd Hoffmann
@ 2015-04-10 12:31 ` Gerd Hoffmann
2015-04-10 12:31 ` [Qemu-devel] [PATCH 5/9] virtio: move cap type to VirtIOPCIRegion Gerd Hoffmann
` (5 subsequent siblings)
9 siblings, 0 replies; 15+ messages in thread
From: Gerd Hoffmann @ 2015-04-10 12:31 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann, mst
Also fill offset and length automatically,
from VirtIOPCIRegion->offset and region size.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
hw/virtio/virtio-pci.c | 28 ++++++++++------------------
1 file changed, 10 insertions(+), 18 deletions(-)
diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index 44386cd..617a3b7 100644
--- a/hw/virtio/virtio-pci.c
+++ b/hw/virtio/virtio-pci.c
@@ -1244,11 +1244,16 @@ static void virtio_pci_modern_regions_init(VirtIOPCIProxy *proxy)
}
static void virtio_pci_modern_region_map(VirtIOPCIProxy *proxy,
- VirtIOPCIRegion *region)
+ VirtIOPCIRegion *region,
+ struct virtio_pci_cap *cap)
{
memory_region_add_subregion(&proxy->modern_bar,
region->offset,
®ion->mr);
+
+ cap->offset = cpu_to_le32(region->offset);
+ cap->length = cpu_to_le32(memory_region_size(®ion->mr));
+ virtio_pci_add_mem_cap(proxy, cap);
}
/* This is called by virtio-bus just after the device is plugged. */
@@ -1303,48 +1308,35 @@ static void virtio_pci_device_plugged(DeviceState *d)
.cfg_type = VIRTIO_PCI_CAP_COMMON_CFG,
.cap_len = sizeof common,
.bar = modern_mem_bar,
- .offset = cpu_to_le32(0x0),
- .length = cpu_to_le32(0x1000),
};
struct virtio_pci_cap isr = {
.cfg_type = VIRTIO_PCI_CAP_ISR_CFG,
.cap_len = sizeof isr,
.bar = modern_mem_bar,
- .offset = cpu_to_le32(0x1000),
- .length = cpu_to_le32(0x1000),
};
struct virtio_pci_cap device = {
.cfg_type = VIRTIO_PCI_CAP_DEVICE_CFG,
.cap_len = sizeof device,
.bar = modern_mem_bar,
- .offset = cpu_to_le32(0x2000),
- .length = cpu_to_le32(0x1000),
};
struct virtio_pci_notify_cap notify = {
.cap.cfg_type = VIRTIO_PCI_CAP_NOTIFY_CFG,
.cap.cap_len = sizeof notify,
.cap.bar = modern_mem_bar,
- .cap.offset = cpu_to_le32(0x3000),
- .cap.length = cpu_to_le32(QEMU_VIRTIO_PCI_QUEUE_MEM_MULT *
- VIRTIO_PCI_QUEUE_MAX),
.notify_off_multiplier = cpu_to_le32(QEMU_VIRTIO_PCI_QUEUE_MEM_MULT),
};
/* TODO: add io access for speed */
- virtio_pci_add_mem_cap(proxy, &common);
- virtio_pci_add_mem_cap(proxy, &isr);
- virtio_pci_add_mem_cap(proxy, &device);
- virtio_pci_add_mem_cap(proxy, ¬ify.cap);
virtio_add_feature(&proxy->host_features, VIRTIO_F_VERSION_1);
memory_region_init(&proxy->modern_bar, OBJECT(proxy), "virtio-pci",
2 * QEMU_VIRTIO_PCI_QUEUE_MEM_MULT *
VIRTIO_PCI_QUEUE_MAX);
virtio_pci_modern_regions_init(proxy);
- virtio_pci_modern_region_map(proxy, &proxy->common);
- virtio_pci_modern_region_map(proxy, &proxy->isr);
- virtio_pci_modern_region_map(proxy, &proxy->device);
- virtio_pci_modern_region_map(proxy, &proxy->notify);
+ virtio_pci_modern_region_map(proxy, &proxy->common, &common);
+ virtio_pci_modern_region_map(proxy, &proxy->isr, &isr);
+ virtio_pci_modern_region_map(proxy, &proxy->device, &device);
+ virtio_pci_modern_region_map(proxy, &proxy->notify, ¬ify.cap);
pci_register_bar(&proxy->pci_dev, modern_mem_bar,
PCI_BASE_ADDRESS_SPACE_MEMORY |
PCI_BASE_ADDRESS_MEM_PREFETCH |
--
1.8.3.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [Qemu-devel] [PATCH 5/9] virtio: move cap type to VirtIOPCIRegion
2015-04-10 12:31 [Qemu-devel] [PATCH 0/9] virtio-1.0: cleanups and preparations for virtio-vga Gerd Hoffmann
` (3 preceding siblings ...)
2015-04-10 12:31 ` [Qemu-devel] [PATCH 4/9] virtio: move virtio_pci_add_mem_cap call to virtio_pci_modern_region_map Gerd Hoffmann
@ 2015-04-10 12:31 ` Gerd Hoffmann
2015-04-10 12:31 ` [Qemu-devel] [PATCH 6/9] virtio: drop identical virtio_pci_cap Gerd Hoffmann
` (4 subsequent siblings)
9 siblings, 0 replies; 15+ messages in thread
From: Gerd Hoffmann @ 2015-04-10 12:31 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann, mst
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
hw/virtio/virtio-pci.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index 617a3b7..037f4ea 100644
--- a/hw/virtio/virtio-pci.c
+++ b/hw/virtio/virtio-pci.c
@@ -1221,18 +1221,21 @@ static void virtio_pci_modern_regions_init(VirtIOPCIProxy *proxy)
proxy,
"virtio-pci-common", 0x1000);
proxy->common.offset = 0x0;
+ proxy->common.type = VIRTIO_PCI_CAP_COMMON_CFG;
memory_region_init_io(&proxy->isr.mr, OBJECT(proxy),
&isr_ops,
proxy,
"virtio-pci-isr", 0x1000);
proxy->isr.offset = 0x1000;
+ proxy->isr.type = VIRTIO_PCI_CAP_ISR_CFG;
memory_region_init_io(&proxy->device.mr, OBJECT(proxy),
&device_ops,
virtio_bus_get_device(&proxy->bus),
"virtio-pci-device", 0x1000);
proxy->device.offset = 0x2000;
+ proxy->device.type = VIRTIO_PCI_CAP_DEVICE_CFG;
memory_region_init_io(&proxy->notify.mr, OBJECT(proxy),
¬ify_ops,
@@ -1241,6 +1244,7 @@ static void virtio_pci_modern_regions_init(VirtIOPCIProxy *proxy)
QEMU_VIRTIO_PCI_QUEUE_MEM_MULT *
VIRTIO_PCI_QUEUE_MAX);
proxy->notify.offset = 0x3000;
+ proxy->notify.type = VIRTIO_PCI_CAP_NOTIFY_CFG;
}
static void virtio_pci_modern_region_map(VirtIOPCIProxy *proxy,
@@ -1251,6 +1255,7 @@ static void virtio_pci_modern_region_map(VirtIOPCIProxy *proxy,
region->offset,
®ion->mr);
+ cap->cfg_type = region->type;
cap->offset = cpu_to_le32(region->offset);
cap->length = cpu_to_le32(memory_region_size(®ion->mr));
virtio_pci_add_mem_cap(proxy, cap);
@@ -1305,22 +1310,18 @@ static void virtio_pci_device_plugged(DeviceState *d)
if (modern) {
struct virtio_pci_cap common = {
- .cfg_type = VIRTIO_PCI_CAP_COMMON_CFG,
.cap_len = sizeof common,
.bar = modern_mem_bar,
};
struct virtio_pci_cap isr = {
- .cfg_type = VIRTIO_PCI_CAP_ISR_CFG,
.cap_len = sizeof isr,
.bar = modern_mem_bar,
};
struct virtio_pci_cap device = {
- .cfg_type = VIRTIO_PCI_CAP_DEVICE_CFG,
.cap_len = sizeof device,
.bar = modern_mem_bar,
};
struct virtio_pci_notify_cap notify = {
- .cap.cfg_type = VIRTIO_PCI_CAP_NOTIFY_CFG,
.cap.cap_len = sizeof notify,
.cap.bar = modern_mem_bar,
.notify_off_multiplier = cpu_to_le32(QEMU_VIRTIO_PCI_QUEUE_MEM_MULT),
--
1.8.3.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [Qemu-devel] [PATCH 6/9] virtio: drop identical virtio_pci_cap
2015-04-10 12:31 [Qemu-devel] [PATCH 0/9] virtio-1.0: cleanups and preparations for virtio-vga Gerd Hoffmann
` (4 preceding siblings ...)
2015-04-10 12:31 ` [Qemu-devel] [PATCH 5/9] virtio: move cap type to VirtIOPCIRegion Gerd Hoffmann
@ 2015-04-10 12:31 ` Gerd Hoffmann
2015-04-10 12:31 ` [Qemu-devel] [PATCH 7/9] virtio: move bar assignments to VirtIOPCIProxy Gerd Hoffmann
` (3 subsequent siblings)
9 siblings, 0 replies; 15+ messages in thread
From: Gerd Hoffmann @ 2015-04-10 12:31 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann, mst
Now the three struct virtio_pci_caps are identical,
lets drop two of them ;)
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
hw/virtio/virtio-pci.c | 18 +++++-------------
1 file changed, 5 insertions(+), 13 deletions(-)
diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index 037f4ea..229f93d 100644
--- a/hw/virtio/virtio-pci.c
+++ b/hw/virtio/virtio-pci.c
@@ -1309,16 +1309,8 @@ static void virtio_pci_device_plugged(DeviceState *d)
if (modern) {
- struct virtio_pci_cap common = {
- .cap_len = sizeof common,
- .bar = modern_mem_bar,
- };
- struct virtio_pci_cap isr = {
- .cap_len = sizeof isr,
- .bar = modern_mem_bar,
- };
- struct virtio_pci_cap device = {
- .cap_len = sizeof device,
+ struct virtio_pci_cap cap = {
+ .cap_len = sizeof cap,
.bar = modern_mem_bar,
};
struct virtio_pci_notify_cap notify = {
@@ -1334,9 +1326,9 @@ static void virtio_pci_device_plugged(DeviceState *d)
2 * QEMU_VIRTIO_PCI_QUEUE_MEM_MULT *
VIRTIO_PCI_QUEUE_MAX);
virtio_pci_modern_regions_init(proxy);
- virtio_pci_modern_region_map(proxy, &proxy->common, &common);
- virtio_pci_modern_region_map(proxy, &proxy->isr, &isr);
- virtio_pci_modern_region_map(proxy, &proxy->device, &device);
+ virtio_pci_modern_region_map(proxy, &proxy->common, &cap);
+ virtio_pci_modern_region_map(proxy, &proxy->isr, &cap);
+ virtio_pci_modern_region_map(proxy, &proxy->device, &cap);
virtio_pci_modern_region_map(proxy, &proxy->notify, ¬ify.cap);
pci_register_bar(&proxy->pci_dev, modern_mem_bar,
PCI_BASE_ADDRESS_SPACE_MEMORY |
--
1.8.3.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [Qemu-devel] [PATCH 7/9] virtio: move bar assignments to VirtIOPCIProxy
2015-04-10 12:31 [Qemu-devel] [PATCH 0/9] virtio-1.0: cleanups and preparations for virtio-vga Gerd Hoffmann
` (5 preceding siblings ...)
2015-04-10 12:31 ` [Qemu-devel] [PATCH 6/9] virtio: drop identical virtio_pci_cap Gerd Hoffmann
@ 2015-04-10 12:31 ` Gerd Hoffmann
2015-04-10 12:31 ` [Qemu-devel] [PATCH 8/9] virtio: init from virtio_pci_device_plugged to virtio_pci_realize Gerd Hoffmann
` (2 subsequent siblings)
9 siblings, 0 replies; 15+ messages in thread
From: Gerd Hoffmann @ 2015-04-10 12:31 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann, mst
Add variables for the pci bars, in preparation
to make this configurable.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
hw/virtio/virtio-pci.c | 16 ++++++++--------
hw/virtio/virtio-pci.h | 3 +++
2 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index 229f93d..c6fd73f 100644
--- a/hw/virtio/virtio-pci.c
+++ b/hw/virtio/virtio-pci.c
@@ -1256,6 +1256,7 @@ static void virtio_pci_modern_region_map(VirtIOPCIProxy *proxy,
®ion->mr);
cap->cfg_type = region->type;
+ cap->bar = proxy->modern_mem_bar;
cap->offset = cpu_to_le32(region->offset);
cap->length = cpu_to_le32(memory_region_size(®ion->mr));
virtio_pci_add_mem_cap(proxy, cap);
@@ -1283,9 +1284,9 @@ static void virtio_pci_device_plugged(DeviceState *d)
* virtio-vga places the vga framebuffer there.
*
*/
- uint32_t legacy_io_bar = 0;
- uint32_t msix_bar = 1;
- uint32_t modern_mem_bar = 4;
+ proxy->legacy_io_bar = 0;
+ proxy->msix_bar = 1;
+ proxy->modern_mem_bar = 4;
config = proxy->pci_dev.config;
if (proxy->class_code) {
@@ -1311,11 +1312,9 @@ static void virtio_pci_device_plugged(DeviceState *d)
if (modern) {
struct virtio_pci_cap cap = {
.cap_len = sizeof cap,
- .bar = modern_mem_bar,
};
struct virtio_pci_notify_cap notify = {
.cap.cap_len = sizeof notify,
- .cap.bar = modern_mem_bar,
.notify_off_multiplier = cpu_to_le32(QEMU_VIRTIO_PCI_QUEUE_MEM_MULT),
};
@@ -1330,7 +1329,7 @@ static void virtio_pci_device_plugged(DeviceState *d)
virtio_pci_modern_region_map(proxy, &proxy->isr, &cap);
virtio_pci_modern_region_map(proxy, &proxy->device, &cap);
virtio_pci_modern_region_map(proxy, &proxy->notify, ¬ify.cap);
- pci_register_bar(&proxy->pci_dev, modern_mem_bar,
+ pci_register_bar(&proxy->pci_dev, proxy->modern_mem_bar,
PCI_BASE_ADDRESS_SPACE_MEMORY |
PCI_BASE_ADDRESS_MEM_PREFETCH |
PCI_BASE_ADDRESS_MEM_TYPE_64,
@@ -1338,7 +1337,8 @@ static void virtio_pci_device_plugged(DeviceState *d)
}
if (proxy->nvectors &&
- msix_init_exclusive_bar(&proxy->pci_dev, proxy->nvectors, msix_bar)) {
+ msix_init_exclusive_bar(&proxy->pci_dev, proxy->nvectors,
+ proxy->msix_bar)) {
error_report("unable to init msix vectors to %" PRIu32,
proxy->nvectors);
proxy->nvectors = 0;
@@ -1357,7 +1357,7 @@ static void virtio_pci_device_plugged(DeviceState *d)
&virtio_pci_config_ops,
proxy, "virtio-pci", size);
- pci_register_bar(&proxy->pci_dev, legacy_io_bar,
+ pci_register_bar(&proxy->pci_dev, proxy->legacy_io_bar,
PCI_BASE_ADDRESS_SPACE_IO, &proxy->bar);
}
diff --git a/hw/virtio/virtio-pci.h b/hw/virtio/virtio-pci.h
index d1cd924..c62f68b 100644
--- a/hw/virtio/virtio-pci.h
+++ b/hw/virtio/virtio-pci.h
@@ -107,6 +107,9 @@ struct VirtIOPCIProxy {
VirtIOPCIRegion device;
VirtIOPCIRegion notify;
MemoryRegion modern_bar;
+ uint32_t legacy_io_bar;
+ uint32_t msix_bar;
+ uint32_t modern_mem_bar;
uint32_t flags;
uint32_t class_code;
uint32_t nvectors;
--
1.8.3.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [Qemu-devel] [PATCH 8/9] virtio: init from virtio_pci_device_plugged to virtio_pci_realize
2015-04-10 12:31 [Qemu-devel] [PATCH 0/9] virtio-1.0: cleanups and preparations for virtio-vga Gerd Hoffmann
` (6 preceding siblings ...)
2015-04-10 12:31 ` [Qemu-devel] [PATCH 7/9] virtio: move bar assignments to VirtIOPCIProxy Gerd Hoffmann
@ 2015-04-10 12:31 ` Gerd Hoffmann
2015-04-10 12:31 ` [Qemu-devel] [PATCH 9/9] virtio-vga: make compatible with stdvga Gerd Hoffmann
2015-04-27 9:45 ` [Qemu-devel] [PATCH 0/9] virtio-1.0: cleanups and preparations for virtio-vga Gerd Hoffmann
9 siblings, 0 replies; 15+ messages in thread
From: Gerd Hoffmann @ 2015-04-10 12:31 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann, mst
This allows virtio-pci subclasses to change things before the plugged
callback applies them.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
hw/virtio/virtio-pci.c | 41 +++++++++++++++++++++--------------------
1 file changed, 21 insertions(+), 20 deletions(-)
diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index c6fd73f..f73939e 100644
--- a/hw/virtio/virtio-pci.c
+++ b/hw/virtio/virtio-pci.c
@@ -1272,22 +1272,6 @@ static void virtio_pci_device_plugged(DeviceState *d)
uint8_t *config;
uint32_t size;
- /*
- * virtio pci bar layout
- *
- * region 0 -- virtio legacy io bar
- * region 1 -- msi-x bar
- * region 2+3 -- not used by virtio-pci
- * region 4+5 -- virtio modern memory (64bit) bar
- *
- * Regions 2+3 can be used by VirtIOPCIProxy subclasses.
- * virtio-vga places the vga framebuffer there.
- *
- */
- proxy->legacy_io_bar = 0;
- proxy->msix_bar = 1;
- proxy->modern_mem_bar = 4;
-
config = proxy->pci_dev.config;
if (proxy->class_code) {
pci_config_set_class(config, proxy->class_code);
@@ -1321,10 +1305,6 @@ static void virtio_pci_device_plugged(DeviceState *d)
/* TODO: add io access for speed */
virtio_add_feature(&proxy->host_features, VIRTIO_F_VERSION_1);
- memory_region_init(&proxy->modern_bar, OBJECT(proxy), "virtio-pci",
- 2 * QEMU_VIRTIO_PCI_QUEUE_MEM_MULT *
- VIRTIO_PCI_QUEUE_MAX);
- virtio_pci_modern_regions_init(proxy);
virtio_pci_modern_region_map(proxy, &proxy->common, &cap);
virtio_pci_modern_region_map(proxy, &proxy->isr, &cap);
virtio_pci_modern_region_map(proxy, &proxy->device, &cap);
@@ -1383,6 +1363,27 @@ static void virtio_pci_realize(PCIDevice *pci_dev, Error **errp)
VirtIOPCIProxy *dev = VIRTIO_PCI(pci_dev);
VirtioPCIClass *k = VIRTIO_PCI_GET_CLASS(pci_dev);
+ /*
+ * virtio pci bar layout
+ *
+ * region 0 -- virtio legacy io bar
+ * region 1 -- msi-x bar
+ * region 2+3 -- not used by virtio-pci
+ * region 4+5 -- virtio modern memory (64bit) bar
+ *
+ * Regions 2+3 can be used by VirtIOPCIProxy subclasses.
+ * virtio-vga places the vga framebuffer there.
+ *
+ */
+ dev->legacy_io_bar = 0;
+ dev->msix_bar = 1;
+ dev->modern_mem_bar = 4;
+
+ memory_region_init(&dev->modern_bar, OBJECT(dev), "virtio-pci",
+ 2 * QEMU_VIRTIO_PCI_QUEUE_MEM_MULT *
+ VIRTIO_PCI_QUEUE_MAX);
+ virtio_pci_modern_regions_init(dev);
+
virtio_pci_bus_new(&dev->bus, sizeof(dev->bus), dev);
if (k->realize) {
k->realize(dev, errp);
--
1.8.3.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [Qemu-devel] [PATCH 9/9] virtio-vga: make compatible with stdvga
2015-04-10 12:31 [Qemu-devel] [PATCH 0/9] virtio-1.0: cleanups and preparations for virtio-vga Gerd Hoffmann
` (7 preceding siblings ...)
2015-04-10 12:31 ` [Qemu-devel] [PATCH 8/9] virtio: init from virtio_pci_device_plugged to virtio_pci_realize Gerd Hoffmann
@ 2015-04-10 12:31 ` Gerd Hoffmann
2015-04-27 9:45 ` [Qemu-devel] [PATCH 0/9] virtio-1.0: cleanups and preparations for virtio-vga Gerd Hoffmann
9 siblings, 0 replies; 15+ messages in thread
From: Gerd Hoffmann @ 2015-04-10 12:31 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann, mst
Arrange things in a way that virtio-vga is both a virtio-1.0 device
(acting like virtio-gpu-pci in virtio mode) and fully compatible with
stdvga (in vga mode, i.e. when virtio is not enabled).
PCI bar #0 is identical for both stdvga and virtio-vga.
PCI bar #1 is msi-x for virtio-vga and unused for stdvga,
PCI bar #2 is the mmio area, looks like this for virtio-vga:
00000000fe800000-00000000fe87ffff (prio 1, RW): virtio-pci
00000000fe800400-00000000fe80041f (prio 0, RW): vga ioports remapped
00000000fe800500-00000000fe800515 (prio 0, RW): bochs dispi interface
00000000fe800600-00000000fe800607 (prio 0, RW): qemu extended regs
00000000fe83d000-00000000fe83dfff (prio 0, RW): virtio-pci-common
00000000fe83e000-00000000fe83efff (prio 0, RW): virtio-pci-isr
00000000fe83f000-00000000fe83ffff (prio 0, RW): virtio-pci-device
00000000fe840000-00000000fe87ffff (prio 0, RW): virtio-pci-notify
PCI bar #2 for stdvga looks this way:
00000000febf0000-00000000febf0fff (prio 1, RW): vga.mmio
00000000febf0400-00000000febf041f (prio 0, RW): vga ioports remapped
00000000febf0500-00000000febf0515 (prio 0, RW): bochs dispi interface
00000000febf0600-00000000febf0607 (prio 0, RW): qemu extended regs
i.e. it is smaller, lacks the virtio subregions, and seabios picks a
different place because of the size difference. But otherwise the mmio
bar is identical.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
hw/display/vga-pci.c | 8 ++++----
hw/display/vga_int.h | 6 ++++++
hw/display/virtio-vga.c | 20 +++++++++++++++++++-
3 files changed, 29 insertions(+), 5 deletions(-)
diff --git a/hw/display/vga-pci.c b/hw/display/vga-pci.c
index bfe58c7..09e4faa 100644
--- a/hw/display/vga-pci.c
+++ b/hw/display/vga-pci.c
@@ -201,10 +201,10 @@ static const MemoryRegionOps pci_vga_qext_ops = {
.endianness = DEVICE_LITTLE_ENDIAN,
};
-static void pci_std_vga_mmio_region_init(VGACommonState *s,
- MemoryRegion *parent,
- MemoryRegion *subs,
- bool qext)
+void pci_std_vga_mmio_region_init(VGACommonState *s,
+ MemoryRegion *parent,
+ MemoryRegion *subs,
+ bool qext)
{
memory_region_init_io(&subs[0], NULL, &pci_vga_ioport_ops, s,
"vga ioports remapped", PCI_VGA_IOPORT_SIZE);
diff --git a/hw/display/vga_int.h b/hw/display/vga_int.h
index 7ca2ad2..141ff30 100644
--- a/hw/display/vga_int.h
+++ b/hw/display/vga_int.h
@@ -221,4 +221,10 @@ extern const uint8_t gr_mask[16];
extern const MemoryRegionOps vga_mem_ops;
+/* vga-pci.c */
+void pci_std_vga_mmio_region_init(VGACommonState *s,
+ MemoryRegion *parent,
+ MemoryRegion *subs,
+ bool qext);
+
#endif
diff --git a/hw/display/virtio-vga.c b/hw/display/virtio-vga.c
index ded28c1..4b76e26 100644
--- a/hw/display/virtio-vga.c
+++ b/hw/display/virtio-vga.c
@@ -15,6 +15,7 @@ typedef struct VirtIOVGA {
VirtIOPCIProxy parent_obj;
VirtIOGPU vdev;
VGACommonState vga;
+ MemoryRegion vga_mrs[3];
uint32_t dummy;
} VirtIOVGA;
@@ -78,15 +79,28 @@ static void virtio_vga_realize(VirtIOPCIProxy *vpci_dev, Error **errp)
VirtIOVGA *vvga = VIRTIO_VGA(vpci_dev);
VirtIOGPU *g = &vvga->vdev;
VGACommonState *vga = &vvga->vga;
+ uint32_t offset;
/* init vga compat bits */
vga->vram_size_mb = 8;
vga_common_init(vga, OBJECT(vpci_dev), false);
vga_init(vga, OBJECT(vpci_dev), pci_address_space(&vpci_dev->pci_dev),
pci_address_space_io(&vpci_dev->pci_dev), true);
- pci_register_bar(&vpci_dev->pci_dev, 2,
+ pci_register_bar(&vpci_dev->pci_dev, 0,
PCI_BASE_ADDRESS_MEM_PREFETCH, &vga->vram);
+ /* configure virtio bar and regions */
+ vpci_dev->modern_mem_bar = 2;
+ offset = memory_region_size(&vpci_dev->modern_bar);
+ offset -= memory_region_size(&vpci_dev->notify.mr);
+ vpci_dev->notify.offset = offset;
+ offset -= memory_region_size(&vpci_dev->device.mr);
+ vpci_dev->device.offset = offset;
+ offset -= memory_region_size(&vpci_dev->isr.mr);
+ vpci_dev->isr.offset = offset;
+ offset -= memory_region_size(&vpci_dev->common.mr);
+ vpci_dev->common.offset = offset;
+
/* init virtio bits */
qdev_set_parent_bus(DEVICE(g), BUS(&vpci_dev->bus));
/* force virtio-1.0 */
@@ -94,6 +108,10 @@ static void virtio_vga_realize(VirtIOPCIProxy *vpci_dev, Error **errp)
vpci_dev->flags |= VIRTIO_PCI_FLAG_DISABLE_LEGACY;
object_property_set_bool(OBJECT(g), true, "realized", errp);
+ /* add stdvga mmio regions */
+ pci_std_vga_mmio_region_init(vga, &vpci_dev->modern_bar,
+ vvga->vga_mrs, true);
+
vga->con = g->scanout[0].con;
graphic_console_set_hwops(vga->con, &virtio_vga_ops, vvga);
}
--
1.8.3.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [Qemu-devel] [PATCH 0/9] virtio-1.0: cleanups and preparations for virtio-vga
2015-04-10 12:31 [Qemu-devel] [PATCH 0/9] virtio-1.0: cleanups and preparations for virtio-vga Gerd Hoffmann
` (8 preceding siblings ...)
2015-04-10 12:31 ` [Qemu-devel] [PATCH 9/9] virtio-vga: make compatible with stdvga Gerd Hoffmann
@ 2015-04-27 9:45 ` Gerd Hoffmann
2015-04-27 10:15 ` Michael S. Tsirkin
9 siblings, 1 reply; 15+ messages in thread
From: Gerd Hoffmann @ 2015-04-27 9:45 UTC (permalink / raw)
To: qemu-devel; +Cc: mst
On Fr, 2015-04-10 at 14:31 +0200, Gerd Hoffmann wrote:
> Hi,
>
> Here is a series of patches for virtio-pci, with some cleanups and
> preparations for virtio-vga.
>
> Patches 1-6 clean up the modern (virtio-1.0) memory region
> initialization a bit. They are preparations for the other patches,
> but IMHO are also a useful cleanup on their own.
>
> Patches 7+8 changes initialization so virtio-vga has a chance to
> arrange things as it pleases.
>
> Patches 1-8 should apply fine on top of mst's virtio-1.0 branch, and
> I'm looking for reviews of them.
>
> Patch 9 is the showcase for patches 7+8. It has more dependencies
> though, if you wanna play with that I'd suggest to fetch
> https://www.kraxel.org/cgit/qemu/log/?h=rebase/vga-wip
Ping? mst, had you a chance to look at this?
What are your virtio-1.0 merge plans for qemu, now that the 2.4 tree is
open for development? I'd love to see a quick merge so I can proceed
with bits having dependencies on virtio-1.0.
thanks,
Gerd
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Qemu-devel] [PATCH 0/9] virtio-1.0: cleanups and preparations for virtio-vga
2015-04-27 9:45 ` [Qemu-devel] [PATCH 0/9] virtio-1.0: cleanups and preparations for virtio-vga Gerd Hoffmann
@ 2015-04-27 10:15 ` Michael S. Tsirkin
2015-04-27 10:23 ` Cornelia Huck
2015-04-27 10:44 ` Gerd Hoffmann
0 siblings, 2 replies; 15+ messages in thread
From: Michael S. Tsirkin @ 2015-04-27 10:15 UTC (permalink / raw)
To: Gerd Hoffmann; +Cc: qemu-devel
On Mon, Apr 27, 2015 at 11:45:56AM +0200, Gerd Hoffmann wrote:
> On Fr, 2015-04-10 at 14:31 +0200, Gerd Hoffmann wrote:
> > Hi,
> >
> > Here is a series of patches for virtio-pci, with some cleanups and
> > preparations for virtio-vga.
> >
> > Patches 1-6 clean up the modern (virtio-1.0) memory region
> > initialization a bit. They are preparations for the other patches,
> > but IMHO are also a useful cleanup on their own.
> >
> > Patches 7+8 changes initialization so virtio-vga has a chance to
> > arrange things as it pleases.
> >
> > Patches 1-8 should apply fine on top of mst's virtio-1.0 branch, and
> > I'm looking for reviews of them.
> >
> > Patch 9 is the showcase for patches 7+8. It has more dependencies
> > though, if you wanna play with that I'd suggest to fetch
> > https://www.kraxel.org/cgit/qemu/log/?h=rebase/vga-wip
>
> Ping? mst, had you a chance to look at this?
I'll merge this on the virtio 1 branch shortly.
> What are your virtio-1.0 merge plans for qemu, now that the 2.4 tree is
> open for development? I'd love to see a quick merge so I can proceed
> with bits having dependencies on virtio-1.0.
>
> thanks,
> Gerd
That branch still needs some work.
I hope to have things in mergeable state end of may.
In particular
- the way we have structured breaks migration and
makes supporting it properly tricky, so I'm refactoring
some code.
- virtio 1 spec forbids devices from accessing memory
until DRIVER_OK is set, but we also need to support
legacy guests which trigger ready state by kicking some ring.
Do you need some bits from master on that branch?
I could rebase it if it's helpful.
--
MST
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Qemu-devel] [PATCH 0/9] virtio-1.0: cleanups and preparations for virtio-vga
2015-04-27 10:15 ` Michael S. Tsirkin
@ 2015-04-27 10:23 ` Cornelia Huck
2015-04-27 10:37 ` Michael S. Tsirkin
2015-04-27 10:44 ` Gerd Hoffmann
1 sibling, 1 reply; 15+ messages in thread
From: Cornelia Huck @ 2015-04-27 10:23 UTC (permalink / raw)
To: Michael S. Tsirkin; +Cc: Gerd Hoffmann, qemu-devel
On Mon, 27 Apr 2015 12:15:16 +0200
"Michael S. Tsirkin" <mst@redhat.com> wrote:
> That branch still needs some work.
> I hope to have things in mergeable state end of may.
> In particular
> - the way we have structured breaks migration and
> makes supporting it properly tricky, so I'm refactoring
> some code.
> - virtio 1 spec forbids devices from accessing memory
> until DRIVER_OK is set, but we also need to support
> legacy guests which trigger ready state by kicking some ring.
>
> Do you need some bits from master on that branch?
> I could rebase it if it's helpful.
I'd find it helpful if you could rebase it - I think there was some
stuff still sitting somewhere in one of my branches that I wanted to
follow up on.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Qemu-devel] [PATCH 0/9] virtio-1.0: cleanups and preparations for virtio-vga
2015-04-27 10:23 ` Cornelia Huck
@ 2015-04-27 10:37 ` Michael S. Tsirkin
0 siblings, 0 replies; 15+ messages in thread
From: Michael S. Tsirkin @ 2015-04-27 10:37 UTC (permalink / raw)
To: Cornelia Huck; +Cc: Gerd Hoffmann, qemu-devel
On Mon, Apr 27, 2015 at 12:23:19PM +0200, Cornelia Huck wrote:
> On Mon, 27 Apr 2015 12:15:16 +0200
> "Michael S. Tsirkin" <mst@redhat.com> wrote:
>
> > That branch still needs some work.
> > I hope to have things in mergeable state end of may.
> > In particular
> > - the way we have structured breaks migration and
> > makes supporting it properly tricky, so I'm refactoring
> > some code.
> > - virtio 1 spec forbids devices from accessing memory
> > until DRIVER_OK is set, but we also need to support
> > legacy guests which trigger ready state by kicking some ring.
> >
> > Do you need some bits from master on that branch?
> > I could rebase it if it's helpful.
>
> I'd find it helpful if you could rebase it - I think there was some
> stuff still sitting somewhere in one of my branches that I wanted to
> follow up on.
OK, will do hopefully tomorrow.
--
MST
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Qemu-devel] [PATCH 0/9] virtio-1.0: cleanups and preparations for virtio-vga
2015-04-27 10:15 ` Michael S. Tsirkin
2015-04-27 10:23 ` Cornelia Huck
@ 2015-04-27 10:44 ` Gerd Hoffmann
1 sibling, 0 replies; 15+ messages in thread
From: Gerd Hoffmann @ 2015-04-27 10:44 UTC (permalink / raw)
To: Michael S. Tsirkin; +Cc: qemu-devel
Hi,
> Do you need some bits from master on that branch?
> I could rebase it if it's helpful.
I have already rebased it:
https://www.kraxel.org/cgit/qemu/log/?h=rebase/virtio-wip
FYI: the virtio-gpu bits and virtio patches for virtio-vga are here:
https://www.kraxel.org/cgit/qemu/log/?h=rebase/vga-wip
cheers,
Gerd
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2015-04-27 10:44 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-10 12:31 [Qemu-devel] [PATCH 0/9] virtio-1.0: cleanups and preparations for virtio-vga Gerd Hoffmann
2015-04-10 12:31 ` [Qemu-devel] [PATCH 1/9] virtio: add struct VirtIOPCIRegion for virtio-1 regions Gerd Hoffmann
2015-04-10 12:31 ` [Qemu-devel] [PATCH 2/9] virtio: add virtio_pci_modern_regions_init() Gerd Hoffmann
2015-04-10 12:31 ` [Qemu-devel] [PATCH 3/9] virtio: add virtio_pci_modern_region_map() Gerd Hoffmann
2015-04-10 12:31 ` [Qemu-devel] [PATCH 4/9] virtio: move virtio_pci_add_mem_cap call to virtio_pci_modern_region_map Gerd Hoffmann
2015-04-10 12:31 ` [Qemu-devel] [PATCH 5/9] virtio: move cap type to VirtIOPCIRegion Gerd Hoffmann
2015-04-10 12:31 ` [Qemu-devel] [PATCH 6/9] virtio: drop identical virtio_pci_cap Gerd Hoffmann
2015-04-10 12:31 ` [Qemu-devel] [PATCH 7/9] virtio: move bar assignments to VirtIOPCIProxy Gerd Hoffmann
2015-04-10 12:31 ` [Qemu-devel] [PATCH 8/9] virtio: init from virtio_pci_device_plugged to virtio_pci_realize Gerd Hoffmann
2015-04-10 12:31 ` [Qemu-devel] [PATCH 9/9] virtio-vga: make compatible with stdvga Gerd Hoffmann
2015-04-27 9:45 ` [Qemu-devel] [PATCH 0/9] virtio-1.0: cleanups and preparations for virtio-vga Gerd Hoffmann
2015-04-27 10:15 ` Michael S. Tsirkin
2015-04-27 10:23 ` Cornelia Huck
2015-04-27 10:37 ` Michael S. Tsirkin
2015-04-27 10:44 ` Gerd Hoffmann
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.