From: "Jiaming Fan" <fan.jiaming@hotmail.com>
To: "Ackerley Tng" <ackerleytng@google.com>
Cc: "Sean Christopherson" <seanjc@google.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Thomas Gleixner" <tglx@kernel.org>,
"Ingo Molnar" <mingo@redhat.com>,
"Borislav Petkov" <bp@alien8.de>,
"Dave Hansen" <dave.hansen@linux.intel.com>, <x86@kernel.org>,
"H. Peter Anvin" <hpa@zytor.com>,
"Fuad Tabba" <fuad.tabba@linux.dev>,
"David Hildenbrand" <david@kernel.org>, <kvm@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] KVM: x86/mmu: Prevent hugepage recovery on non-guest_memfd private GFNs
Date: Sun, 22 Nov 2026 04:52:06 +0000 [thread overview]
Message-ID: <OS3PR01MB1025187BCC2CA35B063090CCFE7462@OS3PR01MB10251.jpnprd01.prod.outlook.com> (raw)
In-Reply-To: <20261120-gmem-fix-gmem-max-mapping-level-v1-1-108788914fe8@google.com>
On Fri, Nov 20, 2026, Ackerley Tng wrote:
> + /*
> + * is_private (set in VM attributes) should never have been used
> + * with a non-guest_memfd memslot. Return PG_LEVEL_4K to prevent
> + * hugepage recovery.
> + */
Hi Ackerley,
This comment feels a bit odd to me. KVM does allow marking a GFN private
when its memslot has no guest_memfd, since PRIVATE attributes are per VM,
not per memslot.
I could reproduce the WARN with a KVM_X86_SW_PROTECTED_VM on AMD (nested,
not TDX), and it's gone with this patch.
Tested-by: Jiaming Fan <fan.jiaming@hotmail.com>
next prev parent reply other threads:[~2026-11-22 4:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-20 21:07 Ackerley Tng via B4 Relay
2026-11-22 4:52 ` Jiaming Fan [this message]
2026-12-03 17:57 ` Sean Christopherson
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=OS3PR01MB1025187BCC2CA35B063090CCFE7462@OS3PR01MB10251.jpnprd01.prod.outlook.com \
--to=fan.jiaming@hotmail.com \
--cc=ackerleytng@google.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=david@kernel.org \
--cc=fuad.tabba@linux.dev \
--cc=hpa@zytor.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=pbonzini@redhat.com \
--cc=seanjc@google.com \
--cc=tglx@kernel.org \
--cc=x86@kernel.org \
/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
all inboxes | Powered by JetHome®