diff options
author | Jean-Philippe Brucker <jean-philippe@linaro.org> | 2023-06-06 14:04:17 +0100 |
---|---|---|
committer | Will Deacon <will@kernel.org> | 2023-06-08 22:39:03 +0100 |
commit | b8420e8d5d8dd74c7efd86d4ed7df724127fe184 (patch) | |
tree | aafe357c9a6432c4a6473fd94f88fb4d244a76a9 | |
parent | 7bc3b5d7ef8070f91d3139f65030bb3a6aece10f (diff) | |
download | kvmtool-b8420e8d5d8dd74c7efd86d4ed7df724127fe184.tar.gz |
virtio/scsi: Initialize max_target
The Linux guest does not find any target when 'max_target' is 0.
Initialize it to the maximum defined by virtio, "5.6.4 Device
configuration layout":
max_target SHOULD be less than or equal to 255.
Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
Link: https://lore.kernel.org/r/20230606130426.978945-9-jean-philippe@linaro.org
Signed-off-by: Will Deacon <will@kernel.org>
-rw-r--r-- | virtio/scsi.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/virtio/scsi.c b/virtio/scsi.c index db4adc75..4d1ed9b8 100644 --- a/virtio/scsi.c +++ b/virtio/scsi.c @@ -73,6 +73,7 @@ static void notify_status(struct kvm *kvm, void *dev, u32 status) conf->cmd_per_lun = virtio_host_to_guest_u32(endian, 128); conf->sense_size = virtio_host_to_guest_u32(endian, VIRTIO_SCSI_SENSE_SIZE); conf->cdb_size = virtio_host_to_guest_u32(endian, VIRTIO_SCSI_CDB_SIZE); + conf->max_target = virtio_host_to_guest_u16(endian, 255); conf->max_lun = virtio_host_to_guest_u32(endian, 16383); conf->event_info_size = virtio_host_to_guest_u32(endian, sizeof(struct virtio_scsi_event)); } |