[PATCH] KVM: selftests: Address extra memslot parameters in vm_vaddr_alloc

2021-07-02 Thread Ricardo Koller
Commit a75a895e6457 ("KVM: selftests: Unconditionally use memslot 0 for vaddr allocations") removed the memslot parameters from vm_vaddr_alloc. It addressed all callers except one under lib/aarch64/, due to a race with commit e3db7579ef35 ("KVM: selftests: Add exception handling support for

Re: [PATCH v4 5/6] KVM: selftests: Add exception handling support for aarch64

2021-07-02 Thread Ricardo Koller
On Fri, Jul 02, 2021 at 02:46:57PM +0800, Zenghui Yu wrote: > [+Sean] > > On 2021/6/11 9:10, Ricardo Koller wrote: > > Add the infrastructure needed to enable exception handling in aarch64 > > selftests. The exception handling defaults to an unhandled-exception > > handler which aborts the test,

Re: [PATCH V7 01/18] perf/core: Use static_call to optimize perf_guest_info_callbacks

2021-07-02 Thread Joe Perches
On Fri, 2021-07-02 at 17:38 +0100, Mark Rutland wrote: > On Fri, Jul 02, 2021 at 09:00:22AM -0700, Joe Perches wrote: > > On Fri, 2021-07-02 at 13:22 +0200, Peter Zijlstra wrote: > > > On Tue, Jun 22, 2021 at 05:42:49PM +0800, Zhu Lingshan wrote: [] > > > > + if (perf_guest_cbs &&

Re: [PATCH V7 01/18] perf/core: Use static_call to optimize perf_guest_info_callbacks

2021-07-02 Thread Joe Perches
On Fri, 2021-07-02 at 18:19 +0200, Peter Zijlstra wrote: > On Fri, Jul 02, 2021 at 09:00:22AM -0700, Joe Perches wrote: > > On Fri, 2021-07-02 at 13:22 +0200, Peter Zijlstra wrote: > > > On Tue, Jun 22, 2021 at 05:42:49PM +0800, Zhu Lingshan wrote: > > > > diff --git a/arch/x86/events/core.c

Re: [PATCH V7 01/18] perf/core: Use static_call to optimize perf_guest_info_callbacks

2021-07-02 Thread Mark Rutland
On Fri, Jul 02, 2021 at 09:00:22AM -0700, Joe Perches wrote: > On Fri, 2021-07-02 at 13:22 +0200, Peter Zijlstra wrote: > > On Tue, Jun 22, 2021 at 05:42:49PM +0800, Zhu Lingshan wrote: > > > diff --git a/arch/x86/events/core.c b/arch/x86/events/core.c > [] > > > @@ -90,6 +90,27 @@

[kvm-unit-tests RFC PATCH 5/5] configure: Ignore --erratatxt when --target=kvmtool

2021-07-02 Thread Alexandru Elisei
kvmtool runs a test using the -f/--firmware argument, which doesn't load an initrd, making specifying an errata file useless. Instead, configure forces all erratas to be enabled via the CONFIG_ERRATA_FORCE define in lib/config.h. Forbid the --erratatxt option when kvm-unit-tests is configured for

[kvm-unit-tests RFC PATCH 4/5] scripts: Generate kvmtool standalone tests

2021-07-02 Thread Alexandru Elisei
Add support for the standalone target when running kvm-unit-tests under kvmtool. Example command line invocation: $ ./configure --target=kvmtool $ make clean && make standalone Signed-off-by: Alexandru Elisei --- scripts/mkstandalone.sh | 14 +++--- 1 file changed, 7 insertions(+), 7

[kvm-unit-tests RFC PATCH 3/5] run_tests.sh: Add kvmtool support

2021-07-02 Thread Alexandru Elisei
Modify run_tests.sh to use kvmtool instead of qemu to run tests when kvm-unit-tests has been configured with --target=kvmtool. Example invocation: $ ./configure --target=kvmtool $ make clean && make $ ./run_scripts.sh A custom location for the kvmtool binary can be set using the environment

[kvm-unit-tests RFC PATCH 2/5] scripts: Rename run_qemu_status -> run_test_status

2021-07-02 Thread Alexandru Elisei
kvm-unit-tests will get support for running tests automatically under kvmtool, rename the function to make it more generic. Signed-off-by: Alexandru Elisei --- scripts/arch-run.bash | 2 +- powerpc/run | 2 +- s390x/run | 2 +- 3 files changed, 3 insertions(+), 3

[kvm-unit-tests RFC PATCH 0/5] arm: Add kvmtool to the runner script

2021-07-02 Thread Alexandru Elisei
kvm-unit-tests has support for running arm64 tests under kvmtool since 2019. However, each test had to be run manually since the runner script was blissfully unware of other VMMs beside qemu. This series aims to support running all the tests automatically with kvmtool, like it has always been

[kvm-unit-tests RFC PATCH 1/5] lib: arm: Print test exit status on exit if chr-testdev is not available

2021-07-02 Thread Alexandru Elisei
The arm64 tests can be run under kvmtool, which doesn't emulate a chr-testdev device. In preparation for adding run script support for kvmtool, print the test exit status so the scripts can pick it up and correctly mark the test as pass or fail. Signed-off-by: Alexandru Elisei ---

Re: [PATCH V7 01/18] perf/core: Use static_call to optimize perf_guest_info_callbacks

2021-07-02 Thread Peter Zijlstra
On Fri, Jul 02, 2021 at 09:00:22AM -0700, Joe Perches wrote: > On Fri, 2021-07-02 at 13:22 +0200, Peter Zijlstra wrote: > > On Tue, Jun 22, 2021 at 05:42:49PM +0800, Zhu Lingshan wrote: > > > diff --git a/arch/x86/events/core.c b/arch/x86/events/core.c > [] > > > @@ -90,6 +90,27 @@

Re: [PATCH V7 01/18] perf/core: Use static_call to optimize perf_guest_info_callbacks

2021-07-02 Thread Joe Perches
On Fri, 2021-07-02 at 13:22 +0200, Peter Zijlstra wrote: > On Tue, Jun 22, 2021 at 05:42:49PM +0800, Zhu Lingshan wrote: > > diff --git a/arch/x86/events/core.c b/arch/x86/events/core.c [] > > @@ -90,6 +90,27 @@ DEFINE_STATIC_CALL_NULL(x86_pmu_pebs_aliases, > > *x86_pmu.pebs_aliases); > >   */ >

Re: [PATCH V7 01/18] perf/core: Use static_call to optimize perf_guest_info_callbacks

2021-07-02 Thread Peter Zijlstra
On Tue, Jun 22, 2021 at 05:42:49PM +0800, Zhu Lingshan wrote: > diff --git a/arch/x86/events/core.c b/arch/x86/events/core.c > index 8f71dd72ef95..c71af4cfba9b 100644 > --- a/arch/x86/events/core.c > +++ b/arch/x86/events/core.c > @@ -90,6 +90,27 @@ DEFINE_STATIC_CALL_NULL(x86_pmu_pebs_aliases, >

Re: [PATCH v4 5/6] KVM: selftests: Add exception handling support for aarch64

2021-07-02 Thread Zenghui Yu
[+Sean] On 2021/6/11 9:10, Ricardo Koller wrote: Add the infrastructure needed to enable exception handling in aarch64 selftests. The exception handling defaults to an unhandled-exception handler which aborts the test, just like x86. These handlers can be overridden by calling