diff options
author | Tianyu Lan <Tianyu.Lan@microsoft.com> | 2021-12-13 02:14:05 -0500 |
---|---|---|
committer | Wei Liu <wei.liu@kernel.org> | 2021-12-20 18:01:09 +0000 |
commit | 743b237c3a7b0f5b44aa704aae8a1058877b6322 (patch) | |
tree | b8f10ea7c066f5f03db0da0644ae77384b77fe1d /include/linux | |
parent | 062a5c4260cdb734a4727230c58e38accf413315 (diff) | |
download | lwn-743b237c3a7b0f5b44aa704aae8a1058877b6322.tar.gz lwn-743b237c3a7b0f5b44aa704aae8a1058877b6322.zip |
scsi: storvsc: Add Isolation VM support for storvsc driver
In Isolation VM, all shared memory with host needs to mark visible
to host via hvcall. vmbus_establish_gpadl() has already done it for
storvsc rx/tx ring buffer. The page buffer used by vmbus_sendpacket_
mpb_desc() still needs to be handled. Use DMA API(scsi_dma_map/unmap)
to map these memory during sending/receiving packet and return swiotlb
bounce buffer dma address. In Isolation VM, swiotlb bounce buffer is
marked to be visible to host and the swiotlb force mode is enabled.
Set device's dma min align mask to HV_HYP_PAGE_SIZE - 1 in order to
keep the original data offset in the bounce buffer.
Signed-off-by: Tianyu Lan <Tianyu.Lan@microsoft.com>
Reviewed-by: Long Li <longli@microsoft.com>
Reviewed-by: Michael Kelley <mikelley@microsoft.com>
Link: https://lore.kernel.org/r/20211213071407.314309-5-ltykernel@gmail.com
Signed-off-by: Wei Liu <wei.liu@kernel.org>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/hyperv.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h index b823311eac79..650a0574b746 100644 --- a/include/linux/hyperv.h +++ b/include/linux/hyperv.h @@ -1261,6 +1261,7 @@ struct hv_device { struct vmbus_channel *channel; struct kset *channels_kset; + struct device_dma_parameters dma_parms; /* place holder to keep track of the dir for hv device in debugfs */ struct dentry *debug_dir; |