- Jun 10, 2021
-
-
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>
-
Andrew Jones authored
Don't assume the physical addresses used with PCI have already been identity mapped. Reviewed-by:
Nikos Nikoleris <nikos.nikoleris@arm.com> Tested-by:
Alexandru Elisei <alexandru.elisei@arm.com> Signed-off-by:
Andrew Jones <drjones@redhat.com>
-
Andrew Jones authored
Consolidate our setup calls to reduce the amount we need to do from init::start. Also remove a couple of pointless comments from setup(). 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
Move secondary_entry helper functions out of .init and into .text, since secondary_entry isn't run at at "init" time. Actually, anything that is used after init time should be in .text, as we may not include .init in some build configurations. 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>
-
The --vmm configure option was added to distinguish between the two virtual machine managers that kvm-unit-tests supports for the arm and arm64 architectures, qemu or kvmtool. There are plans to make kvm-unit-tests work as an EFI app, which will require changes to the way tests are compiled. Instead of adding a new configure option specifically for EFI and have it coexist with --vmm, or overloading the semantics of the existing --vmm option, let's replace --vmm with the more generic name --target. Since --target is only valid for arm and arm64, reject the option when it's specified for another architecture, which is how --vmm should have behaved from the start. Signed-off-by:
Alexandru Elisei <alexandru.elisei@arm.com> Signed-off-by:
Andrew Jones <drjones@redhat.com>
-
- May 12, 2021
-
-
Paolo Bonzini authored
eabi prescribes different entry points for 64-bit division on 32-bit platforms. Implement a wrapper for the GCC-style __divmoddi4 and __udivmoddi4 functions. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
Avoid possible uninitialized variables on machines where division by zero does not trap. Add __divmoddi4, and use it in __moddi3 and __divdi3. Reported-by:
Alexandru Elisei <alexandru.elisei@arm.com> Reviewed-by:
Alexandru Elisei <alexandru.elisei@arm.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- May 06, 2021
-
-
Paolo Bonzini authored
inttypes.h is not part of freestanding C, stdint.h is. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- May 05, 2021
-
-
Paolo Bonzini authored
The -nostdlib flag disables the driver from adding libclang_rt.*.a during linking. Adding a specific library to the command line such as libgcc then causes the linker to report unresolved symbols, because the libraries that resolve those symbols aren't automatically added. libgcc however is only needed for long division (64-bit by 64-bit). Instead of linking the whole of it, implement the routines that are needed. Reported-by:
Bill Wendling <morbo@google.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Janosch Frank authored
134 is for bcd 135 is for the vector enhancements Not the other way around... Signed-off-by:
Janosch Frank <frankja@linux.ibm.com> Reviewed-by:
David Hildenbrand <david@redhat.com> Reviewed-by:
Cornelia Huck <cohuck@redhat.com> Reviewed-by:
Claudio Imbrenda <imbrenda@linux.ibm.com> Suggested-by:
David Hildenbrand <david@redhat.com>
-
Claudio Imbrenda authored
Signed-off-by:
Claudio Imbrenda <imbrenda@linux.ibm.com> Acked-by:
David Hildenbrand <david@redhat.com> Acked-by:
Cornelia Huck <cohuck@redhat.com> Acked-by:
Janosch Frank <frankja@linux.ibm.com> Message-Id: <20210427121608.157783-1-imbrenda@linux.ibm.com> Link: https://lore.kernel.org/kvm/20210427121608.157783-1-imbrenda@linux.ibm.com/ Signed-off-by:
Janosch Frank <frankja@linux.ibm.com>
-
Pierre Morel authored
Measurement block format 1 is made available by the extended measurement block facility and is indicated in the SCHIB by the bit in the PMCW. The MBO is specified in the SCHIB of each channel and the MBO defined by the SCHM instruction is ignored. The test of the MB format 1 is just skipped if the feature is not available. Signed-off-by:
Pierre Morel <pmorel@linux.ibm.com> Reviewed-by:
Cornelia Huck <cohuck@redhat.com> Link: https://lore.kernel.org/kvm/1615545714-13747-7-git-send-email-pmorel@linux.ibm.com/ Signed-off-by:
Janosch Frank <frankja@linux.ibm.com>
-
Pierre Morel authored
We test the update of the measurement block format 0, the measurement block origin is calculated from the mbo argument used by the SCHM instruction and the offset calculated using the measurement block index of the SCHIB. Signed-off-by:
Pierre Morel <pmorel@linux.ibm.com> Reviewed-by:
Cornelia Huck <cohuck@redhat.com> Acked-by:
Janosch Frank <frankja@linux.ibm.com> Link: https://lore.kernel.org/kvm/1615545714-13747-6-git-send-email-pmorel@linux.ibm.com/ Signed-off-by:
Janosch Frank <frankja@linux.ibm.com>
-
Pierre Morel authored
We implement the call of the Set CHannel Monitor instruction, starting the monitoring of the all Channel Sub System, and initializing channel subsystem monitoring. Initial tests report the presence of the extended measurement block feature, and verify the error reporting of the hypervisor for SCHM. Signed-off-by:
Pierre Morel <pmorel@linux.ibm.com> Reviewed-by:
Cornelia Huck <cohuck@redhat.com> Acked-by:
Janosch Frank <frankja@linux.ibm.com> Link: https://lore.kernel.org/kvm/1615545714-13747-5-git-send-email-pmorel@linux.ibm.com/ Signed-off-by:
Janosch Frank <frankja@linux.ibm.com>
-
Pierre Morel authored
To enable or disable measurement we will need specific modifications on the subchannel. Signed-off-by:
Pierre Morel <pmorel@linux.ibm.com> Reviewed-by:
Cornelia Huck <cohuck@redhat.com> Link: https://lore.kernel.org/kvm/1615545714-13747-4-git-send-email-pmorel@linux.ibm.com/ Signed-off-by:
Janosch Frank <frankja@linux.ibm.com>
-
Pierre Morel authored
In order to ease the writing of tests based on: - interrupt - enabling a subchannel - using multiple I/O on a channel without disabling it We do the following simplifications: - the I/O interrupt handler is registered on CSS initialization - We do not enable again a subchannel in senseid if it is already enabled - we add a css_enabled() function to test if a subchannel is enabled Signed-off-by:
Pierre Morel <pmorel@linux.ibm.com> Reviewed-by:
Cornelia Huck <cohuck@redhat.com> Acked-by:
Janosch Frank <frankja@linux.ibm.com> Link: https://lore.kernel.org/kvm/1615545714-13747-3-git-send-email-pmorel@linux.ibm.com/ Signed-off-by:
Janosch Frank <frankja@linux.ibm.com>
-