[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20221122002421.qg4h47cjoc2birvb@box.shutemov.name>
Date: Tue, 22 Nov 2022 03:24:21 +0300
From: "Kirill A. Shutemov" <kirill@...temov.name>
To: Dexuan Cui <decui@...rosoft.com>
Cc: ak@...ux.intel.com, arnd@...db.de, bp@...en8.de,
brijesh.singh@....com, dan.j.williams@...el.com,
dave.hansen@...ux.intel.com, haiyangz@...rosoft.com, hpa@...or.com,
jane.chu@...cle.com, kirill.shutemov@...ux.intel.com,
kys@...rosoft.com, linux-arch@...r.kernel.org,
linux-hyperv@...r.kernel.org, luto@...nel.org, mingo@...hat.com,
peterz@...radead.org, rostedt@...dmis.org,
sathyanarayanan.kuppuswamy@...ux.intel.com, seanjc@...gle.com,
tglx@...utronix.de, tony.luck@...el.com, wei.liu@...nel.org,
x86@...nel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/6] x86/tdx: Support vmalloc() for
tdx_enc_status_changed()
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
Powered by blists - more mailing lists