Thread (57 messages) 57 messages, 7 authors, 2023-01-09

Re: [PATCH 3/6] x86/tdx: Support vmalloc() for tdx_enc_status_changed()

From: Kirill A. Shutemov <hidden>
Date: 2022-11-22 00:24:33
Also in: linux-arch, lkml

On Mon, Nov 21, 2022 at 11:51:48AM -0800, Dexuan Cui wrote:
When a TDX guest runs on Hyper-V, the hv_netvsc driver's netvsc_init_buf()
allocates buffers using vzalloc(), and needs to share the buffers with the
host OS by calling set_memory_decrypted(), which is not working for
vmalloc() yet. Add the support by handling the pages one by one.
Why do you use vmalloc here in the first place?

Will you also adjust direct mapping to have shared bit set?

If not, we will have problems with load_unaligned_zeropad() when it will
access shared pages via non-shared mapping.

If direct mapping is adjusted, we will get direct mapping fragmentation.

Maybe tap into swiotlb buffer using DMA API?

-- 
  Kiryl Shutsemau / Kirill A. Shutemov
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help