summaryrefslogtreecommitdiffstats
path: root/package/kvm-unit-tests
Commit message (Collapse)AuthorAgeFilesLines
* arch: allow GCC target options to be optionally overwrittenMark Corbin2018-09-231-1/+1
| | | | | | | | | | | | | The BR2_GCC_TARGET_* configuration variables are copied to corresponding GCC_TARGET_* variables which may then be optionally modified or overwritten by architecture specific makefiles. All makefiles must use the new GCC_TARGET_* variables instead of the BR2_GCC_TARGET_* versions. Signed-off-by: Mark Corbin <mark.corbin@embecosm.com> [Thomas: simplify include of arch/arch.mk] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* kvm-unit-tests: test for rdseed/rdrandMatt Weber2018-01-141-0/+110
| | | | | | | | | | | | | | | | | | | The build fails when the host binutils isn't at least 2.23 (2.22.x introduced RDSEED). The host toolchain is used for x86_64 target builds where we need to do a 32bit build. Most other buildroot builds are using a much newer binutils unless it's a external older toolchain. Fixes: http://autobuild.buildroot.net/results/c39/c3987a3cbd2960b0ff50f872636bdfd8d1a9c820/ Upstream: https://marc.info/?l=kvm&m=151580743523259&w=2 Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* kvm-unit-tests: bump to kvm-unit-tests-20171020Matthew Weber2017-12-034-47/+13
| | | | | | | | | | | | - 0001-Makefile-remove-Werror-to-avoid-build-failures.patch is adjusted to apply to the new version of kvm-unit-tests - 0001-x86-hyperv_clock-be-explicit-about-mul-instruction-d.patch is removed, as it has been merged upstream as of commit 45276b5860522921c77fb3ccc1458ff5f223c3c6. Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* kvm-unit-tests: bump version to fix build issueCyril Bur2017-11-204-19/+28
| | | | | | | | | | | | | | | | | | | | | | | | Since binutils commit 1a9ccd70f9a7 ("Fix the linker so that it will not silently generate ELF binaries with invalid program headers. Fix readelf to report such invalid binaries.") the behaviour has changed and binutils tries to create a program header segment for which there is no space. Thanks to Nicholas Piggin and his patch to Linux: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/?h=next&id=ff45000fcb56b5b0f Cedric fixed this in kvm-unit-tests commit 95062c20790d ("powerpc: add -n to LDFLAGS") so bump to that version. Since the patch 0001-remove-werror.patch needs to be adjusted, we take this opportunity to reformat is as a Git patch. Fixes: http://autobuild.buildroot.net/results/80825b492abf61313637b109d6a0944b38d5f739 Signed-off-by: Cyril Bur <cyrilbur@gmail.com> [Thomas: add necessary hash change, refresh patch that was not applying anymore.] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* kvm-unit-test: x86-64 variant only available on x86-64 hostsPeter Korsgaard2017-11-051-0/+1
| | | | | | | | We use the host compiler for x86-64 builds, so ensure it is only available on x86-64 hosts. Signed-off-by: Peter Korsgaard <peter@korsgaard.com> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
* package/kvm-unit-tests: fix syntaxYann E. MORIN2017-07-231-1/+1
| | | | | | Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Tested-by: Ricardo Martincoski <ricardo.martincoski@gmail.com> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
* package/kvm-unit-test: available for big.LITTLE arm cores tooYann E. MORIN2017-07-221-1/+2
| | | | | | | | | | Since it supports each variants individually, it should also supports the big.LITTLE configurations. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Cyril Bur <cyrilbur@gmail.com> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* package/kvm-unit-tests: introduce _ARCH_SUPPORTSYann E. MORIN2017-07-221-7/+19
| | | | | | | | | | | | | | | Move all architecture options to their own symbol, so that it is easier to add more variants in the future. The dependency on cross-gcc >= 4.5 is only valid for i386, as we use the host gcc for x86_64. Adapt the dependency accordingly. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Cyril Bur <cyrilbur@gmail.com> [Thomas: - add comment about host gcc >= 4.5 dependency on x86-64 - remove bogus "depends on ... if ..." construct.] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* package/kvm-unit-tests: add hashBernd Kuhls2017-06-111-0/+2
| | | | | Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* kvm-unit-tests: fix build on x86-64 with specific gcc versionsThomas Petazzoni2017-05-111-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | kvm-unit-tests uses the following code on x86/x86-64: static inline u64 scale_delta(u64 delta, u64 mul_frac) { u64 product, unused; __asm__ ( "mul %3" : "=d" (product), "=a" (unused) : "1" (delta), "rm" ((u64)mul_frac) ); return product; } The "mul" instruction does not have a suffix that indicates the width of the data being multiplied. When the data is passed in a register, there is no need to specify the width, but with some gcc versions, the data is passed as a memory reference, and therefore the assembler does not know the width of the data to be multiplied. It causes the following build failure: x86/hyperv_clock.c: Assembler messages: x86/hyperv_clock.c:21: Error: no instruction mnemonic suffix given and no register operands; can't size instruction Since the data being multiplied is 64 bit, we explicitly specify the instruction as being "mulq". Fixes: http://autobuild.buildroot.net/results/a4a65d01f049db83a93de92660f228dd18532625/ Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* package/k*/Config.in: fix ordering of statementsAdam Duskett2017-05-011-1/+1
| | | | | | | | | | | | | The check-package script when ran gives warnings on ordering issues on all of these Config files. This patch cleans up all warnings related to the ordering in the Config files for packages starting with the letter k in the package directory. The appropriate ordering is: type, default, depends on, select, help See http://nightly.buildroot.org/#_config_files for more information. Signed-off-by: Adam Duskett <Adamduskett@outlook.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* package: use SPDX short identifier for LGPLv2/LGPLv2+Rahul Bedarkar2017-04-011-1/+1
| | | | | | | | | | | We want to use SPDX identifier for license string as much as possible. SPDX short identifier for LGPLv2/LGPLv2+ is LGPL-2.0/LGPL-2.0+. This change is done using following command. find . -name "*.mk" | xargs sed -ri '/LICENSE( )?[\+:]?=/s/LGPLv2(\+)?/LGPL-2.0\1/g' Signed-off-by: Rahul Bedarkar <rahulbedarkar89@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* kvm-unit-tests: only enable for ARM on Cortex-A{7,12,15,17}Arnout Vandecappelle2016-11-201-1/+3
| | | | | | | | | | | | | | | | | | | The library uses the hypervisor instruction HVC, which is only available on ARMv7-A with Hypervisor extensions. This is limited to Cortex-A{7,12,15,17}. In addition the build unconditionally passes -marm so it also needs ARM instructions to be available, but that is already implied by the CPU selection. Implicitly fixes http://autobuild.buildroot.net/results/53d109fd9055fd20387bb857aced5f89cf3086fd though it is still not clear why ld doesn't accept the -Ttext=... option there. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> [Thomas: A12 and A17 also have the virtualization extensions.] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* kvm-unit-tests: pass the --processor configure argumentArnout Vandecappelle2016-11-201-0/+1
| | | | | | | | | | | | The configure script uses this to set the -mcpu option. If nothing is passed, it defaults to -mcpu=cortex-a15 for arm, and -mcpu=cortex-a57 for aarch64, which may conflict with the actual architecture. The --processor option is only really used for arm and aarch64, but it doesn't hurt to also pass it for the other arches. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* kvm-unit-tests: add patch to remove -WerrorThomas Petazzoni2016-11-061-0/+17
| | | | | | | | Fixes: http://autobuild.buildroot.net/results/52c02c68be6c0b3e907f7ed645bd2d18476ec4f3/ Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* kvm-unit-tests: really use KVM_UNIT_TESTS_ARCH and fix value on x86-64Thomas Petazzoni2016-11-061-2/+2
| | | | | | | | | | | | | | | | The kvm-unit-tests package defines a KVM_UNIT_TESTS_ARCH variable, but never used it. Due to this, on PowerPC64, we were passing an incorrect value, causing a build failure. In addition, once the KVM_UNIT_TESTS_ARCH is used, it appeared that its value for x86_64 was incorrect, due a typo: it was x86_84 instead of x86_64. Fixes: http://autobuild.buildroot.net/results/16836c02f4d1ab5df6b2e21a4fcdbbf4a7542f22/ Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* kvm-unit-tests: add gcc version dependenciesThomas Petazzoni2016-10-261-2/+8
| | | | | | | | | | | | | | | | | On x86 (both i386 and x86_64), the kvm-unit-tests code uses __builtin_reachable, which appeared in gcc 4.5. This commit adds the relevant dependencies to kvm-unit-tests: - on i386, we need gcc 4.5 as the target compiler - on x86-64, we need gcc 4.5 as the host compiler, because we use the host compiler to build kvm-unit-tests for this architecture Fixes: http://autobuild.buildroot.net/results/21340a7e6494e23adb2fe8dc6253ab220c380fec/ Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* kvm-unit-tests: Bump versionCyril Bur2016-10-261-1/+1
| | | | | | | | This version bump includes several fixes for x86 and a significant fix to powerpc transactional memory tests. Signed-off-by: Cyril Bur <cyrilbur@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* kvm-unit-tests: Fix x86_64 to use host compilerCyril Bur2016-10-262-1/+9
| | | | | | | | | | | | | kvm-unit-tests requires a multilib compiler for x86_64 as it compiles 32bit boot code. This patch uses the BR2_HOSTARCH_NEEDS_IA32_COMPILER option to enforce this and avoids using TARGET_CROSS for x86_64 targets and uses the host 32bit (and 64bit) capable compiler. Signed-off-by: Cyril Bur <cyrilbur@gmail.com> [Thomas: reword comment in .mk file.] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* package/kvm-unit-tests: bump versionCyril Bur2016-09-251-1/+1
| | | | | | | | | | | | | | Most importantly this version includes a change to kvm-unit-tests which means it will stop looking attempting to include host headers. This change should fix build breakage on i386. "ERROR: unsafe header/library path used in cross-compilation: '-I' '/lib/modules/3.13.0-042stab111.12/build/include'" The new version also includes more powerpc tests. Signed-off-by: Cyril Bur <cyrilbur@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* package/kvm-unit-tests: new packageCyril Bur2016-09-192-0/+70
The unit tests are tiny guest operating systems that generally execute only tens of lines of C and assembler test code in order to obtain its PASS/FAIL result. Unit tests provide KVM and virt hardware functional testing by targeting the features through minimal implementations of their use per the hardware specification. The simplicity of unit tests make them easy to verify they are correct, easy to maintain, and easy to use in timing measurements. Unit tests are also often used for quick and dirty bug reproducers. The reproducers may then be kept as regression tests. It's strongly encouraged that patches implementing new KVM features are submitted with accompanying unit tests. Signed-off-by: Cyril Bur <cyrilbur@gmail.com> [Thomas: - order architecture dependencies in Config.in alphabetically. - rewrap Config.in help text, lines were too long - add an empty line between the package description and the upstream project URL in the Config.in help text - don't make KVM_UNIT_TESTS_ARCH default to $(ARCH). This was not correct for i386 for example. Instead, just handle the few architectures that the package supports. - remove useless double quotes in variable definitions. - remove --prefix="$(TARGET_DIR)" from CONF_OPTS. It was installing everything in /share/ and not /usr/share/, and setting the prefix to TARGET_DIR at configure time is not good. Instead, pass DESTDIR at installation time.] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
OpenPOWER on IntegriCloud