Kernel KVM virtualization development
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: Xiaoyao Li <xiaoyao.li@intel.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
	 Fuad Tabba <fuad.tabba@linux.dev>,
	Ackerley Tng <ackerleytng@google.com>,
	 Michael Roth <michael.roth@amd.com>,
	Fuad Tabba <tabba@google.com>
Subject: Re: [PATCH v6 7/9] KVM: guest_memfd: Rename prepare() hook and Kconfig to make_private() / CONVERT
Date: Mon, 27 Jul 2026 07:41:04 -0700	[thread overview]
Message-ID: <amdqJtKey_zX4-Mf@google.com> (raw)
In-Reply-To: <627eda4b-c084-4cd8-ad3a-3b3793feae0d@intel.com>

On Mon, Jul 27, 2026, Xiaoyao Li wrote:
> On 7/24/2026 5:08 AM, Sean Christopherson wrote:
> > Rework guest_memfd's prepare() hook into a more accurate make_private(),
> > and rework its Kconfig from PREPARE to a more generic CONVERT.
> 
> > This will
> > allow x86 to share (pun intended) a kvm_x86_ops.gmem_make_shared() hook
> > between the "convert to shared" and "reclaim" flows, which are one and the
> > same for SNP.
> 
> Does it mean in the future we will introduce something like below?
> 
> #ifdef CONFIG_HAVE_KVM_ARCH_GMEM_CONVERT
> int kvm_arch_gmem_make_private(struct kvm *kvm, gfn_t gfn, kvm_pfn_t pfn,
> int max_order)
> {
> 	return kvm_x86_call(gmem_make_private)(kvm, pfn, gfn, max_order);
> }
> 
> +int kvm_arch_gmem_make_shared(kvm_pfn_t pfn, kvm_pfn_t nr_pages)
> +{
> +	return kvm_x86_call(gmem_make_private)(pfn, nr_pages);

s/gmem_make_private/gmem_make_shared, but yeah, that's the plan for the in-place
conversion series.

  reply	other threads:[~2026-07-27 14:41 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-23 21:08 [PATCH v6 0/9] KVM: guest_memfd: RECLAIM+CONVERT cleanups Sean Christopherson
2026-07-23 21:08 ` [PATCH v6 1/9] KVM: guest_memfd: Pass the number of pages instead of the end pfn into .invalidate() Sean Christopherson
2026-07-25  8:01   ` Fuad Tabba
2026-07-25 14:49   ` Ackerley Tng
2026-07-27  8:41   ` Xiaoyao Li
2026-07-23 21:08 ` [PATCH v6 2/9] KVM: guest_memfd: Rename invalidate() arch hook to reclaim() and isolate it Sean Christopherson
2026-07-23 21:08 ` [PATCH v6 3/9] KVM: x86: Rename kvm_x86_ops' gmem_invalidate() to gmem_make_shared() Sean Christopherson
2026-07-25  8:25   ` Fuad Tabba
2026-07-25 14:55   ` Ackerley Tng
2026-07-27  8:51   ` Xiaoyao Li
2026-07-23 21:08 ` [PATCH v6 4/9] KVM: guest_memfd: Drop the redundant printk on arch gmem_prepare() failure Sean Christopherson
2026-07-23 21:08 ` [PATCH v6 5/9] KVM: guest_memfd: Add helpers to query SHARED vs. PRIVATE for a given page Sean Christopherson
2026-07-25  8:37   ` Fuad Tabba
2026-07-25 14:58   ` Ackerley Tng
2026-07-27  8:54   ` Xiaoyao Li
2026-07-23 21:08 ` [PATCH v6 6/9] KVM: guest_memfd: Only "prepare" folios for private pages Sean Christopherson
2026-07-27  8:56   ` Xiaoyao Li
2026-07-23 21:08 ` [PATCH v6 7/9] KVM: guest_memfd: Rename prepare() hook and Kconfig to make_private() / CONVERT Sean Christopherson
2026-07-25  8:47   ` Fuad Tabba
2026-07-25 15:01   ` Ackerley Tng
2026-07-27  9:51   ` Xiaoyao Li
2026-07-27 14:41     ` Sean Christopherson [this message]
2026-07-27 15:25       ` Ackerley Tng
2026-07-23 21:08 ` [PATCH v6 8/9] KVM: guest_memfd: Explicitly pass number of pages to make_private() hook Sean Christopherson
2026-07-25 15:14   ` Ackerley Tng
2026-07-27  9:59   ` Xiaoyao Li
2026-07-23 21:08 ` [PATCH v6 9/9] KVM: guest_memfd: Make private exactly what can be mapped on page fault Sean Christopherson
2026-07-25 15:22   ` Ackerley Tng

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=amdqJtKey_zX4-Mf@google.com \
    --to=seanjc@google.com \
    --cc=ackerleytng@google.com \
    --cc=fuad.tabba@linux.dev \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michael.roth@amd.com \
    --cc=pbonzini@redhat.com \
    --cc=tabba@google.com \
    --cc=xiaoyao.li@intel.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