aboutsummaryrefslogtreecommitdiff
path: root/src/hw/virtio-scsi.c
diff options
context:
space:
mode:
authorJason Wang <jasowang@redhat.com>2017-07-05 15:49:51 +0800
committerKevin O'Connor <kevin@koconnor.net>2017-07-07 10:56:12 -0400
commitdd9bba5b9c1d5175a2757f3fdc9d554b4c8eea3a (patch)
tree803c7325ee6367ee858c2a698433a38884c53621 /src/hw/virtio-scsi.c
parentb3a9f27fb1f63e9b6bf5ca424d31e23bd5b4c2f0 (diff)
downloadseabios-hppa-dd9bba5b9c1d5175a2757f3fdc9d554b4c8eea3a.zip
seabios-hppa-dd9bba5b9c1d5175a2757f3fdc9d554b4c8eea3a.tar.gz
seabios-hppa-dd9bba5b9c1d5175a2757f3fdc9d554b4c8eea3a.tar.bz2
virtio: IOMMU support
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. Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'src/hw/virtio-scsi.c')
-rw-r--r--src/hw/virtio-scsi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/hw/virtio-scsi.c b/src/hw/virtio-scsi.c
index 7490ec0..4eea5c3 100644
--- a/src/hw/virtio-scsi.c
+++ b/src/hw/virtio-scsi.c
@@ -163,12 +163,13 @@ init_virtio_scsi(void *data)
if (vp->use_modern) {
u64 features = vp_get_features(vp);
u64 version1 = 1ull << VIRTIO_F_VERSION_1;
+ u64 iommu_platform = 1ull << VIRTIO_F_IOMMU_PLATFORM;
if (!(features & version1)) {
dprintf(1, "modern device without virtio_1 feature bit: %pP\n", pci);
goto fail;
}
- vp_set_features(vp, version1);
+ vp_set_features(vp, features & (version1 | iommu_platform));
status |= VIRTIO_CONFIG_S_FEATURES_OK;
vp_set_status(vp, status);
if (!(vp_get_status(vp) & VIRTIO_CONFIG_S_FEATURES_OK)) {