#
019a3edb |
| 01-Jun-2015 |
Gerd Hoffmann <kraxel@redhat.com> |
virtio: make features 64bit wide
Make features 64bit wide everywhere.
On migration a full 64bit guest_features field is sent if one of the high bits is set, in addition to the lower 32bit guest_fea
virtio: make features 64bit wide
Make features 64bit wide everywhere.
On migration a full 64bit guest_features field is sent if one of the high bits is set, in addition to the lower 32bit guest_features field which must stay for compatibility reasons. That way we send the lower 32 feature bits twice, but the code is simpler because we don't have to split and compose the 64bit features into two 32bit fields.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
show more ...
|
#
b829c2a9 |
| 29-May-2015 |
Jason Wang <jasowang@redhat.com> |
virtio: increase the queue limit to 1024
Increase the queue limit to 1024. But virtio-ccw and s390-virtio won't support this, this is done through failing device_plugged() for those two transports i
virtio: increase the queue limit to 1024
Increase the queue limit to 1024. But virtio-ccw and s390-virtio won't support this, this is done through failing device_plugged() for those two transports if the number of virtqueues is greater than 64.
Signed-off-by: Jason Wang <jasowang@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
show more ...
|
#
87b3bd1c |
| 29-May-2015 |
Jason Wang <jasowang@redhat.com> |
virtio: rename VIRTIO_PCI_QUEUE_MAX to VIRTIO_QUEUE_MAX
VIRTIO_PCI_QUEUE_MAX is not only used for pci, so rename it be generic.
Cc: Amit Shah <amit.shah@redhat.com> Cc: Paolo Bonzini <pbonzini@redh
virtio: rename VIRTIO_PCI_QUEUE_MAX to VIRTIO_QUEUE_MAX
VIRTIO_PCI_QUEUE_MAX is not only used for pci, so rename it be generic.
Cc: Amit Shah <amit.shah@redhat.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Jason Wang <jasowang@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
show more ...
|
#
8ad176aa |
| 29-May-2015 |
Jason Wang <jasowang@redhat.com> |
virtio: introduce virtio_get_num_queues()
This patch introduces virtio_get_num_queues() which iterates the vqs array and return the number of virtqueues used by device.
Signed-off-by: Jason Wang <j
virtio: introduce virtio_get_num_queues()
This patch introduces virtio_get_num_queues() which iterates the vqs array and return the number of virtqueues used by device.
Signed-off-by: Jason Wang <jasowang@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
show more ...
|
#
cf34f533 |
| 29-May-2015 |
Cornelia Huck <cornelia.huck@de.ibm.com> |
virtio: move VIRTIO_F_NOTIFY_ON_EMPTY into core
Nearly all transports have been offering VIRTIO_F_NOTIFY_ON_EMPTY, s390-virtio being the exception. There's no reason why it shouldn't offer it as wel
virtio: move VIRTIO_F_NOTIFY_ON_EMPTY into core
Nearly all transports have been offering VIRTIO_F_NOTIFY_ON_EMPTY, s390-virtio being the exception. There's no reason why it shouldn't offer it as well, though (handling is done in core anyway), so let's move it to the common virtio features.
While we're changing it anyway, fix the indentation for the DEFINE_VIRTIO_COMMON_FEATURES macro.
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
show more ...
|
#
6b8f1020 |
| 26-May-2015 |
Cornelia Huck <cornelia.huck@de.ibm.com> |
virtio: move host_features
Move host_features from the individual transport proxies into the virtio device. Transports may continue to add feature bits during device plugging.
This should it make e
virtio: move host_features
Move host_features from the individual transport proxies into the virtio device. Transports may continue to add feature bits during device plugging.
This should it make easier to offer different sets of host features for virtio-1/transitional support.
Tested-by: Shannon Zhao <shannon.zhao@linaro.org> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
show more ...
|
#
f73ddbad |
| 14-Mar-2014 |
Gerd Hoffmann <kraxel@redhat.com> |
virtio-input: core code & base class [device]
This patch adds virtio-input support to qemu. It brings a abstract base class providing core support, other classes can build on it to actually impleme
virtio-input: core code & base class [device]
This patch adds virtio-input support to qemu. It brings a abstract base class providing core support, other classes can build on it to actually implement input devices.
virtio-input basically sends linux input layer events (evdev) over virtio.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
show more ...
|
#
850d0070 |
| 27-Apr-2015 |
Michael S. Tsirkin <mst@redhat.com> |
virtio: coding style tweak
no space needed after *.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
|
#
e0d686bf |
| 23-Apr-2015 |
Jason Wang <jasowang@redhat.com> |
virtio: introduce vector to virtqueues mapping
Currently we will try to traverse all virtqueues to find a subset that using a specific vector. This is sub optimal when we will support hundreds or ev
virtio: introduce vector to virtqueues mapping
Currently we will try to traverse all virtqueues to find a subset that using a specific vector. This is sub optimal when we will support hundreds or even thousands of virtqueues. So this patch introduces a method which could be used by transport to get all virtqueues that using a same vector. This is done through QLISTs and the number of QLISTs was queried through a transport specific method. When guest setting vectors, the virtqueue will be linked and helpers for traverse the list was also introduced.
The first user will be virtio pci which will use this to speed up MSI-X masking and unmasking handling.
Cc: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Jason Wang <jasowang@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
show more ...
|
#
ef546f12 |
| 11-Dec-2014 |
Cornelia Huck <cornelia.huck@de.ibm.com> |
virtio: add feature checking helpers
Add a helper function for checking whether a bit is set in the guest features for a vdev as well as one that works on a feature bit set.
Convert code that open-
virtio: add feature checking helpers
Add a helper function for checking whether a bit is set in the guest features for a vdev as well as one that works on a feature bit set.
Convert code that open-coded this: It cleans up the code and makes it easier to extend the guest feature bits.
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
show more ...
|
#
0cd09c3a |
| 11-Dec-2014 |
Cornelia Huck <cornelia.huck@de.ibm.com> |
virtio: feature bit manipulation helpers
Add virtio_{add,clear}_feature helper functions for manipulating a feature bits variable. This has some benefits over open coding: - add check that the bit i
virtio: feature bit manipulation helpers
Add virtio_{add,clear}_feature helper functions for manipulating a feature bits variable. This has some benefits over open coding: - add check that the bit is in a sane range - make it obvious at a glance what is going on - have a central point to change when we want to extend feature bits
Convert existing code manipulating features to use the new helpers.
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
show more ...
|
#
e9600c6c |
| 16-Feb-2015 |
Michael S. Tsirkin <mst@redhat.com> |
virtio: use standard-headers
Drop a bunch of code duplicated from virtio_config.h and virtio_ring.h. This makes us rename event index accessors which conflict, as reusing the ones from virtio_ring.h
virtio: use standard-headers
Drop a bunch of code duplicated from virtio_config.h and virtio_ring.h. This makes us rename event index accessors which conflict, as reusing the ones from virtio_ring.h isn't trivial.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Thomas Huth <thuth@linux.vnet.ibm.com>
show more ...
|
#
7766aa0c |
| 09-Dec-2014 |
Gonglei <arei.gonglei@huawei.com> |
virtio: remove useless declaration of virtio_net_init()
commit 1773d9ee (virtio-net: cleanup: init and exit function) removed the definition of virtio_net_init(), but didn't remove its declaration i
virtio: remove useless declaration of virtio_net_init()
commit 1773d9ee (virtio-net: cleanup: init and exit function) removed the definition of virtio_net_init(), but didn't remove its declaration in the header. Clean that up.
Cc: Markus Armbruster <armbru@redhat.com> Signed-off-by: Gonglei <arei.gonglei@huawei.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
show more ...
|
#
c8075caf |
| 30-Sep-2014 |
Gonglei <arei.gonglei@huawei.com> |
virtio: add a wrapper for virtio-backend initialization
For better code sharing, add a helper function that handles reference counting of the virtio backend for virtio proxy devices.
Cc: Cornelia H
virtio: add a wrapper for virtio-backend initialization
For better code sharing, add a helper function that handles reference counting of the virtio backend for virtio proxy devices.
Cc: Cornelia Huck <cornelia.huck@de.ibm.com> Cc: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Gonglei <arei.gonglei@huawei.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
#
616a6552 |
| 24-Jun-2014 |
Greg Kurz <gkurz@linux.vnet.ibm.com> |
virtio: add endian-ambivalent support to VirtIODevice
Some CPU families can dynamically change their endianness. This means we can have little endian ppc or big endian arm guests for example. This h
virtio: add endian-ambivalent support to VirtIODevice
Some CPU families can dynamically change their endianness. This means we can have little endian ppc or big endian arm guests for example. This has an impact on legacy virtio data structures since they are target endian. We hence introduce a new property to track the endianness of each virtio device. It is reasonnably assumed that endianness won't change while the device is in use : we hence capture the device endianness when it gets reset.
We migrate this property in a subsection, after the device descriptor. This means the load code must not rely on it until it is restored. As a consequence, the vring sanity checks had to be moved after the call to vmstate_load_state(). We enforce paranoia by poisoning the property at the begining of virtio_load().
Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
show more ...
|
#
98ed8ecf |
| 24-Jun-2014 |
Greg Kurz <gkurz@linux.vnet.ibm.com> |
exec: introduce target_words_bigendian() helper
We currently have a virtio_is_big_endian() helper that provides the target endianness to the virtio code. As of today, the helper returns a fixed comp
exec: introduce target_words_bigendian() helper
We currently have a virtio_is_big_endian() helper that provides the target endianness to the virtio code. As of today, the helper returns a fixed compile-time value. Of course, this will have to change if we want to support target endianness changes at run-time.
Let's move the TARGET_WORDS_BIGENDIAN bits out to a new helper and have virtio_is_big_endian() implemented on top of it.
This patch doesn't change any functionality.
Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
show more ...
|
#
1b5fc0de |
| 24-Jun-2014 |
Greg Kurz <gkurz@linux.vnet.ibm.com> |
virtio: introduce device specific migration calls
In order to migrate virtio subsections, they should be streamed after the device itself. We need the device specific code to be called from the comm
virtio: introduce device specific migration calls
In order to migrate virtio subsections, they should be streamed after the device itself. We need the device specific code to be called from the common migration code to achieve this. This patch introduces load and save methods for this purpose.
Suggested-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com> Reviewed-by: Alexander Graf <agraf@suse.de> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
show more ...
|
#
306ec6c3 |
| 30-Jul-2013 |
Andreas Färber <afaerber@suse.de> |
virtio: Convert exit to unrealize
Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
#
0ba94b6f |
| 30-Jul-2013 |
Andreas Färber <afaerber@suse.de> |
virtio: Complete converting VirtioDevice to QOM realize
Drop VirtioDeviceClass::init.
Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
#
1d244b42 |
| 29-Jul-2013 |
Andreas Färber <afaerber@suse.de> |
virtio: Start converting VirtioDevice to QOM realize
Temporarily allow either VirtioDeviceClass::init or VirtioDeviceClass::realize.
Introduce VirtioDeviceClass::unrealize for symmetry.
Signed-off
virtio: Start converting VirtioDevice to QOM realize
Temporarily allow either VirtioDeviceClass::init or VirtioDeviceClass::realize.
Introduce VirtioDeviceClass::unrealize for symmetry.
Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
#
5e96f5d2 |
| 20-Sep-2013 |
Paolo Bonzini <pbonzini@redhat.com> |
virtio-bus: cleanup plug/unplug interface
Right now we have these pairs:
- virtio_bus_plug_device/virtio_bus_destroy_device. The first takes a VirtIODevice, the second takes a VirtioBusState
-
virtio-bus: cleanup plug/unplug interface
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: Andreas Faerber <afaerber@suse.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
#
6793dfd1 |
| 12-Aug-2013 |
Stefan Hajnoczi <stefanha@redhat.com> |
virtio: clear signalled_used_valid when switching from dataplane
When the dataplane thread stops, its vring.c implementation synchronizes vring state back to virtio.c so we can continue emulating th
virtio: clear signalled_used_valid when switching from dataplane
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: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
show more ...
|
#
6ce69d1c |
| 16-Jul-2013 |
Peter Maydell <peter.maydell@linaro.org> |
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: 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.)
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: Peter Maydell <peter.maydell@linaro.org> Message-id: 1373977512-28932-5-git-send-email-peter.maydell@linaro.org
show more ...
|
#
e63c0ba1 |
| 16-Jul-2013 |
Peter Maydell <peter.maydell@linaro.org> |
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
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> Message-id: 1373977512-28932-4-git-send-email-peter.maydell@linaro.org
show more ...
|
#
488f069b |
| 11-Jul-2013 |
Michael S. Tsirkin <mst@redhat.com> |
virtio-net: add feature bit for any header s/g
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 limitat
virtio-net: add feature bit for any header s/g
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: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
show more ...
|