virtio: Add support for guest setting of queue size

The MMIO virtio transport spec allows the guest to tell the host how
large the queue size is. Add virtio_queue_set_num() function which
implements this in the QEMU common virtio support code.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com>
virtio: Support transports which can specify the vring alignment

Support virtio transports which can specify the vring alignment
(ie where the guest communicates this to the host) by providing
a new virtio_queue_set_align() function. (The default alignment
remains as before.)

FIXME save/load support for this new field!

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com>
Virtio: Add transport bindings.

Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com>
hw/qdev-properties.c: Add "transport" property.

Virtio back-end devices can be plugged into both transports:
VIRTIO_PCI and VIRTIO_MMIO. In order to choose the desired
transport we have a property "transport" in every back-end
state struct. By specifying -device virtio-blk-pci user chooses
VIRTIO_PCI transport and "transport" property is set automatically.
But in order to provide full control to user we need to have
"transport" property available to be set through command line:

-device virtio-pci,id=virtio-pci.0
-device virtio-blk,transport=virtio-pci.0,...

Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com>
hw/pci.c: Make pci_add_option_rom global visible

We need to use this function to load rom for virtio-net backend.

Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com>
Add MMIO based virtio transport

Add support for the generic MMIO based virtio transport.

This patch is a modyfied patch of
Peter Maydell <peter.maydell@linaro.org>. Changes are to have
virtio-mmio bridge device which provides virtio-mmio bus. To this bus
virtio-mmio-transport device is connected and in turn provides
virtio-transport bus. Then virtio backends could be connected to this
bus.

Also this patch includes some fixes for bugs spotted by
Ying-Shiuan Pan <yspan@itri.org.tw>.

Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com>

Conflicts:

	Makefile.objs
hw/virtio-serial-bus.c: Add virtio-serial device.

Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com>
hw/virtio-balloon.c: Add virtio-balloon device.

Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com>
hw/virtio-net.c: Add virtio-net device.

Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com>
hw/virtio-blk.c: Add virtio-blk device.

Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com>
hw/virtio-pci-new.c: Add VirtIOPCI device.

This commit adds VirtIOPCI device implementation which is temporary
held in virtio-pci-new.c file. We need this file until virtio-xxx-pci
devices in hw/virtio-pci.c are not implemented in the way that they
just create virtio-pci and virtio-xxx devices during initialization.

Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com>
hw/virtio-pci-new.c : little fix
hw/vexpress.c : ethernet replaced by virt-mmio
arm: vexpress: add some more virtio-mmio devices

We want to use networking, block devices, and the console at the same
time, at least.

Signed-off-by: Christoffer Dall <c.dall@virtualopensystems.com>
don't hang on shutdown

Signed-off-by: Christoffer Dall <cdall@cs.columbia.edu>