From: Kameron Carr <kameroncarr@linux.microsoft.com>
To: decui@microsoft.com, haiyangz@microsoft.com, kys@microsoft.com,
longli@microsoft.com, wei.liu@kernel.org, mhklinux@outlook.com
Cc: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, linux-hyperv@vger.kernel.org,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: [PATCH v2 0/2] Drivers: hv: decrypt netvsc buffers on contiguous direct-map addresses
Date: Thu, 30 Jul 2026 16:33:57 -0700 [thread overview]
Message-ID: <20260730233359.3850612-1-kameroncarr@linux.microsoft.com> (raw)
Arm CCA Realms implement set_memory_decrypted() only for addresses in the
kernel linear map; vmalloc()/vmap() addresses are rejected. netvsc
allocates its large send and receive buffers with vzalloc() and passes
those addresses to vmbus_establish_gpadl(), which calls
set_memory_decrypted(), causing GPADL establishment to fail in a Realm.
This series allocates shared buffers as a list of chunks, each physically
contiguous, decrypts each chunk through its direct-map address, and
combines them into a virtually contiguous mapping with vmap(). Private
buffers continue to use vzalloc().
Changes since v1 [1]:
Patch 1:
- Add HV_GPADL_BUFFER_DECRYPTED to enum hv_gpadl_type to indicate a
buffer that has already been decrypted.
Patch 2:
- Rename netvsc_{alloc,free}_buf_pages() -> vmbus_{alloc,free}_buffer()
and move them to channel.c.
- Remove struct netvsc_buf_chunk and replace with page folio in
compound pages.
- vmbus_alloc_buffer():
- use vzalloc() for non-host-visible buffers and remove the
encryption decision out of netvsc.
- min_t() -> min().
- zero the memory after allocation.
- specify @size "will be rounded up to PAGE_SIZE" in the docstring.
[1]: https://lore.kernel.org/all/20260721195633.1438361-1-kameroncarr@linux.microsoft.com/
Kameron Carr (2):
Drivers: hv: vmbus: add vmbus_establish_gpadl_caller_decrypted()
hv_netvsc: Allocate host-visible GPADL buffers as decrypted contiguous
chunks
drivers/hv/channel.c | 185 +++++++++++++++++++++++++++++++-
drivers/net/hyperv/hyperv_net.h | 8 +-
drivers/net/hyperv/netvsc.c | 104 ++++++++++++------
drivers/net/hyperv/netvsc_drv.c | 6 ++
include/linux/hyperv.h | 15 ++-
5 files changed, 281 insertions(+), 37 deletions(-)
--
2.45.4
next reply other threads:[~2026-07-30 23:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-30 23:33 Kameron Carr [this message]
2026-07-30 23:33 ` [PATCH v2 1/2] Drivers: hv: vmbus: add vmbus_establish_gpadl_caller_decrypted() Kameron Carr
2026-07-31 15:46 ` Michael Kelley
2026-07-30 23:33 ` [PATCH v2 2/2] hv_netvsc: Allocate host-visible GPADL buffers as decrypted contiguous chunks Kameron Carr
2026-07-31 15:46 ` Michael Kelley
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260730233359.3850612-1-kameroncarr@linux.microsoft.com \
--to=kameroncarr@linux.microsoft.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=decui@microsoft.com \
--cc=edumazet@google.com \
--cc=haiyangz@microsoft.com \
--cc=kuba@kernel.org \
--cc=kys@microsoft.com \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=longli@microsoft.com \
--cc=mhklinux@outlook.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=wei.liu@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox