]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[virtio] Support VIRTIO_NET_F_IOMMU_PLATFORM
authorJason Wang <jasowang@redhat.com>
Mon, 10 Jul 2017 09:10:41 +0000 (17:10 +0800)
committerMichael Brown <mcb30@ipxe.org>
Mon, 10 Jul 2017 10:10:45 +0000 (11:10 +0100)
Since we don't enable IOMMU at all, we can then simply enable the
IOMMU support by claiming the support of VIRITO_F_IOMMU_PLATFORM.
This fixes booting failure when iommu_platform is set from qemu cli.

Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/drivers/net/virtio-net.c
src/include/ipxe/virtio-ring.h

index 4151532e686d02799dced454f6a41fde7f013250..fe79a92c4c1b0b916a418eea76a570e4852a6d01 100644 (file)
@@ -259,7 +259,8 @@ static int virtnet_open_modern ( struct net_device *netdev ) {
                ( 1ULL << VIRTIO_NET_F_MAC ) |
                ( 1ULL << VIRTIO_NET_F_MTU ) |
                ( 1ULL << VIRTIO_F_VERSION_1 ) |
-               ( 1ULL << VIRTIO_F_ANY_LAYOUT ) ) );
+               ( 1ULL << VIRTIO_F_ANY_LAYOUT ) |
+               ( 1ULL << VIRTIO_F_IOMMU_PLATFORM ) ) );
        vpm_add_status ( &virtnet->vdev, VIRTIO_CONFIG_S_FEATURES_OK );
 
        status = vpm_get_status ( &virtnet->vdev );
index e608e624fa2650ff632cd6c6adf93cc8afe57faa..852769f290b8ef851b98351cde30134e4b8e8bcf 100644 (file)
@@ -20,6 +20,7 @@
 #define VIRTIO_F_ANY_LAYOUT             27
 /* v1.0 compliant. */
 #define VIRTIO_F_VERSION_1              32
+#define VIRTIO_F_IOMMU_PLATFORM         33
 
 #define MAX_QUEUE_NUM      (256)