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>
This commit is contained in:
Michael S. Tsirkin 2015-07-22 13:09:25 +03:00
parent b69b30532e
commit 5f456073aa
2 changed files with 6 additions and 1 deletions

View file

@ -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: