Re: [PATCHv2 07/12] KVM: TDX: Preallocate PAMT pages to be used in page fault path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2025-06-09 at 22:13 +0300, Kirill A. Shutemov wrote:
> diff --git a/arch/x86/kvm/mmu/mmu.c b/arch/x86/kvm/mmu/mmu.c
> index cbc84c6abc2e..d99bb27b5b01 100644
> --- a/arch/x86/kvm/mmu/mmu.c
> +++ b/arch/x86/kvm/mmu/mmu.c
> @@ -616,6 +616,12 @@ static int mmu_topup_memory_caches(struct kvm_vcpu *vcpu, bool maybe_indirect)
>  		if (r)
>  			return r;
>  	}
> +
> +	r = kvm_mmu_topup_memory_cache(&vcpu->arch.pamt_page_cache,
> +				       tdx_nr_pamt_pages() * PT64_ROOT_MAX_LEVEL);
> +	if (r)
> +		return r;
> +

Shouldn't this be only for TD vCPUs?




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux