Thread (36 messages) 36 messages, 9 authors, 2024-11-15

Re: [RFC PATCH v3 0/6] Direct Map Removal for guest_memfd

From: Manwaring, Derek <hidden>
Date: 2024-11-01 19:29:33
Also in: kvm, linux-doc, linux-kselftest, linux-mm, linux-riscv, linux-s390, lkml, loongarch

On 2024-11-01 at 18:43+0000, Dave Hansen wrote:
On 11/1/24 11:31, Manwaring, Derek wrote:
quoted
From that standpoint I'm still tempted to turn the question around a bit
for the host kernel's perspective. Like if the host kernel should not
(and indeed cannot with TDX controls in place) access guest private
memory, why not remove it from the direct map?
Pretend that the machine check warts aren't there.

It costs performance and complexity, for an only theoretical gain.  This
is especially true for a VMM that's not doing a just doing confidential
guests.  You fracture the direct map to pieces forever (for now).
I'm hopeful we'll navigate the complexity in a worthwhile way for the
non-CoCo case. Assuming we get there and have the option to remove from
direct map, users with CoCo hardware could choose if they want to do
both on their host. For me that's a sensible choice, but maybe that's
just me.

As far as performance, are you talking about just the fracturing or
something beyond that? The data Mike brought to LSFMMBPF 2023 showed the
perf impact from direct map fragmentation for memfd_secret isn't "that
bad" [1].

Derek


[1] https://lwn.net/Articles/931406/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help