[PATCH kvmtool v2 08/17] 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 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));
 }
-- 
2.40.1




[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