Drivers: hv: decrypt netvsc buffers on contiguous direct-map addresses
Status from this message: Applied. Thanks.
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v4 Latest3 patches 1 replyApplied
- v33 patches 3 repliesSuperseded
- v22 patches 4 repliesSuperseded
Earlier versions · 1
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v1 RFC | 2 patches | 9 replies | Superseded |
Patches in v4 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | Drivers: hv: vmbus: add vmbus_establish_gpadl_caller_decrypted()drivers/ include/ | +32 | 0 replies | |
| 2/3 | Drivers: hv: vmbus: Add vmbus_alloc_buffer()/vmbus_free_buffer() for CoCo VMsdrivers/ include/ | +162 | 0 replies | |
| 3/3 | hv_netvsc: Allocate send/receive buffers using vmbus_alloc_buffer()drivers/ drivers/ drivers/ | +83 | 0 replies |
Reviews trailers per patch
All 3 patches have a Reviewed-by or Acked-by.
| Patch | Michael Kelley |
|---|---|
| 1/3 | R-b |
| 2/3 | R-b |
| 3/3 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v4 0/3] Drivers: hv: decrypt netvsc buffers on contiguous direct-map addresses
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.
Changes since v2 [2]:
Patch 2:
- Split patch into two patches, separating new helper functions in VMBus from the netvsc driver changes.
- Change nr_pages, remaining, and page_idx to unsigned long to avoid casting.
- Move order initialization to the top of vmbus_alloc_buffer(), removing one min() call.
- Change order to a signed int to avoid needing min_t().
- Restructure loop in vmbus_alloc_buffer() to avoid nested loops and simplify logic.
- Small comment changes.
Changes since v3 [3]:
- Subject line changes (no code changes)
[1]: https://lore.kernel.org/all/[email protected]/
[2]: https://lore.kernel.org/all/[email protected]/
[3]: https://lore.kernel.org/all/[email protected]/
Kameron Carr (3):
Drivers: hv: vmbus: add vmbus_establish_gpadl_caller_decrypted()
Drivers: hv: vmbus: Add vmbus_alloc_buffer()/vmbus_free_buffer() for
CoCo VMs
hv_netvsc: Allocate send/receive buffers using vmbus_alloc_buffer()
drivers/hv/channel.c | 182 +++++++++++++++++++++++++++++++- drivers/net/hyperv/hyperv_net.h | 8 +- drivers/net/hyperv/netvsc.c | 103 ++++++++++++------ drivers/net/hyperv/netvsc_drv.c | 6 ++ include/linux/hyperv.h | 15 ++- 5 files changed, 277 insertions(+), 37 deletions(-)
base-commit: a4ffc59238be84dd1c26bf1c001543e832674fc6
Signature · 1 line
2.45.4