mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 16:53:55 -06:00
virtio: add features as qdev properties
Add feature bits as properties to virtio. This makes it possible to e.g. define machine without indirect buffer support, which is required for 0.10 compatibility, or without hardware checksum support, which is required for 0.11 compatibility. Since default values for optional features are now set by qdev, get_features callback has been modified: it sets non-optional bits, and clears bits not supported by host. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
704a76fcd2
commit
8172539d21
12 changed files with 90 additions and 49 deletions
|
@ -51,9 +51,9 @@ static void virtio_console_handle_input(VirtIODevice *vdev, VirtQueue *vq)
|
|||
{
|
||||
}
|
||||
|
||||
static uint32_t virtio_console_get_features(VirtIODevice *vdev)
|
||||
static uint32_t virtio_console_get_features(VirtIODevice *vdev, uint32_t f)
|
||||
{
|
||||
return 0;
|
||||
return f;
|
||||
}
|
||||
|
||||
static int vcon_can_read(void *opaque)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue