> -----Original Message-----
> From: Tianyu Lan <[email protected]>
> Sent: Monday, December 13, 2021 2:14 AM
> To: KY Srinivasan <[email protected]>; Haiyang Zhang 
> <[email protected]>; Stephen
> Hemminger <[email protected]>; [email protected]; Dexuan Cui 
> <[email protected]>;
> [email protected]; [email protected]; [email protected]; 
> [email protected];
> [email protected]; [email protected]; [email protected]; [email protected]; 
> [email protected];
> [email protected]; [email protected]; [email protected]; 
> [email protected];
> [email protected]; [email protected]; Tianyu Lan 
> <[email protected]>;
> Michael Kelley (LINUX) <[email protected]>
> Cc: [email protected]; [email protected]; linux-
> [email protected]; [email protected]; 
> [email protected];
> [email protected]; vkuznets <[email protected]>; [email protected];
> [email protected]; [email protected]; [email protected]; [email protected];
> [email protected]
> Subject: [PATCH V7 5/5] net: netvsc: Add Isolation VM support for netvsc 
> driver
> 
> From: Tianyu Lan <[email protected]>
> 
> In Isolation VM, all shared memory with host needs to mark visible
> to host via hvcall. vmbus_establish_gpadl() has already done it for
> netvsc rx/tx ring buffer. The page buffer used by vmbus_sendpacket_
> pagebuffer() stills need to be handled. Use DMA API to map/umap
> these memory during sending/receiving packet and Hyper-V swiotlb
> bounce buffer dma address will be returned. The swiotlb bounce buffer
> has been masked to be visible to host during boot up.
> 
> rx/tx ring buffer is allocated via vzalloc() and they need to be
> mapped into unencrypted address space(above vTOM) before sharing
> with host and accessing. Add hv_map/unmap_memory() to map/umap rx
> /tx ring buffer.
> 
> Signed-off-by: Tianyu Lan <[email protected]>
> ---
> Change since v3:
>        * Replace HV_HYP_PAGE_SIZE with PAGE_SIZE and virt_to_hvpfn()
>          with vmalloc_to_pfn() in the hv_map_memory()
> 
> Change since v2:
>        * Add hv_map/unmap_memory() to map/umap rx/tx ring buffer.
> ---
>  arch/x86/hyperv/ivm.c             |  28 ++++++
>  drivers/hv/hv_common.c            |  11 +++
>  drivers/net/hyperv/hyperv_net.h   |   5 ++
>  drivers/net/hyperv/netvsc.c       | 136 +++++++++++++++++++++++++++++-
>  drivers/net/hyperv/netvsc_drv.c   |   1 +
>  drivers/net/hyperv/rndis_filter.c |   2 +
>  include/asm-generic/mshyperv.h    |   2 +
>  include/linux/hyperv.h            |   5 ++
>  8 files changed, 187 insertions(+), 3 deletions(-)
> 

Reviewed-by: Haiyang Zhang <[email protected]>
_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Reply via email to