Skip to content
Commit 743b237c authored by Tianyu Lan's avatar Tianyu Lan Committed by Wei Liu
Browse files

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: default avatarTianyu Lan <Tianyu.Lan@microsoft.com>
Reviewed-by: default avatarLong Li <longli@microsoft.com>
Reviewed-by: default avatarMichael Kelley <mikelley@microsoft.com>
Link: https://lore.kernel.org/r/20211213071407.314309-5-ltykernel@gmail.com


Signed-off-by: default avatarWei Liu <wei.liu@kernel.org>
parent 062a5c42
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment