- Jun 10, 2021
-
-
Jacob Xu authored
When compiled with clang, the following statement gets converted into a movaps instructions. mem->u[0] = 5; mem->u[1] = 6; mem->u[2] = 7; mem->u[3] = 8; Since mem is an unaligned pointer to sse_union, we get a GP when running. Let's avoid using a pointer to sse_union at all, since doing so implies that the pointer is aligned to 128 bits. Fixes: e5e76263 ("x86: add additional test cases for sse exceptions to emulator.c") Signed-off-by:
Jacob Xu <jacobhxu@google.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20210511015016.815461-1-jacobhxu@google.com>
-
Nadav Amit authored
Old Intel CPUs, which do not support control protection exception, do not expect an error code for #CP, while new ones expect an error-code. Intel SDM does not say that the delivery of an error-code for #CP is conditional on anything, not even CPU support of CET. So it appears that the correct testing is just to skip the error-code delivery test for the #CP exception. Signed-off-by:
Nadav Amit <nadav.amit@gmail.com> Message-Id: <20210609182945.36849-9-nadav.amit@gmail.com>
-
Nadav Amit authored
x86's PMU tests are not compatible with version 1. Instead of finding how to adapt them, just skip them if the PMU version is too old. Signed-off-by:
Nadav Amit <nadav.amit@gmail.com> Message-Id: <20210609182945.36849-8-nadav.amit@gmail.com>
-
Nadav Amit authored
The syscall TF-test runs syscall on 32-bit mode, which is unsupported by Intel. As a result, if the test is executed on non-KVM environment and the system does not have AMD CPU, the test crashes. Skip the test in such case. Signed-off-by:
Nadav Amit <nadav.amit@gmail.com> Message-Id: <20210609182945.36849-7-nadav.amit@gmail.com>
-
Nadav Amit authored
Skip the hyperv-clock tests if time reference counter is unsupported by the host, similarly to the way other hyperv tests first check support of the host. Signed-off-by:
Nadav Amit <nadav.amit@gmail.com> Message-Id: <20210609182945.36849-6-nadav.amit@gmail.com>
-
Nadav Amit authored
KVM knows to emulate both vmcall and vmmcall regardless of the actual architecture. Native hardware does not behave this way. Based on the availability of test-device, figure out that the test is run on non-KVM environment, and if so, run vmcall/vmmcall based on the actual architecture. Signed-off-by:
Nadav Amit <nadav.amit@gmail.com> Message-Id: <20210609182945.36849-5-nadav.amit@gmail.com>
-
Nadav Amit authored
When APIC IDs are not allocated consecutively, smptest fails. Fix it by using id_map, which maps CPU numbers to their apic-IDs. Signed-off-by:
Nadav Amit <nadav.amit@gmail.com> Message-Id: <20210609182945.36849-4-nadav.amit@gmail.com>
-
Nadav Amit authored
When tsx-ctrl tests are skipped due to lack of hardware support, they are not reported as skipped. Fix it. Signed-off-by:
Nadav Amit <nadav.amit@gmail.com> Message-Id: <20210609182945.36849-3-nadav.amit@gmail.com>
-
Nadav Amit authored
If there are no test devices, we might be running on bare-metal or other environment, in which port 0xF4, which reports the test result, is not monitored. In such environments, print also the result of the test to the serial console. For realmode: just give a simple indication whether the test passed or failed in a similar fashion. This can allow automation tools to figure out the test is done and its result. Signed-off-by:
Nadav Amit <nadav.amit@gmail.com> Message-Id: <20210609182945.36849-2-nadav.amit@gmail.com>
-
Cornelia Huck authored
Standardize header guards to _ASMX86_HEADER_H_, _X86_HEADER_H_, and X86_HEADER_H. Signed-off-by:
Cornelia Huck <cohuck@redhat.com> Reviewed-by:
David Hildenbrand <david@redhat.com> Message-Id: <20210609143712.60933-8-cohuck@redhat.com>
-
Cornelia Huck authored
Standardize header guards to _ASMS390X_HEADER_H_, _S390X_HEADER_H_, and S390X_HEADER_H, respectively. Signed-off-by:
Cornelia Huck <cohuck@redhat.com> Reviewed-by:
David Hildenbrand <david@redhat.com> Message-Id: <20210609143712.60933-7-cohuck@redhat.com>
-
Cornelia Huck authored
Only spapr.h needed a tweak. Signed-off-by:
Cornelia Huck <cohuck@redhat.com> Reviewed-by:
David Hildenbrand <david@redhat.com> Reviewed-by:
Laurent Vivier <lvivier@redhat.com> Message-Id: <20210609143712.60933-6-cohuck@redhat.com>
-
Cornelia Huck authored
The assembler.h files were the only ones not already following the convention. Signed-off-by:
Cornelia Huck <cohuck@redhat.com> Reviewed-by:
David Hildenbrand <david@redhat.com> Message-Id: <20210609143712.60933-5-cohuck@redhat.com>
-
Cornelia Huck authored
Standardize header guards to _ASM_GENERIC_HEADER_H_. Signed-off-by:
Cornelia Huck <cohuck@redhat.com> Reviewed-by:
David Hildenbrand <david@redhat.com> Reviewed-by:
Laurent Vivier <lvivier@redhat.com> Message-Id: <20210609143712.60933-4-cohuck@redhat.com>
-
Cornelia Huck authored
Standardize header guards to _LIB_HEADER_H_. Signed-off-by:
Cornelia Huck <cohuck@redhat.com> Reviewed-by:
David Hildenbrand <david@redhat.com> Message-Id: <20210609143712.60933-3-cohuck@redhat.com>
-
Cornelia Huck authored
Signed-off-by:
Cornelia Huck <cohuck@redhat.com> Reviewed-by:
David Hildenbrand <david@redhat.com> Reviewed-by:
Laurent Vivier <lvivier@redhat.com> Message-Id: <20210609143712.60933-2-cohuck@redhat.com>
-
Siddharth Chandrasekaran authored
Add make target to generate ctags tags file and add it to .gitignore. Signed-off-by:
Siddharth Chandrasekaran <sidcha@amazon.de> Message-Id: <20210610113128.5418-1-sidcha@amazon.de> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Siddharth Chandrasekaran authored
KVM module parameter force_emulation_prefix is misspelled with a "forced"; fix it. Signed-off-by:
Siddharth Chandrasekaran <sidcha@amazon.de> Message-Id: <20210609140217.1514-3-sidcha@amazon.de> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Jun 08, 2021
-
-
Po-Hsu Lin authored
Compilation on Ubuntu Xenial 4.4.0-210-generic i386 with gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.12) will fail with: lib/linux/compiler.h:37:34: error: implicit declaration of function ‘__builtin_add_overflow_p’ [-Werror=implicit-function-declaration] From the GCC document[1] it looks like this built-in function was only introduced since 7.1.0 This can be fixed by simply changing the version check from 5.1.0 to 7.1.0 [1] https://gcc.gnu.org/onlinedocs/gcc-7.1.0/gcc/Integer-Overflow-Builtins.html Signed-off-by:
Po-Hsu Lin <po-hsu.lin@canonical.com> Message-Id: <20210602082443.20252-1-po-hsu.lin@canonical.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Lai Jiangshan authored
Add a test to verify that KVM correctly handles the case where two or more non-leaf page table entries point at the same table gfn, but with different parent access permissions. For example, here is a shared pagetable: pgd[] pud[] pmd[] virtual address pointers /->pmd1(u--)->pte1(uw-)->page1 <- ptr1 (u--) /->pud1(uw-)--->pmd2(uw-)->pte2(uw-)->page2 <- ptr2 (uw-) pgd-| (shared pmd[] as above) \->pud2(u--)--->pmd1(u--)->pte1(uw-)->page1 <- ptr3 (u--) \->pmd2(uw-)->pte2(uw-)->page2 <- ptr4 (u--) pud1 and pud2 point to the same pmd table The test is useful when TDP is not enabled. Co-Developed-by:
Hou Wenlong <houwenlong.hwl@antgroup.com> Signed-off-by:
Hou Wenlong <houwenlong.hwl@antgroup.com> Signed-off-by:
Lai Jiangshan <laijs@linux.alibaba.com> Message-Id: <20210605174901.157556-1-jiangshanlai@gmail.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Jun 01, 2021
-
-
Steffen Eiden authored
One bitops.h include should be enough. Signed-off-by:
Steffen Eiden <seiden@linux.ibm.com> Message-Id: <20210527124551.38299-1-seiden@linux.ibm.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Jim Mattson authored
Some strange characters snuck into this file. Convert them to ASCII for better readability. Signed-off-by:
Jim Mattson <jmattson@google.com> Message-Id: <20210511220949.1019978-1-jmattson@google.com> Reviewed-by:
David Matlack <dmatlack@google.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- May 26, 2021
-
-
-
Janosch Frank authored
SCLP is also part of the cpumodel, so we need to make sure that the features indicated via read info / read cpu info are correct. Signed-off-by:
Janosch Frank <frankja@linux.ibm.com> Reviewed-by:
Claudio Imbrenda <imbrenda@linux.ibm.com> Acked-by:
David Hildenbrand <david@redhat.com> Acked-by:
Cornelia Huck <cohuck@redhat.com>
-
Janosch Frank authored
Let's grab more of the feature bits from SCLP read info so we can use them in the cpumodel tests. Signed-off-by:
Janosch Frank <frankja@linux.ibm.com> Reviewed-by:
Claudio Imbrenda <imbrenda@linux.ibm.com> Acked-by:
Cornelia Huck <cohuck@redhat.com> Acked-by:
David Hildenbrand <david@redhat.com>
-
Janosch Frank authored
The cpu offset tells us where the cpu entries are in the sclp read info structure. Signed-off-by:
Janosch Frank <frankja@linux.ibm.com> Reviewed-by:
Claudio Imbrenda <imbrenda@linux.ibm.com> Reviewed-by:
David Hildenbrand <david@redhat.com> Reviewed-by:
Cornelia Huck <cohuck@redhat.com>
-
Janosch Frank authored
Lets also test the UV host interfaces. Signed-off-by:
Janosch Frank <frankja@linux.ibm.com> Reviewed-by:
Claudio Imbrenda <imbrenda@linux.ibm.com> Acked-by:
Cornelia Huck <cohuck@redhat.com> Acked-by:
Thomas Huth <thuth@redhat.com>
-
Janosch Frank authored
Lets check if the UV calls that should not be available in a protected guest 2 are actually not available. Also lets check if they are falsely indicated to be available. Signed-off-by:
Janosch Frank <frankja@linux.ibm.com> Reviewed-by:
Cornelia Huck <cohuck@redhat.com> Reviewed-by:
Claudio Imbrenda <imbrenda@linux.ibm.com> Acked-by:
Thomas Huth <thuth@redhat.com>
-
Janosch Frank authored
Testing for facility only means the UV Call facility is available. The UV will only indicate the share/unshare calls for a protected guest 2, so lets also check that. Signed-off-by:
Janosch Frank <frankja@linux.ibm.com> Reviewed-by:
Claudio Imbrenda <imbrenda@linux.ibm.com> Reviewed-by:
Cornelia Huck <cohuck@redhat.com> Acked-by:
Thomas Huth <thuth@redhat.com>
-
Janosch Frank authored
Lets add a UV library to make checking the UV feature bit easier. In the future this library file can take care of handling UV initialization and UV guest creation. Signed-off-by:
Janosch Frank <frankja@linux.ibm.com> Reviewed-by:
Claudio Imbrenda <imbrenda@linux.ibm.com> Reviewed-by:
Cornelia Huck <cohuck@redhat.com> Acked-by:
Thomas Huth <thuth@redhat.com>
-
Janosch Frank authored
They are needed in the new UV tests. As we now extend the size of the query struct, we need to set the length in the UV guest query test to a constant instead of using sizeof. Signed-off-by:
Janosch Frank <frankja@linux.ibm.com> Reviewed-by:
Claudio Imbrenda <imbrenda@linux.ibm.com> Acked-by:
Cornelia Huck <cohuck@redhat.com> Acked-by:
Thomas Huth <thuth@redhat.com>
-
Janosch Frank authored
Lets also test sharing unavailable memory. Signed-off-by:
Janosch Frank <frankja@linux.ibm.com> Reviewed-by:
Claudio Imbrenda <imbrenda@linux.ibm.com> Reviewed-by:
Cornelia Huck <cohuck@redhat.com> Reviewed-by:
Thomas Huth <thuth@redhat.com>
-
- May 24, 2021
-
-
Krish Sadhukhan authored
According to section "Canonicalization and Consistency Checks" in APM vol 2, VMRUN canonicalizes (i.e., sign-extend to bit 63) all base addresses in the segment registers that have been loaded. Signed-off-by:
Krish Sadhukhan <krish.sadhukhan@oracle.com> Message-Id: <20210520211708.70069-1-krish.sadhukhan@oracle.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- May 18, 2021
-
-
Paolo Bonzini authored
arm/arm64: target-efi prep This series mostly prepares kvm-unit-tests/arm for targeting EFI platforms. The actually EFI support will come in another series, but these patches are good for removing assumptions from our memory maps and about our PSCI conduit, even if we never merge EFI support. See merge request kvm-unit-tests/kvm-unit-tests!8
-
- May 17, 2021
-
-
Andrew Jones authored
The method can be smc in addition to hvc, and it will be when running on bare metal. Additionally, we move the invocations to assembly so we don't have to rely on compiler assumptions. We also fix the prototype of psci_invoke. function_id should be an unsigned int, not an unsigned long. Reviewed-by:
Alexandru Elisei <alexandru.elisei@arm.com> Tested-by:
Alexandru Elisei <alexandru.elisei@arm.com> Signed-off-by:
Andrew Jones <drjones@redhat.com>
-
Andrew Jones authored
If there's no virtio-console / chr-testdev configured, then the user probably didn't want them. Just silently fail rather than stating the obvious. Reviewed-by:
Nikos Nikoleris <nikos.nikoleris@arm.com> Reviewed-by:
Alexandru Elisei <alexandru.elisei@arm.com> Tested-by:
Alexandru Elisei <alexandru.elisei@arm.com> Signed-off-by:
Andrew Jones <drjones@redhat.com>
-
Andrew Jones authored
Keep as much memory layout assumptions as possible in init::start and a single setup function. This prepares us for calling setup() from different start functions which have been linked with different linker scripts. To do this, stacktop is only referenced from init::start, making freemem_start a parameter to setup(). We also split mem_init() into three parts, one that populates the mem regions per the DT, one that populates the mem regions per assumptions, and one that does the mem init. The concept of a primary region is dropped, but we add a sanity check for the absence of memory holes, because we don't know how to deal with them yet. Reviewed-by:
Nikos Nikoleris <nikos.nikoleris@arm.com> Reviewed-by:
Alexandru Elisei <alexandru.elisei@arm.com> Tested-by:
Alexandru Elisei <alexandru.elisei@arm.com> Signed-off-by:
Andrew Jones <drjones@redhat.com>
-
Andrew Jones authored
Rather than making too many assumptions about the memory layout in mmu code, just set up the page tables per the memory regions (which means putting all the memory layout assumptions in setup). To ensure we get the right default flags set we need to split the primary region into two regions for code and data. We still only expect the primary regions to be present, but the next patch will remove that assumption too. (Unfortunately we still have an assumption in setup_mmu. We assume the range 3G-4G is available for the virtual memory allocator. We'll need to remove that assumption as well with another patch in order to support arbitrary memory maps.) Reviewed-by:
Nikos Nikoleris <nikos.nikoleris@arm.com> Reviewed-by:
Alexandru Elisei <alexandru.elisei@arm.com> Tested-by:
Alexandru Elisei <alexandru.elisei@arm.com> Signed-off-by:
Andrew Jones <drjones@redhat.com>
-
Andrew Jones authored
By providing a proper ioremap function, we can just rely on devices calling it for each region they need (as they already do) instead of mapping a big assumed I/O range. We don't require the MMU to be enabled at the time of the ioremap. In that case, we add the mapping to the identity map anyway. This allows us to call setup_vm after io_init. Why don't we just call setup_vm before io_init, I hear you ask? Well, that's because tests like sieve want to start with the MMU off, later call setup_vm, and all the while have working I/O. Some unit tests are just really demanding... While at it, ensure we map the I/O regions with XN (execute never), as suggested by Alexandru Elisei. Reviewed-by:
Alexandru Elisei <alexandru.elisei@arm.com> Tested-by:
Alexandru Elisei <alexandru.elisei@arm.com> Signed-off-by:
Andrew Jones <drjones@redhat.com>
-
Andrew Jones authored
We should explicitly ioremap the userspace emulated address used in the benchmark. Reported-by:
Alexandru Elisei <alexandru.elisei@arm.com> Reviewed-by:
Alexandru Elisei <alexandru.elisei@arm.com> Tested-by:
Alexandru Elisei <alexandru.elisei@arm.com> Signed-off-by:
Andrew Jones <drjones@redhat.com>
-