From: Sean Christopherson <seanjc@google.com>
To: Vishal Annapurve <vannapurve@google.com>
Cc: x86@kernel.org, kvm@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
pbonzini@redhat.com, shuah@kernel.org, bgardon@google.com,
oupton@google.com, peterx@redhat.com, vkuznets@redhat.com,
dmatlack@google.com, pgonda@google.com, andrew.jones@linux.dev
Subject: Re: [V4 PATCH 2/3] KVM: selftests: Add arch specific initialization
Date: Wed, 16 Nov 2022 17:46:05 +0000 [thread overview]
Message-ID: <Y3Uh3cvVYfH0ZFEr@google.com> (raw)
In-Reply-To: <20221115213845.3348210-3-vannapurve@google.com>
On Tue, Nov 15, 2022, Vishal Annapurve wrote:
> Introduce arch specific API: kvm_selftest_arch_init to allow each arch to
> handle initialization before running any selftest logic.
>
> Suggested-by: Sean Christopherson <seanjc@google.com>
> Reviewed-by: Andrew Jones <andrew.jones@linux.dev>
> Reviewed-by: Peter Gonda <pgonda@google.com>
> Signed-off-by: Vishal Annapurve <vannapurve@google.com>
> ---
> .../selftests/kvm/include/kvm_util_base.h | 5 +++++
> .../selftests/kvm/lib/aarch64/processor.c | 18 +++++++++---------
> tools/testing/selftests/kvm/lib/kvm_util.c | 6 ++++++
> 3 files changed, 20 insertions(+), 9 deletions(-)
>
> diff --git a/tools/testing/selftests/kvm/include/kvm_util_base.h b/tools/testing/selftests/kvm/include/kvm_util_base.h
> index e42a09cd24a0..eec0e4898efe 100644
> --- a/tools/testing/selftests/kvm/include/kvm_util_base.h
> +++ b/tools/testing/selftests/kvm/include/kvm_util_base.h
> @@ -838,4 +838,9 @@ static inline int __vm_disable_nx_huge_pages(struct kvm_vm *vm)
> return __vm_enable_cap(vm, KVM_CAP_VM_DISABLE_NX_HUGE_PAGES, 0);
> }
>
> +/*
> + * API to execute architecture specific setup before executing main().
> + */
I find the "API" blurb to be somewhat confusing. When I think of APIs, I think
of functions that are provided by a library that are called by users of the
library.
An example might also help readers understand what types of setup can/should be
done with this hook.
Maybe something like this?
/*
* Arch hook that is invoked via a constructor, i.e. before exeucting main(),
* to allow for arch-specific setup that is common to all tests, e.g. computing
* the default guest "mode".
*/
next prev parent reply other threads:[~2022-11-16 17:46 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-15 21:38 [V4 PATCH 0/3] Minor improvements to the selftest setup logic Vishal Annapurve
2022-11-15 21:38 ` [V4 PATCH 1/3] KVM: selftests: move common startup logic to kvm_util.c Vishal Annapurve
2022-11-16 17:36 ` Sean Christopherson
2022-11-17 18:21 ` Vishal Annapurve
2022-11-15 21:38 ` [V4 PATCH 2/3] KVM: selftests: Add arch specific initialization Vishal Annapurve
2022-11-16 17:46 ` Sean Christopherson [this message]
2022-11-17 18:24 ` Vishal Annapurve
2022-11-15 21:38 ` [V4 PATCH 3/3] KVM: selftests: Add arch specific post vm creation hook Vishal Annapurve
2022-11-16 17:39 ` Sean Christopherson
2022-11-16 18:00 ` [V4 PATCH 0/3] Minor improvements to the selftest setup logic Sean Christopherson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y3Uh3cvVYfH0ZFEr@google.com \
--to=seanjc@google.com \
--cc=andrew.jones@linux.dev \
--cc=bgardon@google.com \
--cc=dmatlack@google.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=oupton@google.com \
--cc=pbonzini@redhat.com \
--cc=peterx@redhat.com \
--cc=pgonda@google.com \
--cc=shuah@kernel.org \
--cc=vannapurve@google.com \
--cc=vkuznets@redhat.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox