[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 4/9] Add S390x virtio machine bus
From: |
Alexander Graf |
Subject: |
Re: [Qemu-devel] [PATCH 4/9] Add S390x virtio machine bus |
Date: |
Mon, 19 Oct 2009 21:40:57 +0200 |
On 19.10.2009, at 21:34, Gerd Hoffmann wrote:
+VirtIOS390Bus *s390_virtio_bus_init(ram_addr_t *ram_size)
+{
+ VirtIOS390Bus *bus;
+
+ bus = (VirtIOS390Bus *)qbus_create(&s390_virtio_bus_info,
NULL, "s390-virtio");
While a cast works the political correct way to do this is using
DO_UPCAST.
Oh - that one's new to me :-)
Also I'd suggest to add a sysbus -> s390-virtio bus bridge device,
so your bus gets properly hooked up in the device tree. Have a look
at the (quite simple) "isabus-bridge" device in isa-bus.c, which is
used with 'qemu -M isapc'. You'll see the s390-virtio bus and all
virtio devices attached to it in 'info qtree' then.
Uh, ok :o. Is that really important?
+ bus = (VirtIOS390Bus *)dev->qdev.parent_bus;
DO_UPCAST().
+VirtIOS390Device *s390_virtio_bus_console(VirtIOS390Bus *bus)
+{
+ return bus->console;
+}
What this is needed for?
We need to know the console to do early printk. I figured it'd be
better to have a function returning it, so we could possibly change
semantics later.
Alex
- [Qemu-devel] [PATCH 2/9] Add KVM support for S390x, (continued)
- [Qemu-devel] [PATCH 2/9] Add KVM support for S390x, Alexander Graf, 2009/10/19
- [Qemu-devel] [PATCH 3/9] Add support for S390x system emulation, Alexander Graf, 2009/10/19
- [Qemu-devel] [PATCH 4/9] Add S390x virtio machine bus, Alexander Graf, 2009/10/19
- [Qemu-devel] [PATCH 5/9] Add S390x virtio machine description, Alexander Graf, 2009/10/19
- [Qemu-devel] [PATCH 6/9] S390 GDB stub, Alexander Graf, 2009/10/19
- [Qemu-devel] [PATCH 7/9] Implement early printk in virtio-console, Alexander Graf, 2009/10/19
- [Qemu-devel] [PATCH 8/9] Set default console to virtio on S390x, Alexander Graf, 2009/10/19
- [Qemu-devel] [PATCH 9/9] Move mp_state to CPU_COMMON, Alexander Graf, 2009/10/19
- Re: [Qemu-devel] [PATCH 8/9] Set default console to virtio on S390x, Gerd Hoffmann, 2009/10/19
- Re: [Qemu-devel] [PATCH 4/9] Add S390x virtio machine bus, Gerd Hoffmann, 2009/10/19
- Re: [Qemu-devel] [PATCH 4/9] Add S390x virtio machine bus,
Alexander Graf <=
- Re: [Qemu-devel] [PATCH 4/9] Add S390x virtio machine bus, Gerd Hoffmann, 2009/10/19
- [Qemu-devel] Re: [PATCH 2/9] Add KVM support for S390x, Carsten Otte, 2009/10/21
- [Qemu-devel] Re: [PATCH 2/9] Add KVM support for S390x, Alexander Graf, 2009/10/20
[Qemu-devel] Re: [PATCH 1/9] Export function for VA defined ram allocation, Carsten Otte, 2009/10/21
Re: [Qemu-devel] [PATCH 0/9] S390x KVM support, Gerd Hoffmann, 2009/10/19
Re: [Qemu-devel] [PATCH 0/9] S390x KVM support, Avi Kivity, 2009/10/20
[Qemu-devel] Re: [PATCH 0/9] S390x KVM support, Carsten Otte, 2009/10/21