Browse Source

[virtio] Support VIRTIO_NET_F_IOMMU_PLATFORM

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>
tags/v1.20.1
Jason Wang 7 years ago
parent
commit
6a258d8d55
2 changed files with 3 additions and 1 deletions
  1. 2
    1
      src/drivers/net/virtio-net.c
  2. 1
    0
      src/include/ipxe/virtio-ring.h

+ 2
- 1
src/drivers/net/virtio-net.c View File

259
 		( 1ULL << VIRTIO_NET_F_MAC ) |
259
 		( 1ULL << VIRTIO_NET_F_MAC ) |
260
 		( 1ULL << VIRTIO_NET_F_MTU ) |
260
 		( 1ULL << VIRTIO_NET_F_MTU ) |
261
 		( 1ULL << VIRTIO_F_VERSION_1 ) |
261
 		( 1ULL << VIRTIO_F_VERSION_1 ) |
262
-		( 1ULL << VIRTIO_F_ANY_LAYOUT ) ) );
262
+		( 1ULL << VIRTIO_F_ANY_LAYOUT ) |
263
+		( 1ULL << VIRTIO_F_IOMMU_PLATFORM ) ) );
263
 	vpm_add_status ( &virtnet->vdev, VIRTIO_CONFIG_S_FEATURES_OK );
264
 	vpm_add_status ( &virtnet->vdev, VIRTIO_CONFIG_S_FEATURES_OK );
264
 
265
 
265
 	status = vpm_get_status ( &virtnet->vdev );
266
 	status = vpm_get_status ( &virtnet->vdev );

+ 1
- 0
src/include/ipxe/virtio-ring.h View File

20
 #define VIRTIO_F_ANY_LAYOUT             27
20
 #define VIRTIO_F_ANY_LAYOUT             27
21
 /* v1.0 compliant. */
21
 /* v1.0 compliant. */
22
 #define VIRTIO_F_VERSION_1              32
22
 #define VIRTIO_F_VERSION_1              32
23
+#define VIRTIO_F_IOMMU_PLATFORM         33
23
 
24
 
24
 #define MAX_QUEUE_NUM      (256)
25
 #define MAX_QUEUE_NUM      (256)
25
 
26
 

Loading…
Cancel
Save