[Qemu-devel] [PATCH 4/9] Add S390x virtio machine bus

2009-10-21 Thread Alexander Graf
On S390x we don't want to go through the hassle of emulating real existing hardware, because we don't need to for running Linux. So let's instead implement a machine that is 100% based on VirtIO which we fortunately implement already. This patch implements the bus that is the groundwork for such

[Qemu-devel] [PATCH 4/9] Add S390x virtio machine bus

2009-10-21 Thread Alexander Graf
On S390x we don't want to go through the hassle of emulating real existing hardware, because we don't need to for running Linux. So let's instead implement a machine that is 100% based on VirtIO which we fortunately implement already. This patch implements the bus that is the groundwork for such

Re: [Qemu-devel] [PATCH 4/9] Add S390x virtio machine bus

2009-10-19 Thread Gerd Hoffmann
Hi, 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 attach

Re: [Qemu-devel] [PATCH 4/9] Add S390x virtio machine bus

2009-10-19 Thread Alexander Graf
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_U

Re: [Qemu-devel] [PATCH 4/9] Add S390x virtio machine bus

2009-10-19 Thread Gerd Hoffmann
+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. Also I'd suggest to add a sysbus -> s390-vir

[Qemu-devel] [PATCH 4/9] Add S390x virtio machine bus

2009-10-19 Thread Alexander Graf
On S390x we don't want to go through the hassle of emulating real existing hardware, because we don't need to for running Linux. So let's instead implement a machine that is 100% based on VirtIO which we fortunately implement already. This patch implements the bus that is the groundwork for such