[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211116153923.196763-1-ltykernel@gmail.com>
Date: Tue, 16 Nov 2021 10:39:18 -0500
From: Tianyu Lan <ltykernel@...il.com>
To: dave.hansen@...ux.intel.com, luto@...nel.org, peterz@...radead.org,
tglx@...utronix.de, mingo@...hat.com, bp@...en8.de, x86@...nel.org,
hpa@...or.com, jgross@...e.com, sstabellini@...nel.org,
boris.ostrovsky@...cle.com, kys@...rosoft.com,
haiyangz@...rosoft.com, sthemmin@...rosoft.com, wei.liu@...nel.org,
decui@...rosoft.com, joro@...tes.org, will@...nel.org,
davem@...emloft.net, kuba@...nel.org, jejb@...ux.ibm.com,
martin.petersen@...cle.com, hch@....de, m.szyprowski@...sung.com,
robin.murphy@....com, xen-devel@...ts.xenproject.org,
michael.h.kelley@...rosoft.com
Cc: Tianyu Lan <Tianyu.Lan@...rosoft.com>,
iommu@...ts.linux-foundation.org, linux-hyperv@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-scsi@...r.kernel.org,
netdev@...r.kernel.org, vkuznets@...hat.com, brijesh.singh@....com,
konrad.wilk@...cle.com, parri.andrea@...il.com,
thomas.lendacky@....com, dave.hansen@...el.com
Subject: [PATCH 0/5] x86/Hyper-V: Add Hyper-V Isolation VM support(Second part)
From: Tianyu Lan <Tianyu.Lan@...rosoft.com>
Hyper-V provides two kinds of Isolation VMs. VBS(Virtualization-based
security) and AMD SEV-SNP unenlightened Isolation VMs. This patchset
is to add support for these Isolation VM support in Linux.
The memory of these vms are encrypted and host can't access guest
memory directly. Hyper-V provides new host visibility hvcall and
the guest needs to call new hvcall to mark memory visible to host
before sharing memory with host. For security, all network/storage
stack memory should not be shared with host and so there is bounce
buffer requests.
Vmbus channel ring buffer already plays bounce buffer role because
all data from/to host needs to copy from/to between the ring buffer
and IO stack memory. So mark vmbus channel ring buffer visible.
For SNP isolation VM, guest needs to access the shared memory via
extra address space which is specified by Hyper-V CPUID HYPERV_CPUID_
ISOLATION_CONFIG. The access physical address of the shared memory
should be bounce buffer memory GPA plus with shared_gpa_boundary
reported by CPUID.
This patchset is to enable swiotlb bounce buffer for netvsc/storvsc
in Isolation VM. Add Hyper-V dma ops and provide dma_alloc/free_
noncontiguous and vmap/vunmap_noncontiguous callback. Allocate
rx/tx ring via dma_alloc_noncontiguous() and map them into extra
address space via dma_vmap_noncontiguous().
Tianyu Lan (5):
x86/Swiotlb: Add Swiotlb bounce buffer remap function for HV IVM
dma-mapping: Add vmap/vunmap_noncontiguous() callback in dma ops
hyperv/IOMMU: Enable swiotlb bounce buffer for Isolation VM
net: netvsc: Add Isolation VM support for netvsc driver
scsi: storvsc: Add Isolation VM support for storvsc driver
arch/x86/mm/mem_encrypt.c | 4 +-
arch/x86/xen/pci-swiotlb-xen.c | 3 +-
drivers/hv/Kconfig | 1 +
drivers/hv/vmbus_drv.c | 6 +
drivers/iommu/hyperv-iommu.c | 164 +++++++++++++++++++++++++
drivers/net/hyperv/hyperv_net.h | 5 +
drivers/net/hyperv/netvsc.c | 192 +++++++++++++++++++++++++++---
drivers/net/hyperv/rndis_filter.c | 2 +
drivers/scsi/storvsc_drv.c | 37 +++---
include/linux/dma-map-ops.h | 3 +
include/linux/hyperv.h | 17 +++
include/linux/swiotlb.h | 6 +
kernel/dma/mapping.c | 18 ++-
kernel/dma/swiotlb.c | 75 ++++++++++--
14 files changed, 488 insertions(+), 45 deletions(-)
--
2.25.1
Powered by blists - more mailing lists