- 13 Jun, 2017 8 commits
-
-
Andrew Jones authored
Provide an easy way for test runners to run all tests, even those guarded by an erratum. Setting ERRATA_FORCE forces errata() and errata_relaxed() to always return true. ./run_tests.sh -a is also updated to set it. Signed-off-by:
Andrew Jones <drjones@redhat.com> Reviewed-by:
Laurent Vivier <lvivier@redhat.com> Signed-off-by:
Radim Krčmář <rkrcmar@redhat.com>
-
Andrew Jones authored
Signed-off-by:
Andrew Jones <drjones@redhat.com> Reviewed-by:
Laurent Vivier <lvivier@redhat.com> Signed-off-by:
Radim Krčmář <rkrcmar@redhat.com>
-
Andrew Jones authored
Provide a table mapping errata to minimum kernel versions and a function that will use the host's kernel version to determine the values for each errata variable. These errata variables, with values based on the host kernel, are now provided to all unit tests by default, if no environ is provided. Errata variables passed from the run script environment still take precedence. Signed-off-by:
Andrew Jones <drjones@redhat.com> Reviewed-by:
Laurent Vivier <lvivier@redhat.com> Signed-off-by:
Radim Krčmář <rkrcmar@redhat.com>
-
Andrew Jones authored
x86/run will need to start looking at config vars with the next patch. Signed-off-by:
Andrew Jones <drjones@redhat.com> Reviewed-by:
Laurent Vivier <lvivier@redhat.com> Signed-off-by:
Radim Krčmář <rkrcmar@redhat.com>
-
Andrew Jones authored
Allow the run script environment to provide ERRATA_* variables to the unit tests. These variables will augment/override variables in any provided unit test environ (the file specified with $ENV) or trigger the creation of a temporary environ file, which contains them. Now something like ERRATA_abcd01234567=y ./run_tests.sh may be run in order to inform all unit tests that they may execute all subtests guarded by ERRATA_abcd01234567. Signed-off-by:
Andrew Jones <drjones@redhat.com> Reviewed-by:
Laurent Vivier <lvivier@redhat.com> Signed-off-by:
Radim Krčmář <rkrcmar@redhat.com>
-
Andrew Jones authored
Encapsulate the preparation of the optional initrd command line option. Signed-off-by:
Andrew Jones <drjones@redhat.com> Reviewed-by:
Laurent Vivier <lvivier@redhat.com> Signed-off-by:
Radim Krčmář <rkrcmar@redhat.com>
-
Thomas Huth authored
Certain CPU instructions will cause an exit of the virtual machine. Run some of these instructions to check whether they are emulated right by KVM (or QEMU). Reviewed-by:
David Hildenbrand <david@redhat.com> Signed-off-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
Radim Krčmář <rkrcmar@redhat.com>
-
Paolo Bonzini authored
- Add a 16-bit code and data segment to cstart.S. - Move ring 3 segment descriptors at the end of the GDT, and lay them out as required by syscall/sysret in cstart64.S. - Only define TSS_INTR for 32-bit, and place it where cstart64.S puts the 32-bit ring 0 segment. - Document that the same data segment can be used for 32 and 64-bit code. - Mark all descriptors as accessed. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Radim Krčmář <rkrcmar@redhat.com>
-
- 08 Jun, 2017 2 commits
-
-
Thomas Huth authored
When building the kvm-unit-tests for s390x in parallel ("make -j10" for example), the build sometimes fails since asm-offsets.h has not been generated yet. The problem is a bad rule in the Makefile: The test cases are stored in the the "tests" variable, and not in "test_cases" (which is just an abstract target, not a variable). Signed-off-by:
Thomas Huth <thuth@redhat.com> Reviewed-by:
David Hildenbrand <david@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Thomas Huth authored
asm-offsets.h and asm-offsets.s are generated files, they should always be ignored by git. Signed-off-by:
Thomas Huth <thuth@redhat.com> Reviewed-by:
David Hildenbrand <david@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- 07 Jun, 2017 4 commits
-
-
Andrew Jones authored
Signed-off-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Radim Krčmář <rkrcmar@redhat.com>
-
Andrew Jones authored
on_cpu() and friends are a bit risky when implemented without IPIs (no preemption), because we can easily get deadlocks. Luckily, it's also easy to detect those deadlocks, and assert, to at least make them easier to debug. Signed-off-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Radim Krčmář <rkrcmar@redhat.com>
-
Andrew Jones authored
Unless cpu0 code explicitly calls do_idle(), then it never will, and thus any on_cpu(0, ...) calls will hang. Let's assume that if cpu0 hasn't already called do_idle() that the on_cpu(0, ...) call from a secondary CPU was a programming error and assert. However, it's possible the developer intends cpu0 to call do_idle later, so give the developer a chance to disable the assert too. Also, while cpu0 is special, it's not that special. It shouldn't be the only CPU that can call on_cpus(). Finally, let's not mess with cpu0's idle state in on_cpus(), as this could potentially confuse another CPU that's checking it. Signed-off-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Radim Krčmář <rkrcmar@redhat.com>
-
Laurent Vivier authored
Add a test using get-time-of-day to check "-rtc base=XXXX-XX-XX" is correct. Signed-off-by:
Laurent Vivier <lvivier@redhat.com> Reviewed-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
Radim Krčmář <rkrcmar@redhat.com>
-
- 06 Jun, 2017 4 commits
-
-
David Matlack authored
Signed-off-by:
David Matlack <dmatlack@google.com> Signed-off-by:
Radim Krčmář <rkrcmar@redhat.com>
-
David Matlack authored
posix_memalign returns zero on success and an errno value otherwise. The value of the global variable "errno" is actually indeterminiate after a call to posix_memalign(), according to the man page. This patch also fixes the compilation errors: api/dirty-log.cc:55:50: error: ignoring return value of ‘int posix_memalign(void**, size_t, size_t)’, declared with attribute warn_unused_result [-Werror=unused-result] posix_memalign(&logged_slot_virt, 4096, 4096); api/identity.cc:23:41: error: ignoring return value of ‘int posix_memalign(void**, size_t, size_t)’, declared with attribute warn_unused_result [-Werror=unused-result] posix_memalign(&tss, 4096, 4 * 4096); Signed-off-by:
David Matlack <dmatlack@google.com> Signed-off-by:
Radim Krčmář <rkrcmar@redhat.com>
-
David Matlack authored
Fix the following two compilation errors: x86/msr.c: In function ‘test_msr_rw’: x86/msr.c:94:5: error: format not a string literal and no format arguments [-Werror=format-security] report(sptr, expected == r); ^ x8e/vmx.c: In function ‘test_vmx_caps’: x86/vmx.c:1412:3: error: format not a string literal and no format arguments [-Werror=format-security] report(vmx_ctl_msr[n].name, ok); ^ Signed-off-by:
David Matlack <dmatlack@google.com> Signed-off-by:
Radim Krčmář <rkrcmar@redhat.com>
-
Andrew Jones authored
Also update copyrights. Reported-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
Andrew Jones <drjones@redhat.com> [Amend two other "Adapated" typos as well.] Signed-off-by:
Radim Krčmář <rkrcmar@redhat.com>
-
- 02 Jun, 2017 1 commit
-
-
Andrew Jones authored
I like the good ol' days of teletypes, but not that much... Signed-off-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Radim Krčmář <rkrcmar@redhat.com>
-
- 01 Jun, 2017 3 commits
-
-
Andrew Jones authored
Also base on on_cpu_async() to allow it to be called more than once. Signed-off-by:
Andrew Jones <drjones@redhat.com> Message-Id: <20170601135002.26704-4-drjones@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Andrew Jones authored
x86 has two smp functions on_cpu() and on_cpu_async(). These are nice because we can run them more than once on cpus. This patch adds the same API to ARM, but the target cpu requirements are not the same. While on x86 the interrupt controller must be enabled enough to send/receive IPIs and the target cpu must have interrupts enabled (or be expected to enable them), on ARM we do not use IPIs, so the GIC does not need to be enabled and cpus do not need to register irq handlers nor enable interrupts. Instead, target cpus are expected to be powered off or idle. The advantage of the ARM approach is the lack of interrupt handling dependencies. The disadvantage is the lack of preemption - even on_cpu_async() must wait for the target cpu to be idle first. Signed-off-by:
Andrew Jones <drjones@redhat.com> Message-Id: <20170601135002.26704-3-drjones@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Andrew Jones authored
Also prepare the newly renamed function to come out of idle and use sev/wfe rather than a busy wait in smp_run(). Signed-off-by:
Andrew Jones <drjones@redhat.com> Message-Id: <20170601135002.26704-2-drjones@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- 31 May, 2017 3 commits
-
-
David Hildenbrand authored
The program interrupt handler will detect unexpected program interrupts and allow to expect + verify program interrupts for testing purposes. We need "-fno-delete-null-pointer-checks", otherwise trying to access the lowcore at address 0 makes GCC generate very weird code. Add two tests to test for simple operation and addressing exceptions. Signed-off-by:
David Hildenbrand <david@redhat.com> Message-Id: <20170531123925.4547-3-david@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
David Hildenbrand authored
Add the s390x psw and lowcore structs and generate asm offsets for lowcore fields. Add all lowcore fields defined in the current PoP (z13). Reviewed-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
David Hildenbrand <david@redhat.com> Message-Id: <20170531123925.4547-2-david@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Thomas Huth authored
RTAS tokens can have any value, also 0xffffffff is theoretically allowed (which is currently used for the RTAS_UNKNOWN_SERVICE error code). Thus we should not mix error codes and tokens in the return value here and return the token value via a pointer parameter instead. This patch also adds a check to rtas_token() to test whether the device tree is available at all. This fixes a possible endless loop that happens without device tree, spamming the console with "rtas_node: /rtas: FDT_ERR_BADMAGIC" messages: Somewhere the code calls abort() due to the missing device tree, and abort() calls exit() which in turn tries to shut down the VM with rtas_power_off(). rtas_power_off() needs the device tree again to look up the right RTAS token, where we then end up in the next iteration. Signed-off-by:
Thomas Huth <thuth@redhat.com> Message-Id: <1496229338-7113-1-git-send-email-thuth@redhat.com> Reviewed-by:
Andrew Jones <drjones@redhat.com> Reviewed-by:
Laurent Vivier <lvivier@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- 30 May, 2017 3 commits
-
-
Andrew Jones authored
Eventually we'll allow calling functions on cpus more than once, to allow multiple subtests to run in a single execution. But that'll only work if the subtests don't halt the cpus... Signed-off-by:
Andrew Jones <drjones@redhat.com> Message-Id: <20170529135804.22891-4-drjones@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Andrew Jones authored
Signed-off-by:
Andrew Jones <drjones@redhat.com> Message-Id: <20170529135804.22891-3-drjones@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Andrew Jones authored
It's tempting to try running smp_run() more than once, but that won't currently work. In the meantime, let's fail better. Also, there's no reason to expose the structure in smp.h Signed-off-by:
Andrew Jones <drjones@redhat.com> Message-Id: <20170529135804.22891-2-drjones@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- 26 May, 2017 7 commits
-
-
David Hildenbrand authored
Add Thomas and myself as maintainers for now. Acked-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
David Hildenbrand <david@redhat.com> Message-Id: <20170522085702.17856-8-david@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
David Hildenbrand authored
Let's also add the brand new s390x version. Signed-off-by:
David Hildenbrand <david@redhat.com> Message-Id: <20170522085702.17856-7-david@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
David Hildenbrand authored
Now the basics should be working and therefore the self test should pass. Reviewed-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
David Hildenbrand <david@redhat.com> Message-Id: <20170522085702.17856-6-david@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
David Hildenbrand authored
We can reuse strlen and memcpy. __pa(x) is already defined in page.h We don't have (and need) defines for error values and consuming sclp irqs is not required, as we won't be passing control to some other OS. Signed-off-by:
David Hildenbrand <david@redhat.com> Message-Id: <20170522085702.17856-5-david@redhat.com> Reviewed-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
David Hildenbrand authored
The s390x-ccw pcbios already has what we need to print to the sclp console. Let's copy the files and adjust them to our needs later. Signed-off-by:
David Hildenbrand <david@redhat.com> Message-Id: <20170522085702.17856-4-david@redhat.com> Reviewed-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
David Hildenbrand authored
Test if the general infrastructure is working. The test will fail until we have proper sclp console output. Signed-off-by:
David Hildenbrand <david@redhat.com> Message-Id: <20170522085702.17856-3-david@redhat.com> Reviewed-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
David Hildenbrand authored
This adds the very basic infrastructure for s390x. As we compile for z900, also QEMU tcg can be used. To cross compile: $./configure --arch=s390x --cross-prefix=/usr/bin/s390x-linux-gnu- $ make Please note that for now, nothing will be compiled, as there is no test to compile. A basic self test will be added in the following patches. smp and stack unwinding is not supported yet. sclp console output will be added in the following patches. Parts based on a prototype by Thomas Huth. Reviewed-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
David Hildenbrand <david@redhat.com> Message-Id: <20170522085702.17856-2-david@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- 25 May, 2017 5 commits
-
-
Andrew Jones authored
Signed-off-by:
Andrew Jones <drjones@redhat.com> Message-Id: <20170522181821.29482-3-drjones@redhat.com> Reviewed-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Andrew Jones authored
Signed-off-by:
Andrew Jones <drjones@redhat.com> Message-Id: <20170522181821.29482-2-drjones@redhat.com> Reviewed-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Alex Bennée authored
The configure script will happily default to cortex-a15 even when running on a cortex-a7. This runs into problems when running KVM on common dev boards as we should be using the "host" processor. Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Message-Id: <20170518160208.9674-3-alex.bennee@linaro.org> Reviewed-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Alex Bennée authored
Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Message-Id: <20170518160208.9674-2-alex.bennee@linaro.org> Reviewed-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Andrew Jones authored
Signed-off-by:
Andrew Jones <drjones@redhat.com> Message-Id: <20170525102849.22754-7-drjones@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-