[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aLFJqjszMURItUe1@yzhao56-desk.sh.intel.com>
Date: Fri, 29 Aug 2025 14:33:14 +0800
From: Yan Zhao <yan.y.zhao@...el.com>
To: Sean Christopherson <seanjc@...gle.com>, Paolo Bonzini
<pbonzini@...hat.com>, <kvm@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
Michael Roth <michael.roth@....com>, Ira Weiny <ira.weiny@...el.com>, "Vishal
Annapurve" <vannapurve@...gle.com>, Rick Edgecombe
<rick.p.edgecombe@...el.com>
Subject: Re: [RFC PATCH 09/12] KVM: TDX: Fold
tdx_mem_page_record_premap_cnt() into its sole caller
On Fri, Aug 29, 2025 at 10:31:29AM +0800, Yan Zhao wrote:
> On Thu, Aug 28, 2025 at 10:00:28AM -0700, Sean Christopherson wrote:
> > On Thu, Aug 28, 2025, Yan Zhao wrote:
> > > On Wed, Aug 27, 2025 at 12:08:27PM -0700, Sean Christopherson wrote:
> > > > On Wed, Aug 27, 2025, Yan Zhao wrote:
> > > > > On Tue, Aug 26, 2025 at 05:05:19PM -0700, Sean Christopherson wrote:
...
> > > > Side topic, why does KVM tolerate tdh_mem_page_add() failure? IIUC, playing
> > > We don't. It returns -EBUSY or -EIO immediately.
> >
> > But that _is_ tolerating failure, in the sense that KVM doesn't prevent further
> > actions on the VM. Tolerating failure is fine in general, but in this case it
> > leaves the MMU is left in a half-baked state.
Yes, but nr_premapped will not be decreased on tdh_mem_page_add() failure.
So we rely on nr_premapped to disallow the TD from running eventually.
Powered by blists - more mailing lists