[ipxe-devel] [PATCH] virtio-net: support VIRTIO_NET_F_IOMMU_PLATFORM
Jason Wang
jasowang at redhat.com
Mon Jul 10 09:10:41 UTC 2017
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 at redhat.com>
---
src/drivers/net/virtio-net.c | 3 ++-
src/include/ipxe/virtio-ring.h | 1 +
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/drivers/net/virtio-net.c b/src/drivers/net/virtio-net.c
index 4151532..19857b9 100644
--- a/src/drivers/net/virtio-net.c
+++ b/src/drivers/net/virtio-net.c
@@ -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 );
diff --git a/src/include/ipxe/virtio-ring.h b/src/include/ipxe/virtio-ring.h
index e608e62..852769f 100644
--- a/src/include/ipxe/virtio-ring.h
+++ b/src/include/ipxe/virtio-ring.h
@@ -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)
--
2.7.4
More information about the ipxe-devel
mailing list