lkml.org 
[lkml]   [2021]   [Dec]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH V6 4/5] scsi: storvsc: Add Isolation VM support for storvsc driver
From


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.

\
 
 \ /
  Last update: 2021-12-09 12:18    [W:0.053 / U:0.292 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site