aboutsummaryrefslogtreecommitdiff
path: root/hw/virtio
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2015-07-22 13:09:25 +0300
committerMichael S. Tsirkin <mst@redhat.com>2015-07-27 09:08:50 +0300
commit5f456073aa9ba54e421aa82dd38e4d40d0a0af85 (patch)
tree7e0073a414617d32dec948c31d0321d591a113ae /hw/virtio
parentb69b30532e0a80e25449244c01b0cbed000c99a3 (diff)
virtio: hide legacy features from modern guests
NOTIFY_ON_EMPTY, ANY_LAYOUT and BAD are only valid on the legacy interface. Hide them from modern guests. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/virtio')
-rw-r--r--hw/virtio/virtio-pci.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index 283401aa0d..db8f27c100 100644
--- a/hw/virtio/virtio-pci.c
+++ b/hw/virtio/virtio-pci.c
@@ -1095,7 +1095,8 @@ static uint64_t virtio_pci_common_read(void *opaque, hwaddr addr,
break;
case VIRTIO_PCI_COMMON_DF:
if (proxy->dfselect <= 1) {
- val = vdev->host_features >> (32 * proxy->dfselect);
+ val = (vdev->host_features & ~VIRTIO_LEGACY_FEATURES) >>
+ (32 * proxy->dfselect);
}
break;
case VIRTIO_PCI_COMMON_GFSELECT: