From: Yan Zhao <yan.y.zhao@intel.com>
To: Dave Hansen <dave.hansen@intel.com>
Cc: Rick Edgecombe <rick.p.edgecombe@intel.com>, <bp@alien8.de>,
<hpa@zytor.com>, <kas@kernel.org>, <linux-kernel@vger.kernel.org>,
<mingo@redhat.com>, <nik.borisov@suse.com>, <tglx@kernel.org>,
<x86@kernel.org>, <chao.gao@intel.com>, <yilun.xu@intel.com>,
<ackerleytng@google.com>, <vannapurve@google.com>,
<seanjc@google.com>
Subject: Re: [PATCH] x86/virt/tdx: Add command line param for DPAMT
Date: Thu, 3 Dec 2026 15:45:08 +0800 [thread overview]
Message-ID: <axEeBMXp+0XsGCDr@yzhao56-desk> (raw)
In-Reply-To: <c5976899-c284-42ca-9a85-435395a978ae@intel.com>
On Tue, Dec 01, 2026 at 04:12:31PM -0800, Dave Hansen wrote:
> On 11/26/26 00:13, Yan Zhao wrote:
> > Would you like to have an early discussion on this direction?
>
> To be honest, no.
>
> If you think this is wrong, then the right way to challenge the idea is
Sorry, I had no intention of challenging any idea. I should have initiated this
discussion in the huge page thread instead of here.
I fully agree with this patch to make DPAMT optional.
Based on DPAMT being optional, there are 3 options for TDX huge page support
(see detailed analysis at the bottom):
1: Do not include any DPAMT support
2: Include DPAMT support from the beginning
3: Start with DPAMT-off and add append DPAMT support at the end.
Either option 1 or option 2 is ok to me.
> to structure the series with DPAMT support at the end. That'll show us
> how tiny it is and also let the maintainer just chop the patches off the
> end if they don't agree.
The diff is non-tiny.
7 files changed, 130 insertions(+), 43 deletions(-).
Besides, Sean previously pointed out it would be better not to append DPAMT
support at the end. https://lore.kernel.org/all/aXqSg2nUSYJMbcXT@google.com.
> So, no. I don't want to have an early discussion. I want you to prove me
> wrong with code.
To me, option 3 is less optimal than options 1 and 2. However, I can work on the
formal patches if you would still like to take a look at option 3.
Analysis of current options
--------------------------
Option 1: Do not include any DPAMT support
Pros: Simplicity: by removing all DPAMT-related handing, the huge page
changes would be reduced from
"18 files changed, 633 insertions(+), 57 deletions(-)" to
"17 files changed, 518 insertions(+), 39 deletions(-)".
The tip side would be greatly simplified: with only 1 patch remaining.
On the KVM side, 3 patches can be dropped, and the patch adding
core support for splitting under a non-vCPU context would be greatly
simplified due to the removal of the per-VM DPAMT cache.
Cons: 1. KVM changes are slightly awkward since the current 4KB
mapping/unmapping already include DPAMT support.
2. mutual exclusivity between DPAMT and the initial huge page.
Option 2: Include DPAMT support from the beginning
Pros: 1. The KVM code was largely co-developed with Sean, so it is expected
to face less objection from the KVM side.
2. Sean previously suggested including DPAMT support from the
beginning: "In the end, this fits nicely into *one* patch, with
significantly fewer lines changed overall."
https://lore.kernel.org/all/aXqSg2nUSYJMbcXT@google.com.
Cons: More code overall.
Option 3: Start with DPAMT-off and append the DPAMT support at the end.
Pros: The first part is simplified. Maintainer can chop the patches off the
end if they don't agree.
Cons: 1. The diff in the 2nd part is non-tiny:
7 files changed, 130 insertions(+), 43 deletions(-).
2. The diff is less clean compared to having DPAMT-on support included
from the start (option 2).
next prev parent reply other threads:[~2026-12-03 8:27 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-26 0:54 Rick Edgecombe
2026-11-26 8:13 ` Yan Zhao
2026-12-02 0:12 ` Dave Hansen
2026-12-02 18:04 ` Vishal Annapurve
2026-12-03 7:45 ` Yan Zhao [this message]
2026-12-04 16:47 ` Dave Hansen
2026-12-04 18:44 ` Edgecombe, Rick P
2026-12-04 19:16 ` Sean Christopherson
2026-12-04 19:18 ` Dave Hansen
2026-12-04 21:44 ` Sohil Mehta
2026-12-02 1:14 ` Edgecombe, Rick P
2026-12-02 1:24 ` Yan Zhao
2026-12-02 14:27 ` Edgecombe, Rick P
2026-11-26 10:48 ` Nikolay Borisov
2026-11-30 20:02 ` Edgecombe, Rick P
2026-11-30 20:42 ` Dave Hansen
2026-11-30 22:17 ` Nikolay Borisov
2026-11-30 22:20 ` Edgecombe, Rick P
2026-11-30 22:22 ` Dave Hansen
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=axEeBMXp+0XsGCDr@yzhao56-desk \
--to=yan.y.zhao@intel.com \
--cc=ackerleytng@google.com \
--cc=bp@alien8.de \
--cc=chao.gao@intel.com \
--cc=dave.hansen@intel.com \
--cc=hpa@zytor.com \
--cc=kas@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=nik.borisov@suse.com \
--cc=rick.p.edgecombe@intel.com \
--cc=seanjc@google.com \
--cc=tglx@kernel.org \
--cc=vannapurve@google.com \
--cc=x86@kernel.org \
--cc=yilun.xu@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
all inboxes | Powered by JetHome®