Thread (19 messages) 19 messages, 5 authors, 2021-12-10

Re: [PATCH V6 4/5] scsi: storvsc: Add Isolation VM support for storvsc driver

From: Tianyu Lan <hidden>
Date: 2021-12-09 11:17:20
Also in: linux-hyperv, linux-iommu, linux-scsi, lkml, netdev


On 12/9/2021 4:00 PM, Long Li wrote:
quoted
@@ -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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help