- 17 May, 2022 2 commits
-
-
Bill Wendling authored
Clang's version of objdump doesn't recognize "setftest.elf" as a dynamic object and produces an error stating such. $ llvm-objdump -R ./arm/selftest.elf arm/selftest.elf: file format elf64-littleaarch64 llvm-objdump: error: './arm/selftest.elf': not a dynamic object This causes the ARM64 "arch_elf_check" check to fail. Using "readelf -rW" is a better option way to get the same information and produces the same information in both binutils and LLVM. Signed-off-by:
Bill Wendling <morbo@google.com> Signed-off-by:
Andrew Jones <drjones@redhat.com>
-
Andrew Jones authored
If the user sets QEMU=qemu-system-arm on arm64 systems, the tests can only be run by using the TCG accelerator. In this case use TCG instead of KVM. Signed-off-by:
Andrew Jones <drjones@redhat.com> [ Alex E: Added commit message ] Signed-off-by:
Alexandru Elisei <alexandru.elisei@arm.com>
-
- 12 May, 2022 7 commits
-
-
Paolo Bonzini authored
storage keys, attestation, migration tests See merge request kvm-unit-tests/kvm-unit-tests!30
-
Adds several tests to verify correct error paths of attestation. Signed-off-by:
Steffen Eiden <seiden@linux.ibm.com> Reviewed-by:
Janosch Frank <frankja@linux.ibm.com> Signed-off-by:
Claudio Imbrenda <imbrenda@linux.ibm.com>
-
The UV facility bits shared/unshared must both be set or none. Signed-off-by:
Steffen Eiden <seiden@linux.ibm.com> Reviewed-by:
Janosch Frank <frankja@linux.ibm.com> Signed-off-by:
Claudio Imbrenda <imbrenda@linux.ibm.com>
-
Signed-off-by:
Steffen Eiden <seiden@linux.ibm.com> Reviewed-by:
Janosch Frank <frankja@linux.ibm.com> Signed-off-by:
Claudio Imbrenda <imbrenda@linux.ibm.com>
-
Removing some tests which are done at other points in the code implicitly. In lib/s390x/uc.c#setup_uv(void) the rc of the qui result is verified using asserts. The whole test is fenced by lib/s390x/uc.c#uv_os_is_guest(void) that checks if SET and REMOVE SHARED is present. Signed-off-by:
Steffen Eiden <seiden@linux.ibm.com> Reviewed-by:
Janosch Frank <frankja@linux.ibm.com> Signed-off-by:
Claudio Imbrenda <imbrenda@linux.ibm.com>
-
Some tests need the information provided by the QUI UVC and lib/s390x/uv.c already has cached the qui result. Let's add a function to avoid unnecessary QUI UVCs. Signed-off-by:
Steffen Eiden <seiden@linux.ibm.com> Reviewed-by:
Janosch Frank <frankja@linux.ibm.com> Signed-off-by:
Claudio Imbrenda <imbrenda@linux.ibm.com>
-
Adds an invalid command test for attestation in the uv-host. Signed-off-by:
Steffen Eiden <seiden@linux.ibm.com> Reviewed-by:
Janosch Frank <frankja@linux.ibm.com> Reviewed-by:
Claudio Imbrenda <imbrenda@linux.ibm.com> Signed-off-by:
Claudio Imbrenda <imbrenda@linux.ibm.com>
-
- 05 May, 2022 4 commits
-
-
The test cases newly added to skey.c require kernel 5.18. Signed-off-by:
Janis Schoetterl-Glausch <scgl@linux.ibm.com> Reviewed-by:
Thomas Huth <thuth@redhat.com> Acked-by:
Claudio Imbrenda <imbrenda@linux.ibm.com> Signed-off-by:
Claudio Imbrenda <imbrenda@linux.ibm.com>
-
Some instructions are emulated by KVM. Test that KVM correctly emulates storage key checking for two of those instructions (STORE CPU ADDRESS, SET PREFIX). Test success and error conditions, including coverage of storage and fetch protection override. Also add test for TEST PROTECTION, even if that instruction will not be emulated by KVM under normal conditions. Signed-off-by:
Janis Schoetterl-Glausch <scgl@linux.ibm.com> Acked-by:
Thomas Huth <thuth@redhat.com> Acked-by:
Janosch Frank <frankja@linux.ibm.com> Signed-off-by:
Claudio Imbrenda <imbrenda@linux.ibm.com>
-
Improve readability by making the return value of tprot() an enum. No functional change intended. Signed-off-by:
Janis Schoetterl-Glausch <scgl@linux.ibm.com> Reviewed-by:
Claudio Imbrenda <imbrenda@linux.ibm.com> Reviewed-by:
Janosch Frank <frankja@linux.ibm.com> Reviewed-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
Claudio Imbrenda <imbrenda@linux.ibm.com>
-
Add a basic migration test for s390x. This tests the guarded-storage registers and vector registers are preserved on migration. Check for the respective facilities. Since it is possible neither guarded-storage nor vector are there, add an additional report_pass() such that least one PASS is reported. Signed-off-by:
Nico Boehr <nrb@linux.ibm.com> Reviewed-by:
Thomas Huth <thuth@redhat.com> Reviewed-by:
Claudio Imbrenda <imbrenda@linux.ibm.com> Signed-off-by:
Claudio Imbrenda <imbrenda@linux.ibm.com>
-
- 22 Apr, 2022 3 commits
-
-
PV doesn't support migration, so don't run the migration tests there. Signed-off-by:
Nico Boehr <nrb@linux.ibm.com> Reviewed-by:
Claudio Imbrenda <imbrenda@linux.ibm.com> Acked-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
Claudio Imbrenda <imbrenda@linux.ibm.com>
-
Now that we have SCLP console read support, run our tests with migration_cmd, so we can get migration support on s390x. Signed-off-by:
Nico Boehr <nrb@linux.ibm.com> Reviewed-by:
Claudio Imbrenda <imbrenda@linux.ibm.com> Reviewed-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
Claudio Imbrenda <imbrenda@linux.ibm.com>
-
Add a basic implementation for reading from the SCLP ASCII console. The goal of this is to support migration tests on s390x. To know when the migration has been finished, we need to listen for a newline on our console. Hence, this implementation is focused on the SCLP ASCII console of QEMU and currently won't work under e.g. LPAR. Signed-off-by:
Nico Boehr <nrb@linux.ibm.com> Reviewed-by:
Thomas Huth <thuth@redhat.com> Reviewed-by:
Claudio Imbrenda <imbrenda@linux.ibm.com> Reviewed-by:
Janosch Frank <frankja@linux.ibm.com> Signed-off-by:
Claudio Imbrenda <imbrenda@linux.ibm.com>
-
- 21 Apr, 2022 15 commits
-
-
We don't want to re-enter the UV call on a cc > 1 for this test. Signed-off-by:
Janosch Frank <frankja@linux.ibm.com> Reviewed-by:
Nico Boehr <nrb@linux.ibm.com> Signed-off-by:
Claudio Imbrenda <imbrenda@linux.ibm.com>
-
Time to remove unneeded includes. Signed-off-by:
Janosch Frank <frankja@linux.ibm.com> Reviewed-by:
Claudio Imbrenda <imbrenda@linux.ibm.com> Signed-off-by:
Claudio Imbrenda <imbrenda@linux.ibm.com>
-
We don't use barriers so let's remove the include. Signed-off-by:
Janosch Frank <frankja@linux.ibm.com> Reviewed-by:
Claudio Imbrenda <imbrenda@linux.ibm.com> Signed-off-by:
Claudio Imbrenda <imbrenda@linux.ibm.com>
-
Most includes were related to allocation but that's done in the io allocation library so having them in the test doesn't make sense. Signed-off-by:
Janosch Frank <frankja@linux.ibm.com> Reviewed-by:
Claudio Imbrenda <imbrenda@linux.ibm.com> Signed-off-by:
Claudio Imbrenda <imbrenda@linux.ibm.com>
-
This file has way too much includes. Time to remove some. Signed-off-by:
Janosch Frank <frankja@linux.ibm.com> Reviewed-by:
Claudio Imbrenda <imbrenda@linux.ibm.com> Reviewed-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
Claudio Imbrenda <imbrenda@linux.ibm.com>
-
Time for some cleanup of the snippets to make them look like any other test file. Signed-off-by:
Janosch Frank <frankja@linux.ibm.com> Reviewed-by:
Claudio Imbrenda <imbrenda@linux.ibm.com> Signed-off-by:
Claudio Imbrenda <imbrenda@linux.ibm.com>
-
Let's make this test look a bit nicer. Signed-off-by:
Janosch Frank <frankja@linux.ibm.com> Reviewed-by:
Claudio Imbrenda <imbrenda@linux.ibm.com> Reviewed-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
Claudio Imbrenda <imbrenda@linux.ibm.com>
-
Other hypervisors might implement it and therefore not send a specification exception. Signed-off-by:
Janosch Frank <frankja@linux.ibm.com> Reviewed-by:
Claudio Imbrenda <imbrenda@linux.ibm.com> Reviewed-by:
Nico Boehr <nrb@linux.ibm.com> Signed-off-by:
Claudio Imbrenda <imbrenda@linux.ibm.com>
-
There's no guarantee that we even find a device at the address we're testing for if we're not running under QEMU. Signed-off-by:
Janosch Frank <frankja@linux.ibm.com> Reviewed-by:
Claudio Imbrenda <imbrenda@linux.ibm.com> Reviewed-by:
Nico Boehr <nrb@linux.ibm.com> Signed-off-by:
Claudio Imbrenda <imbrenda@linux.ibm.com>
-
In the future we'll likely need to check if we're hosted on QEMU so let's make this as easy as possible by providing a dedicated function. Signed-off-by:
Janosch Frank <frankja@linux.ibm.com> Reviewed-by:
Claudio Imbrenda <imbrenda@linux.ibm.com> Reviewed-by:
Nico Boehr <nrb@linux.ibm.com> Signed-off-by:
Claudio Imbrenda <imbrenda@linux.ibm.com>
-
Adjust the stop stopped CPU case such that it looks the same as the stop running CPU case: use the nowait variant, handle the error code in the same way and make the report messages look the same. Signed-off-by:
Nico Boehr <nrb@linux.ibm.com> Reviewed-by:
Janosch Frank <frankja@linux.ibm.com> Signed-off-by:
Claudio Imbrenda <imbrenda@linux.ibm.com>
-
mmu.h should come from the library includes Signed-off-by:
Nico Boehr <nrb@linux.ibm.com> Reviewed-by:
Thomas Huth <thuth@redhat.com> Reviewed-by:
Janosch Frank <frankja@linux.ibm.com> Signed-off-by:
Claudio Imbrenda <imbrenda@linux.ibm.com>
-
When we don't run in QEMU, we didn't push a prefix, hence pop won't work. Fix this by pushing the prefix before the QEMU check. Signed-off-by:
Nico Boehr <nrb@linux.ibm.com> Reviewed-by:
Thomas Huth <thuth@redhat.com> Reviewed-by:
Eric Farman <farman@linux.ibm.com> Signed-off-by:
Claudio Imbrenda <imbrenda@linux.ibm.com>
-
Add a test for SIGP STORE_ADDITIONAL_STATUS order. There are several cases to cover: - when neither vector nor guarded-storage facility is available, check the order is rejected. - when one of the facilities is there, test the order is rejected and adtl_status is not touched when the target CPU is running or when an invalid CPU address is specified. Also check the order is rejected in case of invalid alignment. - when the vector facility is there, write some data to the CPU's vector registers and check we get the right contents. - when the guarded-storage facility is there, populate the CPU's guarded-storage registers with some data and again check we get the right contents. To make sure we cover all these cases, adjust unittests.cfg to run the test with both guarded-storage and vector facility off and on. In TCG, we don't have guarded-storage support, so we just run with vector facility off and on. Signed-off-by:
Nico Boehr <nrb@linux.ibm.com> Signed-off-by:
Claudio Imbrenda <imbrenda@linux.ibm.com>
-
Move the guarded-storage related structs and instructions to a new header file because we will also need them for the SIGP store additional status tests. Signed-off-by:
Nico Boehr <nrb@linux.ibm.com> Reviewed-by:
Claudio Imbrenda <imbrenda@linux.ibm.com> Reviewed-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
Claudio Imbrenda <imbrenda@linux.ibm.com>
-
- 13 Apr, 2022 9 commits
-
-
Paolo Bonzini authored
Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Commit: 8cd86535 (x86: get rid of ring0stacktop) makes old test application trigger #DF. To fix the issue, refactored the code using run_in_user() which is adapted to the change well. Signed-off-by:
Yang Weijiang <weijiang.yang@intel.com> Message-Id: <20220406132446.32679-1-weijiang.yang@intel.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Make the pointers to the xAPIC and I/O APIC static as there are no users outside of apic.c. Opportunistically use #defines for the default values instead of open coding magic numbers. No functional change intended. Signed-off-by:
Sean Christopherson <seanjc@google.com> Message-Id: <20220121231852.1439917-9-seanjc@google.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Track the virtual function table to handle xAPIC vs. x2APIC on a per-cpu basis. Using a common global is racy as nothing in KUT synchronizes CPUs when switching to/from x2APIC. Signed-off-by:
Sean Christopherson <seanjc@google.com> Message-Id: <20220121231852.1439917-8-seanjc@google.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Replace spaces with tabs in apic.c. No functional change intended. Signed-off-by:
Sean Christopherson <seanjc@google.com> Message-Id: <20220121231852.1439917-7-seanjc@google.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Add helpers to read/write per-cpu data instead of open coding access with gs: and magic numbers. Keeping track of what offsets are used for what and by whom is a nightmare. No functional change intended. Signed-off-by:
Sean Christopherson <seanjc@google.com> Message-Id: <20220121231852.1439917-6-seanjc@google.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Replace spaces with tabs in smp.c, and opportunistically clean up a handful of minor coding style violations. No functional change intended. Signed-off-by:
Sean Christopherson <seanjc@google.com> Message-Id: <20220121231852.1439917-5-seanjc@google.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Replace spaces with tabs in smp.c, and opportunistically clean up a handful of minor coding style violations. No functional change intended. Signed-off-by:
Sean Christopherson <seanjc@google.com> Message-Id: <20220121231852.1439917-4-seanjc@google.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Load KUT's actual GS.base on VM-Entry and VM-Exit so that the VMX tests can access per-cpu data. A future commit will track xAPIC vs. x2APIC ops on a per-cpu basis. Signed-off-by:
Sean Christopherson <seanjc@google.com> Message-Id: <20220121231852.1439917-3-seanjc@google.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-