Drivers: hv: vmbus: Initialize VMbus ring buffer for Isolation VM
authorTianyu Lan <Tianyu.Lan@microsoft.com>
Mon, 25 Oct 2021 12:21:14 +0000 (08:21 -0400)
committerWei Liu <wei.liu@kernel.org>
Thu, 28 Oct 2021 11:26:36 +0000 (11:26 +0000)
commit9a8797722e4239242d0cb4cc4baa805df6ac979e
tree8cb351e1b1c93971e0eb1910ca9f9ed34151e16e
parentf2f136c05fb6093818a3b3fefcba46231ac66a62
Drivers: hv: vmbus: Initialize VMbus ring buffer for Isolation VM

VMbus ring buffer are shared with host and it's need to
be accessed via extra address space of Isolation VM with
AMD SNP support. This patch is to map the ring buffer
address in extra address space via vmap_pfn(). Hyperv set
memory host visibility hvcall smears data in the ring buffer
and so reset the ring buffer memory to zero after mapping.

Reviewed-by: Michael Kelley <mikelley@microsoft.com>
Signed-off-by: Tianyu Lan <Tianyu.Lan@microsoft.com>
Link: https://lore.kernel.org/r/20211025122116.264793-10-ltykernel@gmail.com
Signed-off-by: Wei Liu <wei.liu@kernel.org>
drivers/hv/Kconfig
drivers/hv/channel.c
drivers/hv/ring_buffer.c