lkml.org 
[lkml]   [2023]   [Jan]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH v2 2/6] x86/tdx: Support vmalloc() for tdx_enc_status_changed()
Date
> 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, ...)

\
 
 \ /
  Last update: 2023-03-26 23:28    [W:0.082 / U:1.300 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site