History | View | Annotate | Download (8.6 kB)
trace: add virtio_set_status() trace event
The virtio device lifecycle can be observed by looking at the sequenceof set status operations. This is especially important for catching thereset operation (status value 0), which resets the device and allvirtqueues....
block: Move BlockConf & friends from block_int.h to block.h
It's convenience stuff for block device models, so block.h isn't theideal home either, but better than block_int.h.
Permits moving some #include "block_int.h" from device model .h into.c.
Signed-off-by: Markus Armbruster <armbru@redhat.com>...
virtio-balloon: Add exit handler, fix memleaks
Add an exit handler that will free up RAM after a virtio-balloon deviceis unplugged.
Signed-off-by: Amit Shah <amit.shah@redhat.com>Reviewed-by: Markus Armbruster <armbru@redhat.com>Acked-by: Michael S. Tsirkin <mst@redhat.com>
virtio-blk: Turn drive serial into a qdev property
It needs to be a qdev property, because it belongs to the drive'sguest part. Precedence: commit a0fef654 and 6ced55a5.
Bonus: info qtree now shows the serial number.
virtio: event index support
Add support for event_idx feature, and utilize it toreduce the number of interrupts and exits for the guest.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
virtio-pci: fix bus master work around on load
Commit c81131db15dd1844d0db1d51f3cd7a105cfd2cf3detects old guests by comparing virtio andPCI status. It attempts to do this on load,as well, but load_config callback in a bindingis invoked too early and so the virtio status...
virtio-serial: Use a struct to pass config information from proxy
Instead of using a single variable to pass to the virtio_serial_initfunction, use a struct so that expanding the number of variables to bepassed on later is easier.
Signed-off-by: Amit Shah <amit.shah@redhat.com>
vhost: force vhost off for non-MSI guests
When MSI is off, each interrupt needs to be bounced through the iothread when it's set/cleared, so vhost-net causes more context switches andhigher CPU utilization than userspace virtio which handles networking in...
virtio-pci: Use ioeventfd for virtqueue notify
Virtqueue notify is currently handled synchronously in userspace virtio. Thisprevents the vcpu from executing guest code while hardware emulation codehandles the notify.
On systems that support KVM, the ioeventfd mechanism can be used to make...
virtio: move vmstate change tracking to core
Move tracking vmstate change from virtio-net to virtio.cas it is going to be used by virito-blk and virtio-pcifor the ioeventfd support.
virtio: change set guest notifier to per-device
When using irqfd with vhost-net to inject interrupts,a single evenfd might inject multiple interrupts.Implementing this is much easier with a singleper-device callback to set guest notifiers.
Merge remote branch 'kwolf/for-anthony' into staging
virtio-net: Make tx_timer timeout configurable
Add an option to make the TX mitigation timer adjustable as a deviceoption. The 150us hard coded default used currently is reasonable,but may not be suitable for all workloads, this gives us a way toadjust it using a single binary. We can't support any random option...
virtio: Factor virtqueue_map_sg out
Separate the mapping of requests to host memory from the descriptor iteration.The next patch will make use of it in a different context.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
virtio-serial: Cleanup on device hot-unplug
Free malloc'ed memory, unregister from savevm and clean up virtio-commonbits on device hot-unplug.
This was found performing a migration after device hot-unplug.
Reported-by: <lihuang@redhat.com>Signed-off-by: Amit Shah <amit.shah@redhat.com>...
virtio-blk: Create exit function to unregister savevm
Otherwise we can't migrate after we've removed a virtio block device.
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
virtio-9p: Add a virtio 9p device to qemu
This patch doesn't implement the 9p protocol handlingcode. It adds a simple device which dump the protocol data.
[jvrao@linux.vnet.ibm.com: Little-Endian to host format conversion][aneesh.kumar@linux.vnet.ibm.com: Multiple-mounts support]...
virtio: notifier support + APIs for queue fields
vhost needs physical addresses for ring and other queue fields,so add APIs for these. In particular, add binding API to sethost/guest notifiers. Will be used by vhost.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>...
virtio: add set_status callback
vhost net backend needs to be notified whenfrontend status changes. Add a callback,similar to set_features.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
virtio: move typedef to qemu-common
make it possible to use type without header include,simplifying header dependencies.
block: add topology qdev properties
Add three new qdev properties to export block topology information tothe guest. This is needed to get optimal I/O alignment for RAID arraysor SSDs.
The options are:
- physical_block_size to specify the physical block size of the device,...
virtio: Remove duplicate macro definition for max. virtqueues, bump up the max
VIRTIO_PCI_QUEUE_MAX is redefined in hw/virtio.c. Let's just keep it inhw/virtio.h.
Also, bump up the value of the maximum allowed virtqueues to 64. This isin preparation to allow multiple ports per virtio-console device....
virtio-console: qdev conversion, new virtio-serial-bus
This commit converts the virtio-console device to create a newvirtio-serial bus that can host console and generic serial ports. Thefile hosting this code is now called virtio-serial-bus.c.
The virtio console is now a very simple qdev device that sits on the...
virtio: rename features -> guest_features
Rename features->guest_features. This iswhat they are, avoid confusion withhost features which we also need to keep around.
virtio: add features as qdev properties
Add feature bits as properties to virtio. This makes it possible to e.g. definemachine without indirect buffer support, which is required for 0.10compatibility, or without hardware checksum support, which is required for 0.11...
virtio: verify features on load
migrating between hosts which have different featuresmight break silently, if the migration destinationdoes not support some features supported by source.
Prevent this from happening by comparing acked featurebits with the mask supported by the device....
virtio: use qdev properties for configuration.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Revert "Get rid of _t suffix"
In the very least, a change like this requires discussion on the list.
The naming convention is goofy and it causes a massive merge problem. Somethinglike this must be presented on the list first so people can provide input...
Get rid of _t suffix
Some not so obvious bits, slirp and Xen were left alone for the timebeing.
Signed-off-by: malc <av1474@comtv.ru>
Suppress some variants of English in comments
Replace surpress, supress by suppress.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
qdev-ify virtio-blk.
First user of the new drive property. With this patch applied hostand guest config can be specified separately, like this:
-drive if=none,id=disk1,file=/path/to/disk.img -device virtio-blk-pci,drive=disk1
You can set any property for virtio-blk-pci now. You can set the pci...
qemu/virtio: virtio save/load bindings
Implement bindings for virtio save/load. Use them in virtio pci.
qemu/virtio: virtio support for many interrupt vectors
Extend virtio to support many interrupt vectors, and rearrange code inpreparation for multi-vector support (mostly move reset out to bindings,because we will have to reset the vectors in transport-specific code)....
virtio: add support for indirect ring entries
Support a new feature flag for indirect ring entries. These are ringentries which point to a table of buffer descriptors.
The idea here is to increase the ring capacity by allowing a largereffective ring size whereby the ring size dictates the number of...
Separate virtio PCI code
Split the PCI host bindings from the VRing transport implementation.
Signed-off-by: Paul Brook <paul@codesourcery.com>
Virtio-net qdev conversion
Introduce VLANClientState::cleanup() (Mark McLoughlin)
We're currently leaking memory and file descriptors on devicehot-unplug.
Signed-off-by: Mark McLoughlin <markmc@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7150 c046a42c-6fe2-441c-8c8c-71466251a162
Fix oops on 2.6.25 guest (Rusty Russell)
I believe this is behind the following:https://bugs.edge.launchpad.net/ubuntu/jaunty/+source/linux/+bug/331128
virtio_pci in 2.6.25 didn't do feature negotiation correctly: it acked everybit. Fortunately, we can detect this....
Add and use #defines for PCI device classes
This patch adds and uses #defines for PCI device classes and subclases,using a new pci_config_set_class() function, similar to the recentlyadded pci_config_set_vendor_id() and pci_config_set_device_id().
Change since v1: fixed compilation of hw/sun4u.c...
Make struct iovec universally available
Vectored IO APIs will require some sort of vector argument. It makes sense touse struct iovec and just define it globally for Windows.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5889 c046a42c-6fe2-441c-8c8c-71466251a162
Fix windows build after virtio changes
Windows does not have sys/uio.h and does not have err.h.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5877 c046a42c-6fe2-441c-8c8c-71466251a162
Remove TARGET_PAGE_SIZE from virtio interface (Hollis Blanchard)
TARGET_PAGE_SIZE should only be used internal to qemu, not in guest/hostinterfaces. The virtio frontend code in Linux uses two constants (PFN shiftand vring alignment) for the interface, so update qemu to match....
Virtio core support
This patch adds core support for VirtIO. VirtIO is a paravirtualizationframework that has been in Linux since 2.6.21. A PCI transport has beenavailable since 2.6.25. Network drivers are also available for Windows.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>...