memory: make section size a 128-bit integer
So far, the size of all regions passed to listeners could fit in 64 bits,because artificial regions (containers and aliases) are eliminated bythe memory core, leaving only device regions which have reasonable sizes...
virtio-rng: Fix crash with non-default backend
'default_backend' isn't always set, but 'rng' is, so use that.
$ ./x86_64-softmmu/qemu-system-x86_64 -object rng-random,id=rng0,filename=/dev/random -device virtio-rng-pci,rng=rng0Segmentation fault (core dumped)...
qdev: fix get_fw_dev_path to support to add nothing to fw_dev_path
Recent virtio refactoring in QEMU made virtio-bus become the parent busof scsi-bus, and virtio-bus doesn't have get_fw_dev_path implementation,typename will be added to fw_dev_path by default, the new fw_dev_path...
virtio-pci: drop unused wmb macro
The implementation is wrong for kvm, and it's unused anyway.Drop it.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>Message-id: 20130528102023.GA30055@redhat.comSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
virtio: add virtio_bus_get_dev_path.
This adds virtio_bus_get_dev_path to fix migration id string which is wrongsince the virtio refactoring.
Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>Message-id: 1368723967-21050-1-git-send-email-fred.konrad@greensocs.com...
virtio-net-x: forward the netclient name and type.
This forwards the name and the type of virtio-net-x to fix the badbehaviour of "info network" command.
Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>Message-id: 1368619970-23892-3-git-send-email-fred.konrad@greensocs.com...
virtio-pci: fix level interrupts
mask notifiers are never called without msix,so devices with backend masking like vhost don't work.Call mask notifiers explicitly atstartup/cleanup to make it work.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>Tested-by: Alexander Graf <agraf@suse.de>...
virtio: properly validate address before accessing config
There are several several issues in the current checking:
- The check was based on the minus of unsigned values which can overflow- It was done after .{set|get}_config() which can lead crash when config_len...
virtio: add virtio_device_set_child_bus_name.
Add virtio_device_set_child_bus_name function.
It will be used with virtio-serial-x and virtio-scsi-x to set thechild bus name before calling virtio-x-device's init.
Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>...
virtio-serial: fix command line compatibility.
The bus name is wrong since the refactoring.
This keeps the behaviour of the command line.
Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com>Message-id: 1367330931-12994-5-git-send-email-fred.konrad@greensocs.com...
virtio-scsi: fix the command line compatibility.
Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com>Message-id: 1367330931-12994-6-git-send-email-fred.konrad@greensocs.com...
virtio-x-bus: force bus name to virtio-bus.
When the proxy id is set, this bus takes the name "id.0" which is expectedto be the virtio-device's first bus.
So force this name to "virtio-bus" as it is an internal bus.
virtio: cleanup: init and exit function.
This clean the init and the exit functions and rename virtio_common_cleanupto virtio_cleanup.
Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>Message-id: 1366791683-5350-7-git-send-email-fred.konrad@greensocs.com...
virtio-rng: cleanup: use QOM casts.
As the virtio-rng-pci, virtio-rng-s390 and virtio-rng-ccw areswitched to the new API, we can use QOM casts.
Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>Reviewed-by: Andreas Färber <afaerber@suse.de>Reviewed-by: Andreas Färber <afaerber@suse.de>...
virtio-bus: add new functions.
This add two functions: * virtio_bus_set_vdev_config. * virtio_bus_set_vdev_feature.
Needed by virtio-ccw.
Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>Message-id: 1366791683-5350-2-git-send-email-fred.konrad@greensocs.com...
virtio-bus: make virtio_x_bus_new static.
virtio_x_bus_new are only used in file scope.So this make them static.
Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>Message-id: 1366791683-5350-3-git-send-email-fred.konrad@greensocs.comSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
virtio-pci: cleanup.
This remove the init, exit functions as they are no longer used.
Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>Message-id: 1366791683-5350-4-git-send-email-fred.konrad@greensocs.comSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
virtio: remove the function pointer.
This remove the function pointer in VirtIODevice, and use onlyVirtioDeviceClass function pointer.
Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>Message-id: 1366791683-5350-5-git-send-email-fred.konrad@greensocs.com...
virtio: remove virtiobindings.
This remove virtio-bindings, and use class instead.
Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>Message-id: 1366791683-5350-6-git-send-email-fred.konrad@greensocs.comSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
virtio-rng: don't use pointer for configuration.
The configuration field must not be a pointer as it will be used forvirtio-rng properties. So *conf is replaced by conf.
Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com>...
virtio-rng: add virtio-rng device.
Create virtio-rng-device which extends virtio-device, so it can be connected onvirtio-bus.
Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com>Acked-by: Amit Shah <amit.shah@redhat.com>...
virtio-rng-pci: switch to the new API.
Here the virtio-rng-pci is modified for the new API. The devicevirtio-rng-pci extends virtio-pci. It creates and connects a virtio-rng-deviceduring the init. The properties are not changed.
The virtio_pci_reset function, is removed as no longer used....
virtio-rng: cleanup: init and exit functions.
This remove old init and exit function as they are no longer needed.
virtio-rng: cleanup: remove qdev field.
The qdev field is no longer needed, just drop it.
Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com>Acked-by: Amit Shah <amit.shah@redhat.com>Message-id: 1366790881-3026-8-git-send-email-fred.konrad@greensocs.com...
virtio-9p: add the virtio-9p device.
Create virtio-9p-device which extends virtio-device, so it can be connected onvirtio-bus.
Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>Message-id: 1366708123-19626-2-git-send-email-fred.konrad@greensocs.com...
virtio-9p-pci: switch to the new API.
Here the virtio-9p-pci is modified for the new API. The devicevirtio-9p-pci extends virtio-pci. It creates and connects avirtio-9p-device during the init. The properties are not changed.
Merge remote-tracking branch 'bonzini/scsi-next' into staging
vhost-scsi-pci: new device supporting the tcm_vhost Linux kernel module
Cc: Michael S. Tsirkin <mst@redhat.com>Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>Signed-off-by: Asias He <asias@redhat.com>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
virtio: simplify Makefile conditionals
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
virtio-scsi: create VirtIOSCSICommon
This patch refactors existing virtio-scsi code into VirtIOSCSICommonin order to allow virtio_scsi_init_common() to be used by both internalvirtio_scsi_init() and external vhost-scsi-pci code.
Cc: Michael S. Tsirkin <mst@redhat.com>...
virtio-balloon: fix integer overflow in BALLOON_CHANGE QMP event
Because dev->actual is uint32_t, the expression 'dev->actual <<VIRTIO_BALLOON_PFN_SHIFT' is truncated to 32 bits. This overflows whendev->actual >= 1048576.
To reproduce:
1. Start a VM with a QMP socket and 5G of RAM...
vhost: Add vhost_commit callback for SeaBIOS ROM region re-mapping
This patch follows MST's recommendation to move checks forvhost_verify_ring_mappings() > cpu_physical_memory_map() operationsfrom MemoryListener>region_[add,del]() -> vhost_set_memory() into...
virtio-net-pci: switch to the new API.
Here the virtio-net-pci is modified for the new API. The devicevirtio-net-pci extends virtio-pci. It creates and connects avirtio-net-device during the init. The properties are not changed.
virtio-net: add the virtio-net device.
Create virtio-net-device which extends virtio-device, so it can be connected onvirtio-bus.
Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com>Message-id: 1365690602-22729-3-git-send-email-fred.konrad@greensocs.com...
virtio-balloon: fix dynamic properties.
To keep compatibility with the old virtio-balloon-x, add the dynamic propertiesto virtio-balloon-pci and virtio-balloon-ccw.
Cc: Luiz Capitulino <lcapitulino@redhat.com>Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>...
Merge remote-tracking branch 'bonzini/hw-dirs' into staging
sysemu: avoid proliferation of include/ subdirectories
virtio-serial: add the virtio-serial device.
Create virtio-serial which extends virtio-device, so it can be connectedon virtio-bus.
Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>Reviewed-by: Peter Maydell <peter.maydell@linaro.org>...
virtio-serial-pci: switch to the new API.
Here the virtio-serial-pci is modified for the new API. The devicevirtio-serial-pci extends virtio-pci. It creates and connects avirtio-serial during the init. The properties are not changed.
hw: move private headers to hw/ subdirectories.
Many headers are used only in a single directory. These can bekept in hw/.
hw: move target-independent files to subdirectories
This patch tackles all files that are compiled once, movingthem to subdirectories of hw/.
hw: move virtio devices to hw/ subdirectories
hw: make subdirectories for devices
Prepare the new directory structure.