diff options
author | Boqun Feng <boqun.feng@gmail.com> | 2020-09-16 06:48:09 +0300 |
---|---|---|
committer | Wei Liu <wei.liu@kernel.org> | 2020-09-28 11:55:12 +0300 |
commit | c1135c7fd0e95740cd4619ce389f43ffce043140 (patch) | |
tree | 6c14e6855fd6c55230a4c28dece071d4f69f519e /drivers/nvme | |
parent | edd9bbc1d934c21c537444203d50a502ad3d945f (diff) | |
download | linux-c1135c7fd0e95740cd4619ce389f43ffce043140.tar.xz |
Drivers: hv: vmbus: Introduce types of GPADL
This patch introduces two types of GPADL: HV_GPADL_{BUFFER, RING}. The
types of GPADL are purely the concept in the guest, IOW the hypervisor
treat them as the same.
The reason of introducing the types for GPADL is to support guests whose
page size is not 4k (the page size of Hyper-V hypervisor). In these
guests, both the headers and the data parts of the ringbuffers need to
be aligned to the PAGE_SIZE, because 1) some of the ringbuffers will be
mapped into userspace and 2) we use "double mapping" mechanism to
support fast wrap-around, and "double mapping" relies on ringbuffers
being page-aligned. However, the Hyper-V hypervisor only uses 4k
(HV_HYP_PAGE_SIZE) headers. Our solution to this is that we always make
the headers of ringbuffers take one guest page and when GPADL is
established between the guest and hypervisor, the only first 4k of
header is used. To handle this special case, we need the types of GPADL
to differ different guest memory usage for GPADL.
Type enum is introduced along with several general interfaces to
describe the differences between normal buffer GPADL and ringbuffer
GPADL.
Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
Reviewed-by: Michael Kelley <mikelley@microsoft.com>
Link: https://lore.kernel.org/r/20200916034817.30282-4-boqun.feng@gmail.com
Signed-off-by: Wei Liu <wei.liu@kernel.org>
Diffstat (limited to 'drivers/nvme')
0 files changed, 0 insertions, 0 deletions