mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Xiaoyao Li <xiaoyao.li@intel.com>
To: "Edgecombe, Rick P" <rick.p.edgecombe@intel.com>,
	"Gao, Chao" <chao.gao@intel.com>,
	"Hansen, Dave" <dave.hansen@intel.com>,
	"seanjc@google.com" <seanjc@google.com>,
	"x86@kernel.org" <x86@kernel.org>,
	"kas@kernel.org" <kas@kernel.org>,
	"Wu, Binbin" <binbin.wu@intel.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Hunter, Adrian" <adrian.hunter@intel.com>,
	"Zhao, Yan Y" <yan.y.zhao@intel.com>,
	"pbonzini@redhat.com" <pbonzini@redhat.com>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>
Subject: Re: [PATCH 2/2] x86/virt/tdx: Drop tdh_phymem_page_wbinvd_*()
Date: Mon, 12 Oct 2026 20:50:59 +0800	[thread overview]
Message-ID: <7f23b307-7484-49ae-8ce6-95633942604c@intel.com> (raw)
In-Reply-To: <72e0478c33976f56c79dc6ca9c9823373a868583.camel@intel.com>

On 9/24/2026 12:31 AM, Edgecombe, Rick P wrote:
> On Wed, 2026-09-23 at 10:18 +0800, Xiaoyao Li wrote:
>> What about TDH.PHYMEM.CACHE.WB? Can it be dropped as well?
> 
> Apparently not. I'm not sure we can't push harder on it to drop that that too,
> but it had a slightly different reason for existing apparently. There is a
> different flag for it "SKIP_PHYMEM_CACHE_WB" which we don't check.
> 
> Since it isn't needed for huge page code reduction, I think it's not a
> priority. 

I agree.

> Do you think it is worth mentioning here? Since it has a separate enumeration, I
> thought it was separate enough to keep the log simpler. Keeping it down to what
> is need to understand and not more.

I asked because I don't think TDX spec clarifies it clearly why it needs a
separate enumeration bit.

My understanding is that, for runtime removing a TDX private page, host VMM
calls TDH.PHYMEM.PAGE.WBINVD on a page after removing the page from the SEPT.
For removing pages at TD teardown phase, host VMM can do it in a batch by
TDH.PHYMEM.CACHE.WB to write back all the pages so that host VMM doesn't need to
call TDH.PHYMEM.PAGE.WBINVD on each page.

If the page wbinvd is not needed for runtime page removal, it seems not needed
for teardown time as well.

Considering it helps nothing to huge page code reduction, I'm OK to leave it to
another topic. Maybe we can mention this consideration in the cover letter and
explained that TDH.PHYMEM.CACHE.WB can be discussed and handled separately?

  reply	other threads:[~2026-10-12 12:51 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-22 20:52 [PATCH 0/2] Drop unneeded cache flushing Rick Edgecombe
2026-09-22 20:52 ` [PATCH 1/2] x86/virt/tdx: Drop tdx_clflush_*() Rick Edgecombe
2026-09-23  5:25   ` Yan Zhao
2026-09-23  7:30     ` Binbin Wu
2026-09-23  7:47   ` Tony Lindgren
2026-09-23 15:50     ` Edgecombe, Rick P
2026-09-24  4:44       ` Tony Lindgren
2026-09-23 11:58   ` Nikolay Borisov
2026-09-23 16:26     ` Edgecombe, Rick P
2026-09-23 18:07       ` Nikolay Borisov
2026-09-22 20:52 ` [PATCH 2/2] x86/virt/tdx: Drop tdh_phymem_page_wbinvd_*() Rick Edgecombe
2026-09-23  2:18   ` Xiaoyao Li
2026-09-23 16:31     ` Edgecombe, Rick P
2026-10-12 12:50       ` Xiaoyao Li [this message]
2026-09-23  5:41   ` Yan Zhao
2026-09-23 18:22     ` Edgecombe, Rick P
2026-09-23  7:09   ` Xu Yilun
2026-09-23 18:18     ` Edgecombe, Rick P
2026-09-24  9:10   ` Chao Gao
2026-09-24 18:58     ` Edgecombe, Rick P

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=7f23b307-7484-49ae-8ce6-95633942604c@intel.com \
    --to=xiaoyao.li@intel.com \
    --cc=adrian.hunter@intel.com \
    --cc=binbin.wu@intel.com \
    --cc=chao.gao@intel.com \
    --cc=dave.hansen@intel.com \
    --cc=kas@kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=rick.p.edgecombe@intel.com \
    --cc=seanjc@google.com \
    --cc=x86@kernel.org \
    --cc=yan.y.zhao@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®