From: Sean Christopherson <seanjc@google.com>
To: tarunsahu@google.com
Cc: axelrasmussen@google.com, mark.rutland@arm.com,
skhawaja@google.com, Mike Rapoport <rppt@kernel.org>,
sagis@google.com, Jason Gunthorpe <jgg@ziepe.ca>,
Shuah Khan <shuah@kernel.org>,
ackerleytng@google.com, corbet@lwn.net, dmatlack@google.com,
Paolo Bonzini <pbonzini@redhat.com>,
Andrew Morton <akpm@linux-foundation.org>,
vannapurve@google.com, Pratyush Yadav <pratyush@kernel.org>,
david@redhat.com, aneesh.kumar@kernel.org, vipinsh@google.com,
Alexander Graf <graf@amazon.com>,
David Hildenbrand <david@kernel.org>,
Pasha Tatashin <pasha.tatashin@soleen.com>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
kexec@lists.infradead.org, linux-kselftest@vger.kernel.org,
kvm@vger.kernel.org
Subject: Re: [RFC PATCH v1 0/8] liveupdate: kvm: Guest_memfd preservation
Date: Fri, 29 May 2026 06:57:41 -0700 [thread overview]
Message-ID: <ahmbVaCUcBrYK8qO@google.com> (raw)
In-Reply-To: <9huzwlwnbgdd.fsf@tarunix.c.googlers.com>
On Thu, May 28, 2026, tarunsahu@google.com wrote:
> 3. No need to preserve kvm->mem_attr_array, as this is on deprecating
> path and For this series, where only fully shared guest_memfd is
> supported for liveupdate, preservation of these attributes not
> required.
>
> Due to time constraints:
> we have one open Question left:
> 1. How to check guest_memfd is fully shared. Currently that is being
> done by INIT_SHARED flag. But with in-place it is going to change
> its meaning and it will mean only durng the creation of guest_memfd
> it is shared whose folios can be converted to private.
> So for this series, I am looking for suggestion, what is the best way
> to find the sharedness of guest_memfd which will be compatible with
> in-place series. OR we can go like this (my personnel recommendation):
>
> if (guest_memfd_is_fully_shared())
> return true; // support the preservation
>
> // This series
> int guest_memfd_is_fully_shared(void) {
> if (guest_memfd->flags & GUEST_MEMFD_FLAG_INIT_SHARED)
> return true;
> return false;
> }
>
> TO::
> // Once in-place conversion series lands.
> int guest_memfd_is_fully_shared(void) {
> if (No Private flags in (guest_memfd->attributes))
> return true;
> return false;
> }
Given that lack of support isn't going to be limited to _just_ guest_memfd,
simply disallow preservation if the VM supports private memory:
if (kvm_arch_has_private_mem(kvm))
return -EOPNOTSUPP;
prev parent reply other threads:[~2026-05-29 13:57 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-18 9:36 [RFC PATCH v1 0/8] liveupdate: kvm: Guest_memfd preservation Tarun Sahu
2026-05-18 9:36 ` [RFC PATCH v1 1/9] liveupdate: luo_file: Add internal APIs for file preservation Tarun Sahu
2026-05-18 9:36 ` [RFC PATCH v1 2/9] liveupdate: Add LIVEUPDATE_GUEST_MEMFD config option Tarun Sahu
2026-05-18 9:36 ` [RFC PATCH v1 3/9] kvm: Prepare core VM structs and helpers for LUO support Tarun Sahu
2026-05-18 9:36 ` [RFC PATCH v1 4/9] kvm: kvm_luo: Allow kvm preservation with LUO Tarun Sahu
2026-05-18 9:36 ` [RFC PATCH v1 5/9] kvm: guest_memfd: Move internal definitions and helper to new header Tarun Sahu
2026-05-18 9:36 ` [RFC PATCH v1 6/9] kvm: guest_memfd: Add support for freezing and unfreezing mappings Tarun Sahu
2026-05-18 9:36 ` [RFC PATCH v1 7/9] kvm: guest_memfd_luo: add support for guest_memfd preservation Tarun Sahu
2026-05-18 9:36 ` [RFC PATCH v1 8/9] selftests: kvm: Split ____vm_create() to expose init helpers Tarun Sahu
2026-05-18 9:36 ` [RFC PATCH v1 9/9] selftests: kvm: Add guest_memfd_preservation_test Tarun Sahu
2026-05-28 17:20 ` [RFC PATCH v1 0/8] liveupdate: kvm: Guest_memfd preservation tarunsahu
2026-05-29 13:57 ` Sean Christopherson [this message]
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=ahmbVaCUcBrYK8qO@google.com \
--to=seanjc@google.com \
--cc=ackerleytng@google.com \
--cc=akpm@linux-foundation.org \
--cc=aneesh.kumar@kernel.org \
--cc=axelrasmussen@google.com \
--cc=corbet@lwn.net \
--cc=david@kernel.org \
--cc=david@redhat.com \
--cc=dmatlack@google.com \
--cc=graf@amazon.com \
--cc=jgg@ziepe.ca \
--cc=kexec@lists.infradead.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mark.rutland@arm.com \
--cc=pasha.tatashin@soleen.com \
--cc=pbonzini@redhat.com \
--cc=pratyush@kernel.org \
--cc=rppt@kernel.org \
--cc=sagis@google.com \
--cc=shuah@kernel.org \
--cc=skhawaja@google.com \
--cc=tarunsahu@google.com \
--cc=vannapurve@google.com \
--cc=vipinsh@google.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