[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241129123929.64790-1-kalyazin@amazon.com>
Date: Fri, 29 Nov 2024 12:39:27 +0000
From: Nikita Kalyazin <kalyazin@...zon.com>
To: <pbonzini@...hat.com>, <shuah@...nel.org>, <kvm@...r.kernel.org>,
<linux-kselftest@...r.kernel.org>, <linux-kernel@...r.kernel.org>
CC: <linux-mm@...ck.org>, <michael.day@....com>, <david@...hat.com>,
<quic_eberman@...cinc.com>, <jthoughton@...gle.com>, <brijesh.singh@....com>,
<michael.roth@....com>, <graf@...zon.de>, <jgowans@...zon.com>,
<roypat@...zon.co.uk>, <derekmn@...zon.com>, <nsaenz@...zon.es>,
<xmarcalx@...zon.com>, <kalyazin@...zon.com>
Subject: [RFC PATCH v2 0/2] KVM: guest_memfd: use write for population
As discussed in the v1 [1], with guest_memfd moving from KVM to mm, it
is more practical to have a non-KVM-specific API to populate guest
memory in a generic way. The series proposes using the write syscall
for this purpose instead of a KVM ioctl as in the v1. The approach also
has an advantage that the guest_memfd handle can be sent to another
process that would be responsible for population. I also included a
suggestion from Mike Day for excluding the code from compilation if AMD
SEV is configured.
There is a potential for refactoring of the kvm_gmem_populate to extract
common parts with the write. I did not do that in this series yet to
keep it clear what the write would do and get feedback on whether
write's behaviour is sensible.
Nikita
[1]: https://lore.kernel.org/kvm/20241024095429.54052-1-kalyazin@amazon.com/T/
Nikita Kalyazin (2):
KVM: guest_memfd: add generic population via write
KVM: selftests: update guest_memfd write tests
.../testing/selftests/kvm/guest_memfd_test.c | 85 +++++++++++++++++--
virt/kvm/guest_memfd.c | 79 +++++++++++++++++
2 files changed, 158 insertions(+), 6 deletions(-)
base-commit: 1508bae37044ebffd7c7e09915f041936f338123
--
2.40.1
Powered by blists - more mailing lists