On 12/9/2021 4:00 PM, Long Li wrote:
@@ -1848,21 +1851,22 @@ static int storvsc_queuecommand(struct Scsi_Host
*host, struct scsi_cmnd *scmnd)
payload->range.len = length;
payload->range.offset = offset_in_hvpg;
+ sg_count = scsi_dma_map(scmnd);
+ if (sg_count < 0)
+ return SCSI_MLQUEUE_DEVICE_BUSY;
Hi Tianyu,
This patch (and this patch series) unconditionally adds code for dealing with DMA addresses for all VMs, including non-isolation VMs.
Does this add performance penalty for VMs that don't require isolation?
Hi Long:
scsi_dma_map() in the traditional VM just save sg->offset to
sg->dma_address and no data copy because swiotlb bounce buffer code
doesn't work. The data copy only takes place in the Isolation VM and
swiotlb_force is set. So there is no additional overhead in the
traditional VM.
Thanks.