Re: [PATCH v4 08/17] KVM: TDX: Adjust the topup count of DPAMT page pairs for splitting S-EPT

From: Edgecombe, Rick P

Date: Wed Oct 07 2026 - 21:16:26 EST


On Wed, 2026-10-07 at 15:47 -0700, Rick Edgecombe wrote:
> Another idea, change the op to be:
> int topup_external_cache(struct kvm_vcpu *vcpu, bool root, bool private_page,
> int min_nr_spts);
>
> Normal topup can set:
> root=true
> private_page=true
> min_nr_spts = PT64_ROOT_MAX_LEVEL - 1
>
> Then we can calculate exactly what we need. And even better, the existing code
> won't nee a comment to explain the weirdness.

Actually since this gets a struct kvm arg later in the series, maybe we could
just have two ops. One for topping up from a fault and another for a split.