[PATCH kvmtool 08/16] virtio/scsi: Initialize max_target

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 virtio/scsi.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/virtio/scsi.c b/virtio/scsi.c
index f059fc37..fc1c2ad9 100644
--- a/virtio/scsi.c
+++ b/virtio/scsi.c
@@ -76,6 +76,7 @@ static void notify_status(struct kvm *kvm, void *dev, u32 status)
 	conf->sense_size = virtio_host_to_guest_u32(vdev, VIRTIO_SCSI_SENSE_SIZE);
 	conf->cdb_size = virtio_host_to_guest_u32(vdev, VIRTIO_SCSI_CDB_SIZE);
 	conf->max_lun = virtio_host_to_guest_u32(vdev, 16383);
+	conf->max_target = virtio_host_to_guest_u32(vdev, 255);
 	conf->event_info_size = virtio_host_to_guest_u32(vdev, sizeof(struct virtio_scsi_event));
 }
 
-- 
2.40.0




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux