[lkml]   [2022]   [Dec]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v10 056/108] KVM: TDX: don't request KVM_REQ_APIC_PAGE_RELOAD
On Thu, 2022-12-15 at 16:11 -0800, Isaku Yamahata wrote:
> > Btw2, by saying above, does it make sense to split patch "[PATCH v10
> > 105/108]
> > KVM: TDX: Add methods to ignore accesses to CPU state" based on category
> > such as
> > MMU/interrupt, etc?  Particularly, in that patch, some callbacks have WARN()
> > or
> > KVM_BUG_ON() against TD guest, but some don't.  The logic behind those
> > decisions
> > highly depend on previous patches.  To me, it makes more sense to just move
> > logic related things together.
> Ok, I'll split it up to cpu states/KVM MMU/interrupt parts.

If I recall correctly, originally (long time ago before starting to upstream),
what we did was we have a patch to make all kvm_x86_ops callback KVM_BUG_ON()
for TDX guest, then we fix those KVM_BUG_ON() in later patches in separate

We don't need to do the exact same way, but this also seems reasonable to me.
For instance, at the beginning we can mark KVM_BUG_ON() for all callbacks which
reads/writes CPU states (which is reasonable anyway), and in later patches we
remove the KVM_BUG_ON() if needed when handling specific logic.

Simply my 2cents above. Just for your reference. My real comment is we should
put relevant parts together so it's easy to review.
 \ /
  Last update: 2022-12-16 01:32    [W:0.176 / U:0.392 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site