Re: [PATCH v19 120/130] KVM: TDX: Add a method to ignore dirty logging

From: Isaku Yamahata
Date: Mon Mar 18 2024 - 13:12:34 EST


On Fri, Mar 15, 2024 at 02:01:43PM +0000,
"Edgecombe, Rick P" <rick.p.edgecombe@xxxxxxxxx> wrote:

> On Thu, 2024-03-14 at 18:35 -0700, Isaku Yamahata wrote:
> > > On the subject of warnings and KVM_BUG_ON(), my feeling so far is
> > > that
> > > this series is quite aggressive about these. Is it due the
> > > complexity
> > > of the series? I think maybe we can remove some of the simple ones,
> > > but
> > > not sure if there was already some discussion on what level is
> > > appropriate.
> >
> > KVM_BUG_ON() was helpful at the early stage.  Because we don't hit
> > them
> > recently, it's okay to remove them.  Will remove them.
>
> Hmm. We probably need to do it case by case.

I categorize as follows. Unless otherwise, I'll update this series.

- dirty log check
As we will drop this ptach, we'll have no call site.

- KVM_BUG_ON() in main.c
We should drop them because their logic isn't complex.

- KVM_BUG_ON() in tdx.c
- The error check of the return value from SEAMCALL
We should keep it as it's unexpected error from TDX module. When we hit
this, we should mark the guest bugged and prevent further operation. It's
hard to deduce the reason. TDX mdoule might be broken.

- Other check
We should drop them.

--
Isaku Yamahata <isaku.yamahata@xxxxxxxxx>