Messages in this thread | | | From | Dexuan Cui <> | Subject | RE: [PATCH v2 2/6] x86/tdx: Support vmalloc() for tdx_enc_status_changed() | Date | Thu, 5 Jan 2023 17:33:16 +0000 |
| |
> From: Zhi Wang <zhi.wang.linux@gmail.com> > Sent: Thursday, January 5, 2023 1:45 AM > [...] > On Tue, 6 Dec 2022 16:33:21 -0800 > Dexuan Cui <decui@microsoft.com> 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. > > It seems calling set_memory_decrypted() in netvsc_init_buf() is missing in > this patch series. I guess there should be another one extra patch to cover > that.
set_memory_decrypted() is not missing here. In netvsc_init_buf(), after the line "net_device->recv_buf = vzalloc(buf_size);", we have
vmbus_establish_gpadl(device->channel, net_device->recv_buf, ...), which
calls __vmbus_establish_gpadl(), which calls
set_memory_decrypted((unsigned long)kbuffer, ...)
| |