RE: [PATCH] x86/tdx: Support vmalloc() for tdx_enc_status_changed()

2024-06-28 Thread Dexuan Cui
> From: Kirill A. Shutemov > Sent: Friday, June 28, 2024 3:05 AM > To: Dexuan Cui > > [...] > > static bool tdx_enc_status_changed(unsigned long vaddr, int numpages, > [...] > This patch collied with kexec changes. tdx_kexec_finish() calls > tdx_enc_status_changed() after clearing pte, so

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

2024-06-28 Thread Kirill A. Shutemov
On Mon, May 20, 2024 at 07:12:38PM -0700, Dexuan Cui wrote: > @@ -785,15 +799,22 @@ static bool tdx_map_gpa(phys_addr_t start, phys_addr_t > end, bool enc) > */ > static bool tdx_enc_status_changed(unsigned long vaddr, int numpages, bool > enc) > { > - phys_addr_t start = __pa(vaddr); >

RE: [PATCH] x86/tdx: Support vmalloc() for tdx_enc_status_changed()

2024-06-18 Thread Dexuan Cui
> From: Dexuan Cui > Sent: Monday, May 20, 2024 7:13 PM > [] > 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 >

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

2024-05-20 Thread Dexuan Cui
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.