History | View | Annotate | Download (22.9 kB)
Remove unused sysemu.h include directives
Remove unused sysemu.h include directives to speed up buildwith the following patches.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
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.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
virtio: fix up VQ checks
When migration triggers before a VQ is initialized,base pa is 0 and last_used_index must be 0 too:we don't have a ring to compare to.
Reported-by: Juan Quintela <quintela@redhat.com>Tested-by: Juan Quintela <quintela@redhat.com>...
virtio: Convert fprintf() to error_report()
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>(cherry picked from commit cd92f4cc22fbe12a7bf60c9430731f768dc1537c)
virtio: sanity-check available index
Checking available index upon load instead ofonly when vm is running makes is easier todebug failures.
virtio: invoke set_status callback on reset
As status is set to 0 on reset, invoke the relevant callback. This makesfor a cleaner code in devices as they don't need to duplicate the codein their reset routine, as well as excercises this path a little more....
trace: Trace virtqueue operations
This patch adds trace events for virtqueue operations includingadding/removing buffers, notifying the guest, and receiving a notifyfrom the guest.
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
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: invoke set_features on load
After migration, vhost was not getting featuresacked because set_features callback was never invoked.The fix is just to invoke that callback.
Reported-by: David L Stevens <dlstevens@us.ibm.com>Signed-off-by: Michael S. Tsirkin <mst@redhat.com>...
win32: Fix compiler errors from u_int64_t
u_int64_t raises compiler error messages:
CC libhw32/virtio.o/qemu/ar7/hw/virtio.c: In function ‘virtio_queue_get_avail_size’:/qemu/ar7/hw/virtio.c:776: error: ‘u_int64_t’ undeclared (first use in this function)...
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: 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: rename features -> guest_features
Rename features->guest_features. This iswhat they are, avoid confusion withhost features which we also need to keep around.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
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....
qemu/virtio: make wmb compiler barrier + comments
wmb must be at least a compiler barrier, even without SMP.Further, we likely need some rmb()/mb() as well:I have not audited the code but lguest has mb(),add a comment for now.
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>
qemu: init all queues to NO_VECTOR value
initialize vectors for all vqs to VIRTIO_NO_VECTOR rather than 0 whichis a valid vector. This fixes migration which happened before driverwas loaded.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>Reported-by: Amit Shah <amit.shah@redhat.com>...
qemu: remove control vector save
control vector is saved/restored by virtio-pci,it does not belong in virtio.
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: make vring_desc_*() take phys addrs
Change the vring descriptor helpers to take the physicaladdress of the descriptor table rather than a virtqueue.
This is needed in order to allow these helpers to be usedwith an indirect descriptor table.
Signed-off-by: Mark McLoughlin <markmc@redhat.com>...
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...
Introduce reset notifier order
Add the parameter 'order' to qemu_register_reset and sort callbacks onregistration. On system reset, callbacks with lower order will beinvoked before those with higher order. Update all existing users to thestandard order 0....
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
use PCI_HEADER_TYPE.
use symbolic value instead of 0x0e and related value.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
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....
Use the DMA api to map virtio elements.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6904 c046a42c-6fe2-441c-8c8c-71466251a162
virtio: Allow guest to defer VIRTIO_F_NOTIFY_ON_EMPTY (Alex Williamson)
There may be cases where the guest does not want the avail queueinterrupt, even when it's empty. For the virtio-net case, theguest may use a different buffering scheme or decide polling for...
hw: remove error handling from qemu_malloc() callers (Avi Kivity)
Signed-off-by: Avi Kivity <avi@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6529 c046a42c-6fe2-441c-8c8c-71466251a162
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...
Don't notify virtio devices before S_DRIVER_OK (Mark McLoughlin)
Current Linux guests oops if the host notifies of aconfig change before a driver has been bound to thedevice.
It's pretty pointless for us to do notify of configchanges before status is S_DRIVER_OK anyway, so let's...
Define PCI vendor and device IDs in pci.h (Stuart Brady)
This patch defines PCI vendor and device IDs in pci.h (matching thosefrom Linux's pci_ids.h), and uses those definitions where appropriate.
Change from v1: Introduces pci_config_set_vendor_id() / pci_config_set_device_id()...
Rename fls to qemu_fls
Fix compiler warning on OSX, reported by Andreas Faerber.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5982 c046a42c-6fe2-441c-8c8c-71466251a162
Fix some new warnings introduced after r5022
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5933 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>...