From: Nikita Kalyazin <kalyazin@amazon.com>
To: <pbonzini@redhat.com>, <shuah@kernel.org>, <kvm@vger.kernel.org>,
<linux-kselftest@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Cc: <linux-mm@kvack.org>, <michael.day@amd.com>, <david@redhat.com>,
<quic_eberman@quicinc.com>, <jthoughton@google.com>,
<brijesh.singh@amd.com>, <michael.roth@amd.com>, <graf@amazon.de>,
<jgowans@amazon.com>, <roypat@amazon.co.uk>, <derekmn@amazon.com>,
<nsaenz@amazon.es>, <xmarcalx@amazon.com>, <kalyazin@amazon.com>
Subject: [RFC PATCH v2 0/2] KVM: guest_memfd: use write for population
Date: Fri, 29 Nov 2024 12:39:27 +0000 [thread overview]
Message-ID: <20241129123929.64790-1-kalyazin@amazon.com> (raw)
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
next reply other threads:[~2024-11-29 12:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-29 12:39 Nikita Kalyazin [this message]
2024-11-29 12:39 ` [RFC PATCH v2 1/2] KVM: guest_memfd: add generic population via write Nikita Kalyazin
2024-12-03 14:55 ` Mike Day
2024-11-29 12:39 ` [RFC PATCH v2 2/2] KVM: selftests: update guest_memfd write tests Nikita Kalyazin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241129123929.64790-1-kalyazin@amazon.com \
--to=kalyazin@amazon.com \
--cc=brijesh.singh@amd.com \
--cc=david@redhat.com \
--cc=derekmn@amazon.com \
--cc=graf@amazon.de \
--cc=jgowans@amazon.com \
--cc=jthoughton@google.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=michael.day@amd.com \
--cc=michael.roth@amd.com \
--cc=nsaenz@amazon.es \
--cc=pbonzini@redhat.com \
--cc=quic_eberman@quicinc.com \
--cc=roypat@amazon.co.uk \
--cc=shuah@kernel.org \
--cc=xmarcalx@amazon.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox