virtio-mmio: Pass size to virtio_mmio_bus_new()
To be passed to qbus_create_initialize(). Reviewed-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
parent
1bf4d7aad6
commit
e5f720391e
@ -89,7 +89,8 @@ typedef struct {
|
|||||||
VirtioBusState bus;
|
VirtioBusState bus;
|
||||||
} VirtIOMMIOProxy;
|
} VirtIOMMIOProxy;
|
||||||
|
|
||||||
static void virtio_mmio_bus_new(VirtioBusState *bus, VirtIOMMIOProxy *dev);
|
static void virtio_mmio_bus_new(VirtioBusState *bus, size_t bus_size,
|
||||||
|
VirtIOMMIOProxy *dev);
|
||||||
|
|
||||||
static uint64_t virtio_mmio_read(void *opaque, hwaddr offset, unsigned size)
|
static uint64_t virtio_mmio_read(void *opaque, hwaddr offset, unsigned size)
|
||||||
{
|
{
|
||||||
@ -360,7 +361,7 @@ static void virtio_mmio_realizefn(DeviceState *d, Error **errp)
|
|||||||
VirtIOMMIOProxy *proxy = VIRTIO_MMIO(d);
|
VirtIOMMIOProxy *proxy = VIRTIO_MMIO(d);
|
||||||
SysBusDevice *sbd = SYS_BUS_DEVICE(d);
|
SysBusDevice *sbd = SYS_BUS_DEVICE(d);
|
||||||
|
|
||||||
virtio_mmio_bus_new(&proxy->bus, proxy);
|
virtio_mmio_bus_new(&proxy->bus, sizeof(proxy->bus), proxy);
|
||||||
sysbus_init_irq(sbd, &proxy->irq);
|
sysbus_init_irq(sbd, &proxy->irq);
|
||||||
memory_region_init_io(&proxy->iomem, OBJECT(d), &virtio_mem_ops, proxy,
|
memory_region_init_io(&proxy->iomem, OBJECT(d), &virtio_mem_ops, proxy,
|
||||||
TYPE_VIRTIO_MMIO, 0x200);
|
TYPE_VIRTIO_MMIO, 0x200);
|
||||||
@ -385,7 +386,8 @@ static const TypeInfo virtio_mmio_info = {
|
|||||||
|
|
||||||
/* virtio-mmio-bus. */
|
/* virtio-mmio-bus. */
|
||||||
|
|
||||||
static void virtio_mmio_bus_new(VirtioBusState *bus, VirtIOMMIOProxy *dev)
|
static void virtio_mmio_bus_new(VirtioBusState *bus, size_t bus_size,
|
||||||
|
VirtIOMMIOProxy *dev)
|
||||||
{
|
{
|
||||||
DeviceState *qdev = DEVICE(dev);
|
DeviceState *qdev = DEVICE(dev);
|
||||||
BusState *qbus;
|
BusState *qbus;
|
||||||
|
Loading…
Reference in New Issue
Block a user