- 28 Sep, 2020 2 commits
-
-
Marc Hartmayer authored
Use the same test names in the TAP13 output as in the default output format. This makes the output more consistent. To achieve this, we need to pass the test name as an argument to the function `process_test_output`. Before this change: $ ./run_tests.sh PASS selftest-setup (14 tests) ... vs. $ ./run_tests.sh -t TAP version 13 ok 1 - selftest: true ok 2 - selftest: argc == 3 ... After this change: $ ./run_tests.sh PASS selftest-setup (14 tests) ... vs. $ ./run_tests.sh -t TAP version 13 ok 1 - selftest-setup: selftest: true ok 2 - selftest-setup: selftest: argc == 3 ... While at it, introduce a local variable `kernel` in `RUNTIME_log_stdout` since this makes the function easier to read. Signed-off-by:
Marc Hartmayer <mhartmay@linux.ibm.com> Message-Id: <20200825102036.17232-3-mhartmay@linux.ibm.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Reviewed-by:
Cornelia Huck <cohuck@redhat.com> Reviewed-by:
Thomas Huth <thuth@redhat.com>
-
Marc Hartmayer authored
Since commit 6e1d3752 ("tap13: list testcases individually") the comment is no longer valid. Therefore let's remove it. Reviewed-by:
Andrew Jones <drjones@redhat.com> Reviewed-by:
Cornelia Huck <cohuck@redhat.com> Signed-off-by:
Marc Hartmayer <mhartmay@linux.ibm.com> Message-Id: <20200825102036.17232-2-mhartmay@linux.ibm.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- 25 Sep, 2020 2 commits
-
-
Thomas Huth authored
Travis already has an environment variable that points to the top of the checked-out source code, TRAVIS_BUILD_DIR. We can use it to avoid the guessing of the right location of the configure script. Signed-off-by:
Thomas Huth <thuth@redhat.com> Message-Id: <20200925071147.149406-1-thuth@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
-m16 option is available only since GCC 4.9.0 [1]. That causes a build failure on centos-7 [2] that has GCC 4.8.5. Fallback to -m32 if -m16 is not available. 1. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59672 2. https://gitlab.com/bonzini/kvm-unit-tests/-/jobs/755368387 Fixes: 2616ad93 ("x86: realmode: Workaround clang issues") Reported-by:
Roman Bolshakov <r.bolshakov@yadro.com> [Commit message by Roman Bolshakov, patch redone. - Paolo] Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- 24 Sep, 2020 2 commits
-
-
Roman Bolshakov authored
clang doesn't properly support .code16gcc and generates wrong machine code [1][2][3][4]. But the test works if object file is compiled with -m16 and explicit suffixes are added for instructions. 1. https://lore.kernel.org/kvm/4d20fbce-d247-abf4-3ceb-da2c0d48fc50@redhat.com/ 2. https://lore.kernel.org/kvm/20200915155959.GF52559@SPB-NB-133.local/ 3. https://lore.kernel.org/kvm/788b7191-6987-9399-f352-2e661255157e@redhat.com/ 4. https://lore.kernel.org/kvm/20200922212507.GA11460@SPB-NB-133.local/ Suggested-by:
Thomas Huth <thuth@redhat.com> Suggested-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Roman Bolshakov <r.bolshakov@yadro.com> Message-Id: <20200924120516.77299-1-r.bolshakov@yadro.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Roman Bolshakov authored
83760814 ("configure: Check for new-enough getopt") has replaced proposed patch and doesn't introduce --getopt option in configure. Instead, `configure` and `run_tests.sh` expect proper getopt to be available in PATH. Signed-off-by:
Roman Bolshakov <r.bolshakov@yadro.com> Message-Id: <20200924100613.71136-1-r.bolshakov@yadro.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- 23 Sep, 2020 1 commit
-
-
Thomas Huth authored
The enhanced getopt is now not selected with a configure switch anymore, but by setting the PATH to the right location. Signed-off-by:
Thomas Huth <thuth@redhat.com> Message-Id: <20200923073931.74769-1-thuth@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- 22 Sep, 2020 12 commits
-
-
Roman Bolshakov authored
.gitlab-ci.yml already has a job to build the tests with clang but it's not clear how to set it up on a personal github repo. NB, realmode test is disabled because it fails immediately after start if compiled with clang-10. Signed-off-by:
Roman Bolshakov <r.bolshakov@yadro.com> Message-Id: <20200901085056.33391-11-r.bolshakov@yadro.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Roman Bolshakov authored
jobs keyword is used throughout Travis documentation and matrix is an alias for it (according to Travis config validation): root: key matrix is an alias for jobs, using jobs At first glance it's not clear if they're the same and if jobs documentation applies to matrix. Changing keyword name should make it obvious. While at it, fix the Travis config warning: root: deprecated key sudo (The key `sudo` has no effect anymore.) Signed-off-by:
Roman Bolshakov <r.bolshakov@yadro.com> Message-Id: <20200901085056.33391-10-r.bolshakov@yadro.com> Tested-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Roman Bolshakov authored
Build the tests on macOS and test TCG. HVF doesn't work in travis. sieve tests pass but they might timeout in travis, they were left out because of that. Suggested-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
Roman Bolshakov <r.bolshakov@yadro.com> Message-Id: <20200901085056.33391-9-r.bolshakov@yadro.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Roman Bolshakov authored
Pre-built cross-compilers for x86 are available in homebrew and can be used to build the tests. Cc: Cameron Esfahani <dirty@apple.com> Signed-off-by:
Roman Bolshakov <r.bolshakov@yadro.com> Message-Id: <20200901085056.33391-8-r.bolshakov@yadro.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
macOS is shipped with an old non-enhanced version of getopt and it doesn't support options used by run_tests.sh. Proper version of getopt is available from homebrew but it has to be added to PATH before invoking run_tests.sh. Halt ./configure if enhanced getopt can't be found. Based on a patch by Roman Bolshakov <r.bolshakov@yadro.com>. Cc: Cameron Esfahani <dirty@apple.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Roman Bolshakov authored
Compilation of the files fails on ARCH=i386 with i686-elf gcc because they use "%x" or "%d" format specifier that does not match the actual size of uint32_t: x86/s3.c: In function ‘main’: x86/s3.c:53:35: error: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘u32’ {aka ‘long unsigned int’} [-Werror=format=] 53 | printf("PM1a event registers at %x\n", fadt->pm1a_evt_blk); | ~^ ~~~~~~~~~~~~~~~~~~ | | | | | u32 {aka long unsigned int} | unsigned int | %lx Use PRIx32 instead of "x" and PRId32 instead of "d" to take into account u32_long case. Cc: Alex Bennée <alex.bennee@linaro.org> Cc: Andrew Jones <drjones@redhat.com> Cc: Cameron Esfahani <dirty@apple.com> Signed-off-by:
Roman Bolshakov <r.bolshakov@yadro.com> Message-Id: <20200901085056.33391-6-r.bolshakov@yadro.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Roman Bolshakov authored
x86/vmx_tests.c depends on the kernel header and can't be compiled otherwise on x86_64-elf gcc on macOS. Cc: Jim Mattson <jmattson@google.com> Cc: Peter Shier <pshier@google.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Cameron Esfahani <dirty@apple.com> Reviewed-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
Roman Bolshakov <r.bolshakov@yadro.com> Message-Id: <20200901085056.33391-5-r.bolshakov@yadro.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Roman Bolshakov authored
link spec [1][2] is empty on x86_64-elf-gcc, i.e. -m32 is not propogated to the linker as "-m elf_i386" and that causes the error: /usr/local/opt/x86_64-elf-binutils/bin/x86_64-elf-ld: i386 architecture of input file `x86/realmode.o' is incompatible with i386:x86-64 output 1. https://gcc.gnu.org/onlinedocs/gcc/Spec-Files.html 2. https://gcc.gnu.org/onlinedocs/gccint/Driver.html Cc: Cameron Esfahani <dirty@apple.com> Reviewed-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
Roman Bolshakov <r.bolshakov@yadro.com> Message-Id: <20200901085056.33391-4-r.bolshakov@yadro.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Roman Bolshakov authored
There are three kinds of x86 prefix delimiters in GNU binutils: '/', '\\' and a space. The first works on Linux and few other platforms. The second one is SVR-4 compatible and works on the generic elf target. The last kind is universal and works everywhere, it's also used in the GAS manual [1]. Space delimiters fix the build errors on x86_64-elf binutils: x86/cstart64.S:217: Error: invalid character '/' in mnemonic x86/cstart64.S:313: Error: invalid character '/' in mnemonic 1. https://sourceware.org/binutils/docs/as/i386_002dPrefixes.html Cc: Cameron Esfahani <dirty@apple.com> Reviewed-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
Roman Bolshakov <r.bolshakov@yadro.com> Message-Id: <20200901085056.33391-3-r.bolshakov@yadro.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Roman Bolshakov authored
For compatibility with other SVR4 assemblers, '/' starts a comment on *-elf binutils target and thus division operator is not allowed [1][2]. That breaks cstart64.S build: x86/cstart64.S: Assembler messages: x86/cstart64.S:294: Error: unbalanced parenthesis in operand 1. configure should detect if --divide needs to be passed to assembler by compiling a small snippet where division is used inside parentheses. 1. https://sourceware.org/binutils/docs/as/i386_002dChars.html 2. https://sourceware.org/binutils/docs/as/i386_002dOptions.html#index-_002d_002ddivide-option_002c-i386 Cc: Cameron Esfahani <dirty@apple.com> Signed-off-by:
Roman Bolshakov <r.bolshakov@yadro.com> Message-Id: <20200901085056.33391-2-r.bolshakov@yadro.com> Reviewed-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Krish Sadhukhan authored
According to section "UNRESTRICTED GUESTS" in SDM vol 3c, if the "unrestricted guest" secondary VM-execution control is set, guests can run in unpaged protected mode or in real mode. This patch tests vmentry of an unrestricted guest in unpaged protected mode. Signed-off-by:
Jim Mattson <jmattson@google.com> Signed-off-by:
Krish Sadhukhan <krish.sadhukhan@oracle.com> Message-Id: <20200921081027.23047-4-krish.sadhukhan@oracle.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Krish Sadhukhan authored
According to section "Checks on Guest Segment Registers" in Intel SDM vol 3C, the following checks are performed on the Guest Segment Registers on vmentry of nested guests: Selector fields: — TR. The TI flag (bit 2) must be 0. — LDTR. If LDTR is usable, the TI flag (bit 2) must be 0. — SS. If the guest will not be virtual-8086 and the "unrestricted guest" VM-execution control is 0, the RPL (bits 1:0) must equal the RPL of the selector field for CS.1 Base-address fields: — CS, SS, DS, ES, FS, GS. If the guest will be virtual-8086, the address must be the selector field shifted left 4 bits (multiplied by 16). — The following checks are performed on processors that support Intel 64 architecture: TR, FS, GS. The address must be canonical. LDTR. If LDTR is usable, the address must be canonical. CS. Bits 63:32 of the address must be zero. SS, DS, ES. If the register is usable, bits 63:32 of the address must be zero. Signed-off-by:
Krish Sadhukhan <krish.sadhukhan@oracle.com> Message-Id: <20200921081027.23047-3-krish.sadhukhan@oracle.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- 20 Sep, 2020 1 commit
-
-
https://gitlab.com/frankja/kvm-unit-testsPaolo Bonzini authored
* Added first Ultravisor tests * Added SKRF key in PSW test * Added custom program exception cleanup hook
-
- 11 Sep, 2020 2 commits
-
-
Peter Shier authored
Verify that when L2 guest enables PAE paging and L0 intercept of L2 MOV to CR0 reflects MTF exit to L1, subsequent resume to L2 correctly preserves PDPTE array specified by L2 CR3. Signed-off-by:
Jim Mattson <jmattson@google.com> Reviewed-by:
Peter Shier <pshier@google.com> Signed-off-by:
Peter Shier <pshier@google.com> Message-Id: <20200819205633.1393378-1-pshier@google.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Krish Sadhukhan authored
If the P (present) bit in an NPT entry is cleared, accesses to the corresponding guest physical address will fail and the guest will exit to the host with an exit code of 0x400 (#NPF). The test checks for bits 2 and 32 to be set (respectively because all NPT accesses are considered user accesses, and because the test encounters the P=0 entry while translating the final guest physical address and not a guest page table. Signed-off-by:
Krish Sadhukhan <krish.sadhukhan@oracle.com> Message-Id: <20200829005720.5325-1-krish.sadhukhan@oracle.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- 04 Sep, 2020 12 commits
-
-
Thomas Huth authored
We should also test our build with older versions of Bash and Gcc (at least the versions which we still want to support). CentOS 7 should be a reasonable base for such tests. Signed-off-by:
Thomas Huth <thuth@redhat.com> Message-Id: <20200731091548.8302-1-thuth@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Jingyi Wang authored
For we get the time duration of (10msec timer + injection latency) in timer_exec(), we substract the value of 10msec in timer_post() to get the actual latency. Signed-off-by:
Jingyi Wang <wangjingyi11@huawei.com> [ Adapt to the modified post() interface. ] Signed-off-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Jingyi Wang authored
Under certain circumstances, we need to further process microbench test results, so we add test->post() in the microbench framework, later patch will use that. Signed-off-by:
Jingyi Wang <wangjingyi11@huawei.com> [ Drop total_ns from post() input arguments. ] Signed-off-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Jingyi Wang authored
Trigger PPIs by setting up a 10msec timer and test the latency. Signed-off-by:
Jingyi Wang <wangjingyi11@huawei.com> [ Replaced GICv3 assumption in timer_prep() with switch on gic_version() ] Signed-off-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Jingyi Wang authored
Besides using separate running times parameter, we add time limit for loop_test to make sure each test should be done in a certain time(5 sec here). Signed-off-by:
Jingyi Wang <wangjingyi11@huawei.com> Reviewed-by:
Eric Auger <eric.auger@redhat.com> [ Initialize total_ns to zero. ] Signed-off-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Jingyi Wang authored
For some test in micro-bench can be time consuming, we add a micro-bench test parameter to allow each individual test to specify its running times. Signed-off-by:
Jingyi Wang <wangjingyi11@huawei.com> Reviewed-by:
Eric Auger <eric.auger@redhat.com> Signed-off-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Jingyi Wang authored
Triggers LPIs through the INT command and test the latency. Mostly inherited form commit 0ef02cd6 (arm/arm64: ITS: INT functional tests). Signed-off-by:
Jingyi Wang <wangjingyi11@huawei.com> Reviewed-by:
Eric Auger <eric.auger@redhat.com> Signed-off-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Jingyi Wang authored
Because micro-bench may send a large number of ITS commands, we should handle ITS command queue wrapping as kernel instead of just failing the test. Signed-off-by:
Jingyi Wang <wangjingyi11@huawei.com> Reviewed-by:
Eric Auger <eric.auger@redhat.com> Signed-off-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Jingyi Wang authored
If gicv4.1(sgi hardware injection) is supported in kvm, we test ipi injection via hw/sw way separately. Signed-off-by:
Jingyi Wang <wangjingyi11@huawei.com> Signed-off-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Jingyi Wang authored
Later patches will use these functions for gic(ipi/lpi/timer) tests. Signed-off-by:
Jingyi Wang <wangjingyi11@huawei.com> Reviewed-by:
Eric Auger <eric.auger@redhat.com> Signed-off-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Jingyi Wang authored
If ipi_exec() fails because of timeout, we shouldn't increase the number of ipi received. Signed-off-by:
Jingyi Wang <wangjingyi11@huawei.com> Reviewed-by:
Eric Auger <eric.auger@redhat.com> Signed-off-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Andrew Jones authored
The timer can be useful for other tests besides the timer test. Extract the DT parsing of the irqs out of the timer test into setup and provide them along with some defines in a new timer.h file. Signed-off-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- 11 Aug, 2020 1 commit
-
-
Janosch Frank authored
Test the error conditions of guest 2 Ultravisor calls, namely: * Query Ultravisor information * Set shared access * Remove shared access Signed-off-by:
Janosch Frank <frankja@linux.ibm.com> Reviewed-by:
Claudio Imbrenda <imbrenda@linux.ibm.com> Acked-by:
Thomas Huth <thuth@redhat.com> Acked-by:
Cornelia Huck <cohuck@redhat.com> Message-Id: <20200810154541.32974-1-frankja@linux.ibm.com> Signed-off-by:
Janosch Frank <frankja@linux.ibm.com>
-
- 10 Aug, 2020 2 commits
-
-
Janosch Frank authored
When an exception new psw with a storage key in its mask is loaded from lowcore, a specification exception is raised. This differs from the behavior when trying to execute skey related instructions, which will result in special operation exceptions. Also let's add the test to unittests.cfg so it is run more often. Signed-off-by:
Janosch Frank <frankja@linux.ibm.com> Reviewed-by:
Claudio Imbrenda <imbrenda@linux.ibm.com> Reviewed-by:
Thomas Huth <thuth@redhat.com> Acked-by:
Cornelia Huck <cohuck@redhat.com> Message-Id: <20200807111555.11169-3-frankja@linux.ibm.com> Signed-off-by:
Janosch Frank <frankja@linux.ibm.com>
-
Janosch Frank authored
Sometimes we need to do cleanup which we don't necessarily want to add to interrupt.c, so let's add a way to register a cleanup function. Signed-off-by:
Janosch Frank <frankja@linux.ibm.com> Reviewed-by:
Claudio Imbrenda <imbrenda@linux.ibm.com> Reviewed-by:
Thomas Huth <thuth@redhat.com> Reviewed-by:
Cornelia Huck <cohuck@redhat.com> Message-Id: <20200807111555.11169-2-frankja@linux.ibm.com> Signed-off-by:
Janosch Frank <frankja@linux.ibm.com>
-
- 09 Aug, 2020 1 commit
-
-
https://github.com/frankjaa/kvm-unit-testsPaolo Bonzini authored
* IO tests from Pierre * GCC 10 compile fix from Claudio * CPU model test fix from Thomas
-
- 01 Aug, 2020 2 commits
-
-
For we get the time duration of (10msec timer + injection latency) in timer_exec(), we substract the value of 10msec in timer_post() to get the actual latency. Signed-off-by:
Jingyi Wang <wangjingyi11@huawei.com> [ Adapt to the modified post() interface. ] Signed-off-by:
Andrew Jones <drjones@redhat.com>
-
Under certain circumstances, we need to further process microbench test results, so we add test->post() in the microbench framework, later patch will use that. Signed-off-by:
Jingyi Wang <wangjingyi11@huawei.com> [ Drop total_ns from post() input arguments. ] Signed-off-by:
Andrew Jones <drjones@redhat.com>
-