[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aUsiAzbf85ZHA2Bv@google.com>
Date: Tue, 23 Dec 2025 15:13:07 -0800
From: Sean Christopherson <seanjc@...gle.com>
To: Yosry Ahmed <yosry.ahmed@...ux.dev>
Cc: Paolo Bonzini <pbonzini@...hat.com>, kvm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 11/16] KVM: selftests: Move TDP mapping functions
outside of vmx.c
On Thu, Nov 27, 2025, Yosry Ahmed wrote:
> diff --git a/tools/testing/selftests/kvm/lib/x86/processor.c b/tools/testing/selftests/kvm/lib/x86/processor.c
> index 8b0e17f8ca37..517a8185eade 100644
> --- a/tools/testing/selftests/kvm/lib/x86/processor.c
> +++ b/tools/testing/selftests/kvm/lib/x86/processor.c
> @@ -467,6 +467,77 @@ void virt_arch_dump(FILE *stream, struct kvm_vm *vm, uint8_t indent)
> }
> }
>
> +/*
> + * Map a range of TDP guest physical addresses to the VM's physical address
> + *
> + * Input Args:
> + * vm - Virtual Machine
> + * nested_paddr - Nested guest physical address to map
> + * paddr - VM Physical Address
> + * size - The size of the range to map
> + * level - The level at which to map the range
> + *
> + * Output Args: None
> + *
> + * Return: None
> + *
> + * Within the VM given by vm, creates a nested guest translation for the
> + * page range starting at nested_paddr to the page range starting at paddr.
> + */
Eh, opportunistically drop this function comment. If the reader can't figure out
what tdp_map() is doing, a failure generic comment isn't likely to help.
> +void __tdp_map(struct kvm_vm *vm, uint64_t nested_paddr, uint64_t paddr,
> + uint64_t size, int level)
> +{
Powered by blists - more mailing lists