- 10 12月, 2013 2 次提交
-
-
由 Andreas Färber 提交于
Temporarily allow either VirtioDeviceClass::init or VirtioDeviceClass::realize. Introduce VirtioDeviceClass::unrealize for symmetry. Signed-off-by: NAndreas Färber <afaerber@suse.de> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
Right now we have these pairs: - virtio_bus_plug_device/virtio_bus_destroy_device. The first takes a VirtIODevice, the second takes a VirtioBusState - device_plugged/device_unplug callbacks in the VirtioBusClass (here it's just the naming that is inconsistent) - virtio_bus_destroy_device is not called by anyone (and since it calls qdev_free, it would be called by the proxies---but then the callback is useless since the proxies can do whatever they want before calling virtio_bus_destroy_device) And there is a k->init but no k->exit, hence virtio_device_exit is overwritten by subclasses (except virtio-9p). This cleans it up by: - renaming the device_unplug callback to device_unplugged - renaming virtio_bus_plug_device to virtio_bus_device_plugged, matching the callback name - renaming virtio_bus_destroy_device to virtio_bus_device_unplugged, removing the qdev_free, making it take a VirtIODevice and calling it from virtio_device_exit - adding a k->exit callback virtio_device_exit is still overwritten, the next patches will fix that. Cc: qemu-stable@nongnu.org Acked-by: NAndreas Faerber <afaerber@suse.de> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 12 8月, 2013 1 次提交
-
-
由 Stefan Hajnoczi 提交于
When the dataplane thread stops, its vring.c implementation synchronizes vring state back to virtio.c so we can continue emulating the virtio device. This patch ensures that virtio.c's signalled_used_valid flag is reset so that we do not suppress guest notifications due to stale signalled_used values. Suggested-by: NKevin Wolf <kwolf@redhat.com> Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
- 19 7月, 2013 2 次提交
-
-
由 Peter Maydell 提交于
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.) Transports which wish to make use of this must set the has_variable_vring_alignment field in their VirtioBusClass struct to true; they can then change the alignment via virtio_queue_set_align(). Signed-off-by: NPeter Maydell <peter.maydell@linaro.org> Message-id: 1373977512-28932-5-git-send-email-peter.maydell@linaro.org
-
由 Peter Maydell 提交于
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: NPeter Maydell <peter.maydell@linaro.org> Message-id: 1373977512-28932-4-git-send-email-peter.maydell@linaro.org
-
- 16 7月, 2013 1 次提交
-
-
由 Michael S. Tsirkin 提交于
Old qemu versions required that 1st s/g entry is the header. Since QEMU 1.5, patchset titled "virtio-net: iovec handling cleanup" removed this limitation but a feature bit is needed so guests know it's safe to lay out header differently. This patch applies on top and adds such a feature bit to QEMU. It is set by default for virtio-net. virtio net header inline with the data is beneficial for latency and small packet bandwidth - guest driver code utilizing this feature has been acked but missed 3.11 by a narrow margin, it's pending for 3.12. This feature bit is cleared by default when compatibility with old machine types is requested. Other performance-sensitive devices (blk and scsi) don't yet support arbitrary s/g layouts, so we only set this bit for virtio-net for now. There are plans to allow arbitrary layouts there, but no code has been posted yet. Cc: Rusty Russell <rusty@rustcorp.com.au> Reviewed-by: NLaszlo Ersek <lersek@redhat.com> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
- 04 5月, 2013 1 次提交
-
-
由 KONRAD Frederic 提交于
Add virtio_device_set_child_bus_name function. It will be used with virtio-serial-x and virtio-scsi-x to set the child bus name before calling virtio-x-device's init. Signed-off-by: NKONRAD Frederic <fred.konrad@greensocs.com> Tested-by: NCornelia Huck <cornelia.huck@de.ibm.com> Message-id: 1367330931-12994-3-git-send-email-fred.konrad@greensocs.com Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 25 4月, 2013 5 次提交
-
-
由 KONRAD Frederic 提交于
This removes the unused prototypes in virtio.h. Signed-off-by: NKONRAD Frederic <fred.konrad@greensocs.com> Message-id: 1366791683-5350-8-git-send-email-fred.konrad@greensocs.com Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 KONRAD Frederic 提交于
This clean the init and the exit functions and rename virtio_common_cleanup to virtio_cleanup. Signed-off-by: NKONRAD Frederic <fred.konrad@greensocs.com> Message-id: 1366791683-5350-7-git-send-email-fred.konrad@greensocs.com Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 KONRAD Frederic 提交于
This remove virtio-bindings, and use class instead. Signed-off-by: NKONRAD Frederic <fred.konrad@greensocs.com> Message-id: 1366791683-5350-6-git-send-email-fred.konrad@greensocs.com Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 KONRAD Frederic 提交于
This remove the function pointer in VirtIODevice, and use only VirtioDeviceClass function pointer. Signed-off-by: NKONRAD Frederic <fred.konrad@greensocs.com> Message-id: 1366791683-5350-5-git-send-email-fred.konrad@greensocs.com Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 KONRAD Frederic 提交于
This remove old init and exit function as they are no longer needed. Signed-off-by: NKONRAD Frederic <fred.konrad@greensocs.com> Tested-by: NCornelia Huck <cornelia.huck@de.ibm.com> Acked-by: NAmit Shah <amit.shah@redhat.com> Message-id: 1366790881-3026-7-git-send-email-fred.konrad@greensocs.com Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 19 4月, 2013 1 次提交
-
-
由 Luiz Capitulino 提交于
They are unused since commit 5c7d0962. Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com> Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
- 17 4月, 2013 1 次提交
-
-
由 KONRAD Frederic 提交于
Recent changes need two functions to VirtioDevice. This just add them into VirtioDeviceClass. Signed-off-by: NKONRAD Frederic <fred.konrad@greensocs.com> Tested-by: NCornelia Huck <cornelia.huck@de.ibm.com> Message-id: 1365690602-22729-2-git-send-email-fred.konrad@greensocs.com Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 09 4月, 2013 1 次提交
-
-
由 Paolo Bonzini 提交于
Many of these should be cleaned up with proper qdev-/QOM-ification. Right now there are many catch-all headers in include/hw/ARCH depending on cpu.h, and this makes it necessary to compile these files per-target. However, fixing this does not belong in these patches. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 19 3月, 2013 1 次提交
-
-
由 KONRAD Frederic 提交于
As all virtio-blk-* are switched to the new API, we can remove the separate init/exit for the old API. Signed-off-by: NKONRAD Frederic <fred.konrad@greensocs.com> Reviewed-by: NPeter Maydell <peter.maydell@linaro.org> Message-id: 1363624648-16906-10-git-send-email-fred.konrad@greensocs.com Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 01 3月, 2013 3 次提交
-
-
由 Paolo Bonzini 提交于
Done with this script: cd hw for i in `find . -name '*.h' | sed 's/^..//'`; do echo '\,^#.*include.*["<]'$i'[">], s,'$i',hw/&,' done | sed -i -f - `find . -type f` This is so that paths remain valid as files are moved. Instead, files in hw/dataplane are referenced with the relative path. We know they are not going to move to include/, and they are the only include files that are in subdirectories _and_ move. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
Also move the 9p.h file to 9pfs/virtio-9p-device.h, for consistency with the corresponding .c file. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 08 2月, 2013 1 次提交
-
-
由 Anthony Liguori 提交于
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 02 2月, 2013 2 次提交
-
-
由 Jason Wang 提交于
Add a queue_index to VirtQueue and a helper to fetch it, this could be used by multiqueue supported device. Signed-off-by: NJason Wang <jasowang@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 Jason Wang 提交于
Some device (such as virtio-net) needs the ability to destroy or re-order the virtqueues, this patch adds a helper to do this. Signed-off-by: Jason Wang <jasowang> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 22 1月, 2013 1 次提交
-
-
由 KONRAD Frederic 提交于
Create the virtio-device which is abstract. All the virtio-device can extend this class. It also add some functions to virtio-bus. Signed-off-by: NKONRAD Frederic <fred.konrad@greensocs.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 08 1月, 2013 2 次提交
-
-
由 Michael S. Tsirkin 提交于
some backends (notably vhost) can mask events at their source in a way that is more efficient than masking through kvm. Specifically - masking in kvm uses rcu write side so it has high latency - in kvm on unmask we always send an interrupt masking at source does not have these issues. Add such support in virtio.h and use in virtio-pci. Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
由 Michael S. Tsirkin 提交于
Pass nvqs to set_guest_notifiers. This makes it possible to save on irqfds by not allocating one for the control vq for virtio-net. Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
- 20 12月, 2012 1 次提交
-
-
由 Michael S. Tsirkin 提交于
Move bindings from opaque to DeviceState. This gives us better type safety with no performance cost. Add macros to make future QOM work easier. Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
- 19 12月, 2012 3 次提交
-
-
由 Paolo Bonzini 提交于
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
Move public headers to include/net, and leave private headers in net/. Put the virtio headers in include/net/tap.h, removing the multiple copies that existed. Leave include/net/tap.h as the interface for NICs, and net/tap_int.h as the interface for OS-specific parts of the tap backend. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 30 11月, 2012 1 次提交
-
-
由 Michael S. Tsirkin 提交于
Commit 0d8d7690 introduced a regression in virtio-net performance because it looks into the ring aggressively while we really only care about a single packet worth of buffers. Reported as bugzilla 1066055 in launchpad. To fix, add parameters limiting lookahead, and use in virtqueue_avail_bytes. Signed-off-by: NMichael S. Tsirkin <mst@redhat.com> Reported-by: NEdivaldo de Araujo Pereira <edivaldoapereira@yahoo.com.br> Tested-by: NEdivaldo de Araujo Pereira <edivaldoapereira@yahoo.com.br> Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 16 11月, 2012 1 次提交
-
-
由 Amit Shah 提交于
The Linux kernel already has a virtio-rng driver, this is the device implementation. When the guest asks for entropy from the virtio hwrng, it puts a buffer in the vq. We then put entropy into that buffer, and push it back to the guest. Signed-off-by: NAmit Shah <amit.shah@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com> --- aliguori: converted to new RngBackend interface aliguori: remove entropy needed event aliguori: fix migration
-
- 23 10月, 2012 1 次提交
-
-
由 Avi Kivity 提交于
target_phys_addr_t is unwieldly, violates the C standard (_t suffixes are reserved) and its purpose doesn't match the name (most target_phys_addr_t addresses are not target specific). Replace it with a finger-friendly, standards conformant hwaddr. Outstanding patchsets can be fixed up with the command git rebase -i --exec 'find -name "*.[ch]" | xargs s/target_phys_addr_t/hwaddr/g' origin Signed-off-by: NAvi Kivity <avi@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 28 9月, 2012 1 次提交
-
-
由 Amit Shah 提交于
The current virtqueue_avail_bytes() is oddly named, and checks if a particular number of bytes are available in a vq. A better API is to fetch the number of bytes available in the vq, and let the caller do what's interesting with the numbers. Introduce virtqueue_get_avail_bytes(), which returns the number of bytes for buffers marked for both, in as well as out. virtqueue_avail_bytes() is made a wrapper over this new function. Signed-off-by: NAmit Shah <amit.shah@redhat.com> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
- 07 8月, 2012 1 次提交
-
-
由 Paolo Bonzini 提交于
Commit b1f416aa breaks vhost_net because it always registers the virtio_pci_host_notifier_read() handler function on the ioeventfd, even when vhost_net.ko is using the ioeventfd. The result is both QEMU and vhost_net.ko polling on the same eventfd and the virtio_net.ko guest driver seeing inconsistent results: # ifconfig eth0 192.168.0.1 netmask 255.255.255.0 virtio_net virtio0: output:id 0 is not a head! To fix this, proceed the same as we do for irqfd: add a parameter to virtio_queue_set_host_notifier_fd_handler and in that case only set the notifier, not the handler. Cc: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Tested-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com> Reviewed-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 17 7月, 2012 1 次提交
-
-
由 Markus Armbruster 提交于
This stuff doesn't belong to block layer, and was put there only because a better home didn't exist then. Now it does. Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
- 12 7月, 2012 2 次提交
-
-
由 Paolo Bonzini 提交于
All transports can use the same event handler for the irqfd, though the exact mechanics of the assignment will be specific. Note that there are three states: handled by the kernel, handled in userspace, disabled. This also lets virtio use event_notifier_set_handler. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NAvi Kivity <avi@redhat.com>
-
由 Paolo Bonzini 提交于
All transports can use the same event handler for the ioeventfd, though the exact setup (address/memory region) will be specific. This lets virtio use event_notifier_set_handler. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NAvi Kivity <avi@redhat.com>
-
- 22 5月, 2012 1 次提交
-
-
由 Paolo Bonzini 提交于
We will have to add another field to the virtio-blk configuration in the next patch. Avoid a proliferation of arguments to virtio_blk_init. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 19 4月, 2012 1 次提交
-
-
由 Paolo Bonzini 提交于
Serializing virtio-scsi requests needs a simple way to get from a VirtQueue to the number of the queue. The virtio_queue_get_id provides this. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 22 2月, 2012 1 次提交
-
-
由 Stefan Hajnoczi 提交于
Add a useless virtio SCSI HBA device: qemu -device virtio-scsi-pci Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com> Reviewed-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-