History log of /kvm-unit-tests/lib/arm64/ (Results 1 – 25 of 98)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
1b59c63227-Feb-2025 Vladimir Murzin <vladimir.murzin@arm.com>

arm64: Add basic MTE test

Test tag storage access and tag mismatch for different MTE modes.

Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
Reviewed-by: Alexandru Elisei <alexandru.elisei@

arm64: Add basic MTE test

Test tag storage access and tag mismatch for different MTE modes.

Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
Reviewed-by: Alexandru Elisei <alexandru.elisei@arm.com>
Signed-off-by: Andrew Jones <andrew.jones@linux.dev>

show more ...

0cc3a35122-Feb-2025 Sean Christopherson <seanjc@google.com>

lib: Use __ASSEMBLER__ instead of __ASSEMBLY__

Convert all non-x86 #ifdefs from __ASSEMBLY__ to __ASSEMBLER__, and remove
all manual __ASSEMBLY__ #defines. __ASSEMBLY_ was inherited blindly from
th

lib: Use __ASSEMBLER__ instead of __ASSEMBLY__

Convert all non-x86 #ifdefs from __ASSEMBLY__ to __ASSEMBLER__, and remove
all manual __ASSEMBLY__ #defines. __ASSEMBLY_ was inherited blindly from
the Linux kernel, and must be manually defined, e.g. through build rules
or with the aforementioned explicit #defines in assembly code.

__ASSEMBLER__ on the other hand is automatically defined by the compiler
when preprocessing assembly, i.e. doesn't require manually #defines for
the code to function correctly.

Ignore x86, as x86 doesn't actually rely on __ASSEMBLY__ at the moment,
and is undergoing a parallel cleanup.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Reviewed-by: Andrew Jones <andrew.jones@linux.dev>
Message-ID: <20250222014526.2302653-1-seanjc@google.com>
[thuth: Fix three more occurances in libfdt.h and sbi-tests.h]
Signed-off-by: Thomas Huth <thuth@redhat.com>

show more ...


/kvm-unit-tests/.editorconfig
/kvm-unit-tests/Makefile
/kvm-unit-tests/arm/cstart.S
/kvm-unit-tests/arm/cstart64.S
/kvm-unit-tests/arm/pmu.c
/kvm-unit-tests/configure
/kvm-unit-tests/lib/arm/asm/arch_gicv3.h
/kvm-unit-tests/lib/arm/asm/assembler.h
/kvm-unit-tests/lib/arm/asm/gic-v2.h
/kvm-unit-tests/lib/arm/asm/gic-v3.h
/kvm-unit-tests/lib/arm/asm/gic.h
/kvm-unit-tests/lib/arm/asm/page.h
/kvm-unit-tests/lib/arm/asm/ptrace.h
/kvm-unit-tests/lib/arm/asm/sysreg.h
/kvm-unit-tests/lib/arm/asm/thread_info.h
/kvm-unit-tests/lib/arm/asm/timer.h
asm/arch_gicv3.h
asm/assembler.h
asm/page.h
asm/processor.h
asm/ptrace.h
asm/sysreg.h
/kvm-unit-tests/lib/asm-generic/page.h
/kvm-unit-tests/lib/auxinfo.h
/kvm-unit-tests/lib/cpumask.h
/kvm-unit-tests/lib/libcflat.h
/kvm-unit-tests/lib/libfdt/fdt.h
/kvm-unit-tests/lib/linux/compiler.h
/kvm-unit-tests/lib/linux/const.h
/kvm-unit-tests/lib/powerpc/asm/hcall.h
/kvm-unit-tests/lib/powerpc/asm/processor.h
/kvm-unit-tests/lib/powerpc/asm/rtas.h
/kvm-unit-tests/lib/ppc64/asm/page.h
/kvm-unit-tests/lib/ppc64/asm/ptrace.h
/kvm-unit-tests/lib/ppc64/asm/vpa.h
/kvm-unit-tests/lib/riscv/asm/bug.h
/kvm-unit-tests/lib/riscv/asm/csr.h
/kvm-unit-tests/lib/riscv/asm/page.h
/kvm-unit-tests/lib/riscv/asm/sbi.h
/kvm-unit-tests/lib/riscv/setjmp.S
/kvm-unit-tests/lib/riscv/setup.c
/kvm-unit-tests/lib/s390x/asm/arch_def.h
/kvm-unit-tests/lib/s390x/asm/cpacf.h
/kvm-unit-tests/lib/s390x/asm/facility.h
/kvm-unit-tests/lib/s390x/asm/sie-arch.h
/kvm-unit-tests/lib/s390x/sie-icpt.c
/kvm-unit-tests/lib/s390x/sie-icpt.h
/kvm-unit-tests/lib/s390x/sie.c
/kvm-unit-tests/lib/s390x/sie.h
/kvm-unit-tests/lib/s390x/snippet-exit.h
/kvm-unit-tests/lib/x86/apic-defs.h
/kvm-unit-tests/lib/x86/apic.h
/kvm-unit-tests/lib/x86/asm/page.h
/kvm-unit-tests/lib/x86/atomic.h
/kvm-unit-tests/lib/x86/desc.c
/kvm-unit-tests/lib/x86/desc.h
/kvm-unit-tests/lib/x86/msr.h
/kvm-unit-tests/lib/x86/pmu.c
/kvm-unit-tests/lib/x86/processor.h
/kvm-unit-tests/lib/x86/setup.c
/kvm-unit-tests/lib/x86/smp.c
/kvm-unit-tests/lib/x86/smp.h
/kvm-unit-tests/powerpc/cstart64.S
/kvm-unit-tests/riscv/Makefile
/kvm-unit-tests/riscv/run
/kvm-unit-tests/riscv/sbi-asm.S
/kvm-unit-tests/riscv/sbi-fwft.c
/kvm-unit-tests/riscv/sbi-tests.h
/kvm-unit-tests/riscv/sbi.c
/kvm-unit-tests/s390x/Makefile
/kvm-unit-tests/s390x/cpu-sie.S
/kvm-unit-tests/s390x/cpu.S
/kvm-unit-tests/s390x/diag258.c
/kvm-unit-tests/s390x/edat.c
/kvm-unit-tests/s390x/pv-diags.c
/kvm-unit-tests/s390x/pv-icptcode.c
/kvm-unit-tests/s390x/pv-ipl.c
/kvm-unit-tests/s390x/sie-dat.c
/kvm-unit-tests/s390x/snippets/Makefile
/kvm-unit-tests/s390x/snippets/c/sie-dat.c
/kvm-unit-tests/s390x/snippets/c/stfle.c
/kvm-unit-tests/s390x/snippets/lib/snippet-exit.h
/kvm-unit-tests/s390x/stfle-sie.c
/kvm-unit-tests/s390x/unittests.cfg
/kvm-unit-tests/x86/Makefile.common
/kvm-unit-tests/x86/Makefile.i386
/kvm-unit-tests/x86/Makefile.x86_64
/kvm-unit-tests/x86/asyncpf.c
/kvm-unit-tests/x86/cstart.S
/kvm-unit-tests/x86/cstart64.S
/kvm-unit-tests/x86/debug.c
/kvm-unit-tests/x86/efi/efistart64.S
/kvm-unit-tests/x86/la57.c
/kvm-unit-tests/x86/lam.c
/kvm-unit-tests/x86/pcid.c
/kvm-unit-tests/x86/pmu.c
/kvm-unit-tests/x86/pmu_lbr.c
/kvm-unit-tests/x86/pmu_pebs.c
/kvm-unit-tests/x86/trampolines.S
/kvm-unit-tests/x86/unittests.cfg
/kvm-unit-tests/x86/vmx_tests.c
0ed2cdf328-Nov-2024 Suzuki K Poulose <suzuki.poulose@arm.com>

arm64: Fix sve_vl() for build errors

commit 5b9895f8a5d9 ("arm: Fix clang error in sve_vl()") breaks the build
with the following compiler version, as the "rdvl" expects a 64bit register.

/tmp/ccGJ

arm64: Fix sve_vl() for build errors

commit 5b9895f8a5d9 ("arm: Fix clang error in sve_vl()") breaks the build
with the following compiler version, as the "rdvl" expects a 64bit register.

/tmp/ccGJYtuC.s: Assembler messages:
/tmp/ccGJYtuC.s:2165: Error: operand mismatch -- `rdvl w3,#8'
/tmp/ccGJYtuC.s:2165: Info: did you mean this?
/tmp/ccGJYtuC.s:2165: Info: rdvl x3, #8
make: *** [<builtin>: arm/selftest.o] Error 1
make: *** Waiting for unfinished jobs....

$ aarch64-none-elf-gcc --version
aarch64-none-elf-gcc (GNU Toolchain for the A-profile Architecture 10.2-2020.11 (arm-10.16)) 10.2.1 20201103

Fix this by switching to use "unsigned long" variable and restoring the 64bit
register for the instruction

Fixes: 5b9895f8a5d9 ("arm: Fix clang error in sve_vl()")
Cc: Raghavendra Rao Ananta <rananta@google.com>
Cc: Andrew Jones <andrew.jones@linux.dev>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Andrew Jones <andrew.jones@linux.dev>

show more ...

5b9895f823-Oct-2024 Raghavendra Rao Ananta <rananta@google.com>

arm: Fix clang error in sve_vl()

Fix the following clang error in sve_vl():

In file included from arm/selftest.c:16:
kvm-unit-tests/lib/asm/processor.h:163:16:
error: value size does not match regi

arm: Fix clang error in sve_vl()

Fix the following clang error in sve_vl():

In file included from arm/selftest.c:16:
kvm-unit-tests/lib/asm/processor.h:163:16:
error: value size does not match register size specified by the
constraint and modifier [-Werror,-Wasm-operand-widths]
: "=r" (vl));
^
kvm-unit-tests/lib/asm/processor.h:162:14:
note: use constraint modifier "w"
"rdvl %0, #8"
^~
%w0
1 error generated.

Fixes: d47d370c8f ("arm: Add test for FPU/SIMD context save/restore")
Signed-off-by: Raghavendra Rao Ananta <rananta@google.com>
Signed-off-by: Andrew Jones <andrew.jones@linux.dev>

show more ...

d47d370c12-Apr-2024 Subhasish Ghosh <subhasish.ghosh@arm.com>

arm: Add test for FPU/SIMD context save/restore

Test that the FPU/SIMD registers are saved and restored correctly when
context switching CPUs.

In order to test fpu/simd functionality, we need to ma

arm: Add test for FPU/SIMD context save/restore

Test that the FPU/SIMD registers are saved and restored correctly when
context switching CPUs.

In order to test fpu/simd functionality, we need to make sure that
kvm-unit-tests doesn't generate code that uses the fpu registers, as that
might interfere with the test results. Thus make sure we compile the tests
with -mgeneral-regs-only.

Signed-off-by: Subhasish Ghosh <subhasish.ghosh@arm.com>
[ Added SVE register tests ]
Signed-off-by: Joey Gouly <joey.gouly@arm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
[Removed references to realms.]
Signed-off-by: Andrew Jones <andrew.jones@linux.dev>

show more ...

1afc6fb712-Apr-2024 Joey Gouly <joey.gouly@arm.com>

arm64: add ESR_ELx EC.SVE

Add the SVE exception class, so that SVE exceptions are not printed
as 'unknown' exceptions.

Signed-off-by: Joey Gouly <joey.gouly@arm.com>
Signed-off-by: Suzuki K Poulose

arm64: add ESR_ELx EC.SVE

Add the SVE exception class, so that SVE exceptions are not printed
as 'unknown' exceptions.

Signed-off-by: Joey Gouly <joey.gouly@arm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Andrew Jones <andrew.jones@linux.dev>

show more ...

cddb18bc12-Apr-2024 Alexandru Elisei <alexandru.elisei@arm.com>

arm64: Expand SMCCC arguments and return values

PSCI uses the SMC Calling Convention (SMCCC) to communicate with the higher
level software. PSCI uses at most 4 arguments and expend only one return
v

arm64: Expand SMCCC arguments and return values

PSCI uses the SMC Calling Convention (SMCCC) to communicate with the higher
level software. PSCI uses at most 4 arguments and expend only one return
value. However, SMCCC has provisions for more arguments (upto 17 depending
on the SMCCC version) and upto 10 distinct return values.

We are going to be adding tests that make use of it, so add support for the
extended number of arguments and return values.

Also rename the SMCCC functions to generic, non-PSCI names, so they
can be used for Realm services.

Signed-off-by: Alexandru Elisei <alexandru.elisei@arm.com>
Co-developed-by: Joey Gouly <joey.gouly@arm.com>
Signed-off-by: Joey Gouly <joey.gouly@arm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
[Fixed EFI compile error.]
Signed-off-by: Andrew Jones <andrew.jones@linux.dev>

show more ...

dc0a3a7602-Apr-2024 Andrew Jones <andrew.jones@linux.dev>

arm64: Prepare for LPA2

When checking for supported granules also check for the values
which indicate support when LPA2 is implemented.

Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Review

arm64: Prepare for LPA2

When checking for supported granules also check for the values
which indicate support when LPA2 is implemented.

Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Andrew Jones <andrew.jones@linux.dev>

show more ...


/kvm-unit-tests/.gitlab-ci.yml
/kvm-unit-tests/.shellcheckrc
/kvm-unit-tests/.travis.yml
/kvm-unit-tests/MAINTAINERS
/kvm-unit-tests/Makefile
/kvm-unit-tests/README.md
/kvm-unit-tests/arm/efi/run
/kvm-unit-tests/arm/gic.c
/kvm-unit-tests/arm/unittests.cfg
/kvm-unit-tests/common/memory-verify.c
/kvm-unit-tests/common/selftest-migration.c
/kvm-unit-tests/common/sieve.c
/kvm-unit-tests/configure
/kvm-unit-tests/docs/unittests.txt
asm/processor.h
/kvm-unit-tests/lib/efi.c
/kvm-unit-tests/lib/elf.h
/kvm-unit-tests/lib/libcflat.h
/kvm-unit-tests/lib/migrate.c
/kvm-unit-tests/lib/migrate.h
/kvm-unit-tests/lib/powerpc/asm/hcall.h
/kvm-unit-tests/lib/powerpc/asm/processor.h
/kvm-unit-tests/lib/powerpc/asm/reg.h
/kvm-unit-tests/lib/powerpc/asm/rtas.h
/kvm-unit-tests/lib/powerpc/asm/setup.h
/kvm-unit-tests/lib/powerpc/asm/smp.h
/kvm-unit-tests/lib/powerpc/hcall.c
/kvm-unit-tests/lib/powerpc/io.c
/kvm-unit-tests/lib/powerpc/io.h
/kvm-unit-tests/lib/powerpc/processor.c
/kvm-unit-tests/lib/powerpc/rtas.c
/kvm-unit-tests/lib/powerpc/setup.c
/kvm-unit-tests/lib/powerpc/smp.c
/kvm-unit-tests/lib/ppc64/asm-offsets.c
/kvm-unit-tests/lib/ppc64/asm/atomic.h
/kvm-unit-tests/lib/ppc64/asm/barrier.h
/kvm-unit-tests/lib/ppc64/asm/mmu.h
/kvm-unit-tests/lib/ppc64/asm/opal.h
/kvm-unit-tests/lib/ppc64/asm/page.h
/kvm-unit-tests/lib/ppc64/asm/pgtable-hwdef.h
/kvm-unit-tests/lib/ppc64/asm/pgtable.h
/kvm-unit-tests/lib/ppc64/asm/ptrace.h
/kvm-unit-tests/lib/ppc64/asm/stack.h
/kvm-unit-tests/lib/ppc64/mmu.c
/kvm-unit-tests/lib/ppc64/opal-calls.S
/kvm-unit-tests/lib/ppc64/opal.c
/kvm-unit-tests/lib/ppc64/stack.c
/kvm-unit-tests/lib/report.c
/kvm-unit-tests/lib/riscv/asm/setup.h
/kvm-unit-tests/lib/riscv/setup.c
/kvm-unit-tests/lib/riscv/stack.c
/kvm-unit-tests/lib/s390x/asm/sigp.h
/kvm-unit-tests/lib/s390x/asm/uv.h
/kvm-unit-tests/lib/s390x/css.h
/kvm-unit-tests/lib/s390x/io.c
/kvm-unit-tests/lib/s390x/uv.c
/kvm-unit-tests/lib/s390x/uv.h
/kvm-unit-tests/lib/stack.c
/kvm-unit-tests/lib/stack.h
/kvm-unit-tests/lib/vmalloc.c
/kvm-unit-tests/lib/vmalloc.h
/kvm-unit-tests/lib/x86/apic.h
/kvm-unit-tests/lib/x86/asm/bitops.h
/kvm-unit-tests/lib/x86/desc.h
/kvm-unit-tests/lib/x86/pmu.h
/kvm-unit-tests/lib/x86/processor.h
/kvm-unit-tests/lib/x86/vm.h
/kvm-unit-tests/powerpc/Makefile.common
/kvm-unit-tests/powerpc/Makefile.ppc64
/kvm-unit-tests/powerpc/atomics.c
/kvm-unit-tests/powerpc/cstart64.S
/kvm-unit-tests/powerpc/emulator.c
/kvm-unit-tests/powerpc/interrupts.c
/kvm-unit-tests/powerpc/memory-verify.c
/kvm-unit-tests/powerpc/mmu.c
/kvm-unit-tests/powerpc/run
/kvm-unit-tests/powerpc/selftest.c
/kvm-unit-tests/powerpc/sieve.c
/kvm-unit-tests/powerpc/smp.c
/kvm-unit-tests/powerpc/spapr_vpa.c
/kvm-unit-tests/powerpc/sprs.c
/kvm-unit-tests/powerpc/timebase.c
/kvm-unit-tests/powerpc/tm.c
/kvm-unit-tests/powerpc/unittests.cfg
/kvm-unit-tests/riscv/Makefile
/kvm-unit-tests/riscv/cstart.S
/kvm-unit-tests/riscv/efi/crt0-efi-riscv64.S
/kvm-unit-tests/riscv/efi/elf_riscv64_efi.lds
/kvm-unit-tests/riscv/efi/reloc_riscv64.c
/kvm-unit-tests/riscv/efi/run
/kvm-unit-tests/riscv/run
/kvm-unit-tests/riscv/sbi.c
/kvm-unit-tests/riscv/unittests.cfg
/kvm-unit-tests/run_tests.sh
/kvm-unit-tests/s390x/Makefile
/kvm-unit-tests/s390x/cmm.c
/kvm-unit-tests/s390x/emulator.c
/kvm-unit-tests/s390x/memory-verify.c
/kvm-unit-tests/s390x/migration-cmm.c
/kvm-unit-tests/s390x/migration-skey.c
/kvm-unit-tests/s390x/migration.c
/kvm-unit-tests/s390x/mvpg.c
/kvm-unit-tests/s390x/run
/kvm-unit-tests/s390x/sclp.c
/kvm-unit-tests/s390x/selftest.c
/kvm-unit-tests/s390x/snippets/c/flat.lds.S
/kvm-unit-tests/s390x/unittests.cfg
/kvm-unit-tests/scripts/arch-run.bash
/kvm-unit-tests/scripts/common.bash
/kvm-unit-tests/scripts/mkstandalone.sh
/kvm-unit-tests/scripts/runtime.bash
/kvm-unit-tests/scripts/s390x/func.bash
/kvm-unit-tests/x86/asyncpf.c
/kvm-unit-tests/x86/debug.c
/kvm-unit-tests/x86/msr.c
/kvm-unit-tests/x86/pmu.c
/kvm-unit-tests/x86/pmu_lbr.c
/kvm-unit-tests/x86/pmu_pebs.c
/kvm-unit-tests/x86/svm.h
/kvm-unit-tests/x86/svm_tests.c
/kvm-unit-tests/x86/unittests.cfg
/kvm-unit-tests/x86/vmexit.c
/kvm-unit-tests/x86/vmware_backdoors.c
/kvm-unit-tests/x86/vmx.c
/kvm-unit-tests/x86/vmx.h
/kvm-unit-tests/x86/vmx_tests.c
a8a78d7505-Mar-2024 Andrew Jones <andrew.jones@linux.dev>

treewide: lib/stack: Fix backtrace

We should never pass the result of __builtin_frame_address(0) to
another function since the compiler is within its rights to pop the
frame to which it points befor

treewide: lib/stack: Fix backtrace

We should never pass the result of __builtin_frame_address(0) to
another function since the compiler is within its rights to pop the
frame to which it points before making the function call, as may be
done for tail calls. Nobody has complained about backtrace(), so
likely all compilations have been inlining backtrace_frame(), not
dropping the frame on the tail call, or nobody is looking at traces.
However, for riscv, when built for EFI, it does drop the frame on the
tail call, and it was noticed. Preemptively fix backtrace() for all
architectures.

Fixes: 52266791750d ("lib: backtrace printing")
Acked-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Andrew Jones <andrew.jones@linux.dev>

show more ...

2294476727-Feb-2024 Andrew Jones <andrew.jones@linux.dev>

arm64: Improve unhandled exception traces

Put the stack trace at the bottom, rather than mixing it with
register dumps, and also start the trace from the current PC.

Signed-off-by: Andrew Jones <an

arm64: Improve unhandled exception traces

Put the stack trace at the bottom, rather than mixing it with
register dumps, and also start the trace from the current PC.

Signed-off-by: Andrew Jones <andrew.jones@linux.dev>

show more ...


/kvm-unit-tests/.gitlab-ci.yml
/kvm-unit-tests/MAINTAINERS
/kvm-unit-tests/arm/Makefile.common
/kvm-unit-tests/arm/selftest.c
/kvm-unit-tests/arm/sieve.c
/kvm-unit-tests/common/selftest-migration.c
/kvm-unit-tests/common/sieve.c
/kvm-unit-tests/configure
/kvm-unit-tests/lib/arm/asm/setup.h
/kvm-unit-tests/lib/arm/asm/smp.h
/kvm-unit-tests/lib/arm/io.c
/kvm-unit-tests/lib/arm/mmu.c
/kvm-unit-tests/lib/arm/setup.c
/kvm-unit-tests/lib/arm/smp.c
processor.c
/kvm-unit-tests/lib/cpumask.h
/kvm-unit-tests/lib/ctype.h
/kvm-unit-tests/lib/elf.h
/kvm-unit-tests/lib/ldiv32.c
/kvm-unit-tests/lib/linux/const.h
/kvm-unit-tests/lib/memregions.c
/kvm-unit-tests/lib/memregions.h
/kvm-unit-tests/lib/migrate.c
/kvm-unit-tests/lib/migrate.h
/kvm-unit-tests/lib/on-cpus.c
/kvm-unit-tests/lib/on-cpus.h
/kvm-unit-tests/lib/powerpc/asm/ppc_asm.h
/kvm-unit-tests/lib/powerpc/asm/processor.h
/kvm-unit-tests/lib/powerpc/asm/reg.h
/kvm-unit-tests/lib/powerpc/asm/time.h
/kvm-unit-tests/lib/powerpc/hcall.c
/kvm-unit-tests/lib/powerpc/processor.c
/kvm-unit-tests/lib/powerpc/smp.c
/kvm-unit-tests/lib/ppc64/asm/reg.h
/kvm-unit-tests/lib/ppc64/asm/time.h
/kvm-unit-tests/lib/riscv/asm-offsets.c
/kvm-unit-tests/lib/riscv/asm/barrier.h
/kvm-unit-tests/lib/riscv/asm/bitops.h
/kvm-unit-tests/lib/riscv/asm/bug.h
/kvm-unit-tests/lib/riscv/asm/csr.h
/kvm-unit-tests/lib/riscv/asm/io.h
/kvm-unit-tests/lib/riscv/asm/isa.h
/kvm-unit-tests/lib/riscv/asm/memory_areas.h
/kvm-unit-tests/lib/riscv/asm/mmu.h
/kvm-unit-tests/lib/riscv/asm/page.h
/kvm-unit-tests/lib/riscv/asm/pgtable.h
/kvm-unit-tests/lib/riscv/asm/processor.h
/kvm-unit-tests/lib/riscv/asm/ptrace.h
/kvm-unit-tests/lib/riscv/asm/sbi.h
/kvm-unit-tests/lib/riscv/asm/setup.h
/kvm-unit-tests/lib/riscv/asm/smp.h
/kvm-unit-tests/lib/riscv/asm/stack.h
/kvm-unit-tests/lib/riscv/bitops.c
/kvm-unit-tests/lib/riscv/io.c
/kvm-unit-tests/lib/riscv/isa.c
/kvm-unit-tests/lib/riscv/mmu.c
/kvm-unit-tests/lib/riscv/processor.c
/kvm-unit-tests/lib/riscv/sbi.c
/kvm-unit-tests/lib/riscv/setup.c
/kvm-unit-tests/lib/riscv/smp.c
/kvm-unit-tests/lib/riscv/stack.c
/kvm-unit-tests/lib/string.c
/kvm-unit-tests/lib/string.h
/kvm-unit-tests/powerpc/Makefile.common
/kvm-unit-tests/powerpc/selftest-migration.c
/kvm-unit-tests/powerpc/spapr_vpa.c
/kvm-unit-tests/powerpc/sprs.c
/kvm-unit-tests/powerpc/tm.c
/kvm-unit-tests/powerpc/unittests.cfg
/kvm-unit-tests/riscv/Makefile
/kvm-unit-tests/riscv/cstart.S
/kvm-unit-tests/riscv/run
/kvm-unit-tests/riscv/sbi.c
/kvm-unit-tests/riscv/selftest.c
/kvm-unit-tests/riscv/sieve.c
/kvm-unit-tests/riscv/unittests.cfg
/kvm-unit-tests/s390x/Makefile
/kvm-unit-tests/s390x/selftest-migration.c
/kvm-unit-tests/s390x/sieve.c
/kvm-unit-tests/s390x/snippets/c/sie-dat.c
/kvm-unit-tests/s390x/unittests.cfg
/kvm-unit-tests/scripts/arch-run.bash
/kvm-unit-tests/scripts/runtime.bash
/kvm-unit-tests/x86/hyperv.h
/kvm-unit-tests/x86/hyperv_clock.c
/kvm-unit-tests/x86/hyperv_connections.c
/kvm-unit-tests/x86/hyperv_stimer.c
/kvm-unit-tests/x86/hyperv_synic.c
/kvm-unit-tests/x86/pmu.c
/kvm-unit-tests/x86/pmu_pebs.c
/kvm-unit-tests/x86/sieve.c
/kvm-unit-tests/x86/svm_tests.c
/kvm-unit-tests/x86/unittests.cfg
/kvm-unit-tests/x86/vmx_tests.c
dfc1fec224-Sep-2023 Andrew Jones <andrew.jones@linux.dev>

arm/arm64: Move cpumask.h to common lib

RISC-V will also make use of cpumask.h, so move it to the arch-common
directory.

Signed-off-by: Andrew Jones <andrew.jones@linux.dev>
Reviewed-by: Thomas Hut

arm/arm64: Move cpumask.h to common lib

RISC-V will also make use of cpumask.h, so move it to the arch-common
directory.

Signed-off-by: Andrew Jones <andrew.jones@linux.dev>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Acked-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>

show more ...


/kvm-unit-tests/Makefile
/kvm-unit-tests/arm/Makefile.common
/kvm-unit-tests/arm/micro-bench.c
/kvm-unit-tests/arm/pmu.c
/kvm-unit-tests/configure
/kvm-unit-tests/lib/arm/asm/gic-v2.h
/kvm-unit-tests/lib/arm/asm/gic-v3.h
/kvm-unit-tests/lib/arm/asm/gic.h
/kvm-unit-tests/lib/arm/asm/smp.h
/kvm-unit-tests/lib/arm/mmu.c
/kvm-unit-tests/lib/arm/smp.c
/kvm-unit-tests/lib/cpumask.h
/kvm-unit-tests/lib/powerpc/asm/ppc_asm.h
/kvm-unit-tests/lib/powerpc/processor.c
/kvm-unit-tests/lib/powerpc/setup.c
/kvm-unit-tests/lib/ppc64/asm/ptrace.h
/kvm-unit-tests/lib/riscv/.gitignore
/kvm-unit-tests/lib/riscv/asm-offsets.c
/kvm-unit-tests/lib/riscv/asm/asm-offsets.h
/kvm-unit-tests/lib/riscv/asm/barrier.h
/kvm-unit-tests/lib/riscv/asm/csr.h
/kvm-unit-tests/lib/riscv/asm/io.h
/kvm-unit-tests/lib/riscv/asm/page.h
/kvm-unit-tests/lib/riscv/asm/setup.h
/kvm-unit-tests/lib/riscv/asm/spinlock.h
/kvm-unit-tests/lib/riscv/asm/stack.h
/kvm-unit-tests/lib/riscv/io.c
/kvm-unit-tests/lib/riscv/setup.c
/kvm-unit-tests/lib/s390x/asm/arch_def.h
/kvm-unit-tests/lib/s390x/asm/cpacf.h
/kvm-unit-tests/lib/s390x/asm/interrupt.h
/kvm-unit-tests/lib/s390x/asm/mem.h
/kvm-unit-tests/lib/s390x/hardware.c
/kvm-unit-tests/lib/s390x/interrupt.c
/kvm-unit-tests/lib/s390x/mmu.c
/kvm-unit-tests/lib/s390x/sclp-console.c
/kvm-unit-tests/lib/s390x/sclp.h
/kvm-unit-tests/lib/s390x/sie.c
/kvm-unit-tests/lib/s390x/sie.h
/kvm-unit-tests/lib/s390x/snippet.h
/kvm-unit-tests/lib/s390x/stsi.h
/kvm-unit-tests/lib/util.h
/kvm-unit-tests/lib/x86/apic.c
/kvm-unit-tests/lib/x86/apic.h
/kvm-unit-tests/lib/x86/desc.c
/kvm-unit-tests/lib/x86/desc.h
/kvm-unit-tests/lib/x86/fault_test.c
/kvm-unit-tests/lib/x86/msr.h
/kvm-unit-tests/lib/x86/processor.h
/kvm-unit-tests/lib/x86/smp.c
/kvm-unit-tests/lib/x86/usermode.c
/kvm-unit-tests/powerpc/Makefile.common
/kvm-unit-tests/powerpc/cstart64.S
/kvm-unit-tests/powerpc/emulator.c
/kvm-unit-tests/powerpc/flat.lds
/kvm-unit-tests/powerpc/run
/kvm-unit-tests/powerpc/spapr_hcall.c
/kvm-unit-tests/powerpc/spapr_vpa.c
/kvm-unit-tests/powerpc/unittests.cfg
/kvm-unit-tests/riscv/Makefile
/kvm-unit-tests/riscv/cstart.S
/kvm-unit-tests/riscv/flat.lds
/kvm-unit-tests/riscv/selftest.c
/kvm-unit-tests/s390x/Makefile
/kvm-unit-tests/s390x/mvpg-sie.c
/kvm-unit-tests/s390x/run
/kvm-unit-tests/s390x/sclp.c
/kvm-unit-tests/s390x/selftest.c
/kvm-unit-tests/s390x/sie-dat.c
/kvm-unit-tests/s390x/sie.c
/kvm-unit-tests/s390x/snippets/c/sie-dat.c
/kvm-unit-tests/s390x/snippets/c/sie-dat.h
/kvm-unit-tests/s390x/spec_ex-sie.c
/kvm-unit-tests/s390x/spec_ex.c
/kvm-unit-tests/s390x/topology.c
/kvm-unit-tests/s390x/unittests.cfg
/kvm-unit-tests/scripts/arch-run.bash
/kvm-unit-tests/scripts/common.bash
/kvm-unit-tests/scripts/kernel-doc
/kvm-unit-tests/scripts/pretty_print_stacks.py
/kvm-unit-tests/scripts/runtime.bash
/kvm-unit-tests/x86/access.c
/kvm-unit-tests/x86/apic.c
/kvm-unit-tests/x86/asyncpf.c
/kvm-unit-tests/x86/cet.c
/kvm-unit-tests/x86/cmpxchg8b.c
/kvm-unit-tests/x86/emulator.c
/kvm-unit-tests/x86/emulator64.c
/kvm-unit-tests/x86/eventinj.c
/kvm-unit-tests/x86/hyperv_connections.c
/kvm-unit-tests/x86/hyperv_stimer.c
/kvm-unit-tests/x86/hyperv_synic.c
/kvm-unit-tests/x86/intel-iommu.c
/kvm-unit-tests/x86/ioapic.c
/kvm-unit-tests/x86/memory.c
/kvm-unit-tests/x86/msr.c
/kvm-unit-tests/x86/pcid.c
/kvm-unit-tests/x86/pmu.c
/kvm-unit-tests/x86/pmu_pebs.c
/kvm-unit-tests/x86/svm.c
/kvm-unit-tests/x86/svm.h
/kvm-unit-tests/x86/svm_tests.c
/kvm-unit-tests/x86/taskswitch2.c
/kvm-unit-tests/x86/tscdeadline_latency.c
/kvm-unit-tests/x86/unittests.cfg
/kvm-unit-tests/x86/vmexit.c
/kvm-unit-tests/x86/vmx.h
/kvm-unit-tests/x86/vmx_tests.c
/kvm-unit-tests/x86/xsave.c
117f269024-Jul-2023 Shaoqin Huang <shahuang@redhat.com>

arm64: Define name for these bits used in SCTLR_EL1

Currently some fields in SCTLR_EL1 don't define a name and directly used
in the SCTLR_EL1_RES1, that's not good now since these fields have been
f

arm64: Define name for these bits used in SCTLR_EL1

Currently some fields in SCTLR_EL1 don't define a name and directly used
in the SCTLR_EL1_RES1, that's not good now since these fields have been
functional and have a name.

Delete the SCTLR_EL1_RES1 since these bits are not RES1 if the related
feature has been implemented, it's wired to define these bits as RES1.
So simply delete the SCTLR_EL1_RES1 and unwind its definition to
INIT_SCTLR_MMU_OFF.

According to the ARM DDI 0487J.a, define the name related to these
fields.

Suggested-by: Alexandru Elisei <alexandru.elisei@arm.com>
Signed-off-by: Shaoqin Huang <shahuang@redhat.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Andrew Jones <andrew.jones@linux.dev>

show more ...

16bff5db24-Jul-2023 Shaoqin Huang <shahuang@redhat.com>

arm64: Use _BITULL() to define SCTLR_EL1 bit fields

Currently the SCTLR_EL1_* is defined by (1 << x), all of them can be
replaced by the _BITULL() macro to make the format consistent with the
SCTLR_

arm64: Use _BITULL() to define SCTLR_EL1 bit fields

Currently the SCTLR_EL1_* is defined by (1 << x), all of them can be
replaced by the _BITULL() macro to make the format consistent with the
SCTLR_EL1_RES1 definition.

Signed-off-by: Shaoqin Huang <shahuang@redhat.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Andrew Jones <andrew.jones@linux.dev>

show more ...


/kvm-unit-tests/MAINTAINERS
/kvm-unit-tests/Makefile
/kvm-unit-tests/arm/Makefile.common
/kvm-unit-tests/arm/pmu.c
/kvm-unit-tests/arm/unittests.cfg
asm/sysreg.h
/kvm-unit-tests/lib/powerpc/asm/handlers.h
/kvm-unit-tests/lib/powerpc/asm/hcall.h
/kvm-unit-tests/lib/powerpc/asm/ppc_asm.h
/kvm-unit-tests/lib/powerpc/asm/processor.h
/kvm-unit-tests/lib/powerpc/handlers.c
/kvm-unit-tests/lib/powerpc/processor.c
/kvm-unit-tests/lib/ppc64/asm/vpa.h
/kvm-unit-tests/lib/s390x/asm/uv.h
/kvm-unit-tests/lib/s390x/mmu.h
/kvm-unit-tests/lib/s390x/pv_icptdata.h
/kvm-unit-tests/lib/s390x/sclp.c
/kvm-unit-tests/lib/s390x/sclp.h
/kvm-unit-tests/lib/s390x/sie.c
/kvm-unit-tests/lib/s390x/snippet.h
/kvm-unit-tests/lib/s390x/stsi.h
/kvm-unit-tests/lib/s390x/uv.c
/kvm-unit-tests/lib/s390x/uv.h
/kvm-unit-tests/lib/string.h
/kvm-unit-tests/powerpc/Makefile.common
/kvm-unit-tests/powerpc/Makefile.ppc64
/kvm-unit-tests/powerpc/spapr_hcall.c
/kvm-unit-tests/powerpc/spapr_vpa.c
/kvm-unit-tests/powerpc/sprs.c
/kvm-unit-tests/powerpc/tm.c
/kvm-unit-tests/powerpc/unittests.cfg
/kvm-unit-tests/run_tests.sh
/kvm-unit-tests/s390x/Makefile
/kvm-unit-tests/s390x/flat.lds.S
/kvm-unit-tests/s390x/pv-diags.c
/kvm-unit-tests/s390x/pv-icptcode.c
/kvm-unit-tests/s390x/pv-ipl.c
/kvm-unit-tests/s390x/snippets/asm/icpt-loop.S
/kvm-unit-tests/s390x/snippets/asm/loop.S
/kvm-unit-tests/s390x/snippets/asm/pv-diag-288.S
/kvm-unit-tests/s390x/snippets/asm/pv-diag-308.S
/kvm-unit-tests/s390x/snippets/asm/pv-diag-500.S
/kvm-unit-tests/s390x/snippets/asm/pv-diag-yield.S
/kvm-unit-tests/s390x/snippets/asm/pv-icpt-112.S
/kvm-unit-tests/s390x/snippets/asm/pv-icpt-vir-timing.S
/kvm-unit-tests/s390x/topology.c
/kvm-unit-tests/s390x/unittests.cfg
/kvm-unit-tests/s390x/uv-host.c
/kvm-unit-tests/scripts/arch-run.bash
/kvm-unit-tests/scripts/pretty_print_stacks.py
/kvm-unit-tests/scripts/runtime.bash
/kvm-unit-tests/x86/Makefile.common
3bb5771128-Jun-2023 Nadav Amit <namit@vmware.com>

arm64: dump stack on bad exception

Upon a bad exception, the stack is rather useful for debugging, splat it
out.

Signed-off-by: Nadav Amit <namit@vmware.com>
Signed-off-by: Andrew Jones <andrew.jon

arm64: dump stack on bad exception

Upon a bad exception, the stack is rather useful for debugging, splat it
out.

Signed-off-by: Nadav Amit <namit@vmware.com>
Signed-off-by: Andrew Jones <andrew.jones@linux.dev>

show more ...

ecb5e71128-Jun-2023 Nadav Amit <namit@vmware.com>

arm64: stack: update trace stack on exception

Using gdb for backtracing or dumping the stack following an exception is
not very helpful as the exact location of the exception is not saved.

Add an a

arm64: stack: update trace stack on exception

Using gdb for backtracing or dumping the stack following an exception is
not very helpful as the exact location of the exception is not saved.

Add an additional frame to save the location of the exception.

One delicate point is dealing with the pretty_print_stacks script. When
the stack is dumped, the script would not print the right address for
the exception address: for every return address it deducts "1" before
looking for the instruction location in the code (using addr2line). As a
somewhat hacky solution add "1" for the exception address when dumping
the stack.

Signed-off-by: Nadav Amit <namit@vmware.com>
Signed-off-by: Andrew Jones <andrew.jones@linux.dev>

show more ...

d9de805128-Jun-2023 Nadav Amit <namit@vmware.com>

arm64: enable frame pointer and support stack unwinding

Enable frame pointers for arm64 and perform stack unwinding based on
arm64 convention.

Signed-off-by: Nadav Amit <namit@vmware.com>
Signed-of

arm64: enable frame pointer and support stack unwinding

Enable frame pointers for arm64 and perform stack unwinding based on
arm64 convention.

Signed-off-by: Nadav Amit <namit@vmware.com>
Signed-off-by: Andrew Jones <andrew.jones@linux.dev>

show more ...


/kvm-unit-tests/.gitignore
/kvm-unit-tests/.gitlab-ci.yml
/kvm-unit-tests/COPYRIGHT
/kvm-unit-tests/LICENSE
/kvm-unit-tests/MAINTAINERS
/kvm-unit-tests/Makefile
/kvm-unit-tests/arm/Makefile.arm
/kvm-unit-tests/arm/Makefile.arm64
/kvm-unit-tests/arm/Makefile.common
/kvm-unit-tests/arm/cstart.S
/kvm-unit-tests/arm/cstart64.S
/kvm-unit-tests/arm/debug.c
/kvm-unit-tests/arm/dummy.c
/kvm-unit-tests/arm/efi/crt0-efi-aarch64.S
/kvm-unit-tests/arm/efi/elf_aarch64_efi.lds
/kvm-unit-tests/arm/efi/reloc_aarch64.c
/kvm-unit-tests/arm/efi/run
/kvm-unit-tests/arm/flat.lds
/kvm-unit-tests/arm/gic.c
/kvm-unit-tests/arm/micro-bench.c
/kvm-unit-tests/arm/pl031.c
/kvm-unit-tests/arm/pmu.c
/kvm-unit-tests/arm/psci.c
/kvm-unit-tests/arm/run
/kvm-unit-tests/arm/timer.c
/kvm-unit-tests/ci/cirrus-ci-fedora.yml
/kvm-unit-tests/ci/cirrus-ci-macos-i386.yml
/kvm-unit-tests/ci/cirrus-ci-macos-x86-64.yml
/kvm-unit-tests/configure
/kvm-unit-tests/lib/acpi.c
/kvm-unit-tests/lib/acpi.h
/kvm-unit-tests/lib/alloc_page.h
/kvm-unit-tests/lib/argv.c
/kvm-unit-tests/lib/argv.h
/kvm-unit-tests/lib/arm/asm/mmu-api.h
/kvm-unit-tests/lib/arm/asm/setup.h
/kvm-unit-tests/lib/arm/asm/smp.h
/kvm-unit-tests/lib/arm/asm/timer.h
/kvm-unit-tests/lib/arm/gic.c
/kvm-unit-tests/lib/arm/io.c
/kvm-unit-tests/lib/arm/mmu.c
/kvm-unit-tests/lib/arm/psci.c
/kvm-unit-tests/lib/arm/setup.c
/kvm-unit-tests/lib/arm/smp.c
/kvm-unit-tests/lib/arm/timer.c
asm/stack.h
stack.c
/kvm-unit-tests/lib/ctype.h
/kvm-unit-tests/lib/devicetree.c
/kvm-unit-tests/lib/efi.c
/kvm-unit-tests/lib/efi.h
/kvm-unit-tests/lib/elf.h
/kvm-unit-tests/lib/errata.h
/kvm-unit-tests/lib/libcflat.h
/kvm-unit-tests/lib/libfdt/README
/kvm-unit-tests/lib/libfdt/fdt.c
/kvm-unit-tests/lib/libfdt/fdt_check.c
/kvm-unit-tests/lib/libfdt/fdt_overlay.c
/kvm-unit-tests/lib/libfdt/fdt_ro.c
/kvm-unit-tests/lib/libfdt/fdt_rw.c
/kvm-unit-tests/lib/libfdt/fdt_strerror.c
/kvm-unit-tests/lib/libfdt/fdt_sw.c
/kvm-unit-tests/lib/libfdt/fdt_wip.c
/kvm-unit-tests/lib/libfdt/libfdt.h
/kvm-unit-tests/lib/libfdt/libfdt_internal.h
/kvm-unit-tests/lib/linux/compiler.h
/kvm-unit-tests/lib/linux/const.h
/kvm-unit-tests/lib/linux/efi.h
/kvm-unit-tests/lib/migrate.c
/kvm-unit-tests/lib/migrate.h
/kvm-unit-tests/lib/powerpc/asm/ppc_asm.h
/kvm-unit-tests/lib/printf.c
/kvm-unit-tests/lib/s390x/asm-offsets.c
/kvm-unit-tests/lib/s390x/asm/arch_def.h
/kvm-unit-tests/lib/s390x/asm/cmm.h
/kvm-unit-tests/lib/s390x/asm/facility.h
/kvm-unit-tests/lib/s390x/asm/interrupt.h
/kvm-unit-tests/lib/s390x/asm/mem.h
/kvm-unit-tests/lib/s390x/asm/pgtable.h
/kvm-unit-tests/lib/s390x/asm/time.h
/kvm-unit-tests/lib/s390x/asm/uv.h
/kvm-unit-tests/lib/s390x/asm/vector.h
/kvm-unit-tests/lib/s390x/css.h
/kvm-unit-tests/lib/s390x/css_lib.c
/kvm-unit-tests/lib/s390x/fault.c
/kvm-unit-tests/lib/s390x/fault.h
/kvm-unit-tests/lib/s390x/gs.h
/kvm-unit-tests/lib/s390x/hardware.c
/kvm-unit-tests/lib/s390x/hardware.h
/kvm-unit-tests/lib/s390x/interrupt.c
/kvm-unit-tests/lib/s390x/io.c
/kvm-unit-tests/lib/s390x/mmu.c
/kvm-unit-tests/lib/s390x/sclp-console.c
/kvm-unit-tests/lib/s390x/sclp.c
/kvm-unit-tests/lib/s390x/sclp.h
/kvm-unit-tests/lib/s390x/sie.c
/kvm-unit-tests/lib/s390x/sie.h
/kvm-unit-tests/lib/s390x/smp.c
/kvm-unit-tests/lib/s390x/smp.h
/kvm-unit-tests/lib/s390x/snippet.h
/kvm-unit-tests/lib/s390x/stack.c
/kvm-unit-tests/lib/s390x/uv.c
/kvm-unit-tests/lib/s390x/uv.h
/kvm-unit-tests/lib/stack.c
/kvm-unit-tests/lib/string.c
/kvm-unit-tests/lib/x86/amd_sev.h
/kvm-unit-tests/lib/x86/apic-defs.h
/kvm-unit-tests/lib/x86/apic.c
/kvm-unit-tests/lib/x86/apic.h
/kvm-unit-tests/lib/x86/asm/page.h
/kvm-unit-tests/lib/x86/asm/setup.h
/kvm-unit-tests/lib/x86/desc.c
/kvm-unit-tests/lib/x86/desc.h
/kvm-unit-tests/lib/x86/msr.h
/kvm-unit-tests/lib/x86/pmu.c
/kvm-unit-tests/lib/x86/pmu.h
/kvm-unit-tests/lib/x86/processor.h
/kvm-unit-tests/lib/x86/setup.c
/kvm-unit-tests/lib/x86/smp.c
/kvm-unit-tests/lib/x86/smp.h
/kvm-unit-tests/lib/x86/vm.c
/kvm-unit-tests/lib/x86/vm.h
/kvm-unit-tests/powerpc/Makefile.common
/kvm-unit-tests/powerpc/cstart64.S
/kvm-unit-tests/powerpc/run
/kvm-unit-tests/powerpc/sprs.c
/kvm-unit-tests/powerpc/unittests.cfg
/kvm-unit-tests/s390x/Makefile
/kvm-unit-tests/s390x/adtl-status.c
/kvm-unit-tests/s390x/cmm.c
/kvm-unit-tests/s390x/cpu.S
/kvm-unit-tests/s390x/cpumodel.c
/kvm-unit-tests/s390x/css.c
/kvm-unit-tests/s390x/cstart64.S
/kvm-unit-tests/s390x/diag288.c
/kvm-unit-tests/s390x/diag308.c
/kvm-unit-tests/s390x/edat.c
/kvm-unit-tests/s390x/emulator.c
/kvm-unit-tests/s390x/epsw.c
/kvm-unit-tests/s390x/ex.c
/kvm-unit-tests/s390x/exittime.c
/kvm-unit-tests/s390x/firq.c
/kvm-unit-tests/s390x/flat.lds.S
/kvm-unit-tests/s390x/gs.c
/kvm-unit-tests/s390x/iep.c
/kvm-unit-tests/s390x/intercept.c
/kvm-unit-tests/s390x/macros.S
/kvm-unit-tests/s390x/migration-cmm.c
/kvm-unit-tests/s390x/migration-sck.c
/kvm-unit-tests/s390x/migration-skey.c
/kvm-unit-tests/s390x/migration.c
/kvm-unit-tests/s390x/mvpg-sie.c
/kvm-unit-tests/s390x/mvpg.c
/kvm-unit-tests/s390x/panic-loop-extint.c
/kvm-unit-tests/s390x/panic-loop-pgm.c
/kvm-unit-tests/s390x/pfmf.c
/kvm-unit-tests/s390x/pv-attest.c
/kvm-unit-tests/s390x/pv-diags.c
/kvm-unit-tests/s390x/run
/kvm-unit-tests/s390x/sck.c
/kvm-unit-tests/s390x/sclp.c
/kvm-unit-tests/s390x/selftest.c
/kvm-unit-tests/s390x/sie.c
/kvm-unit-tests/s390x/skey.c
/kvm-unit-tests/s390x/skrf.c
/kvm-unit-tests/s390x/smp.c
/kvm-unit-tests/s390x/snippets/asm/flat.lds.S
/kvm-unit-tests/s390x/snippets/asm/macros.S
/kvm-unit-tests/s390x/snippets/asm/snippet-pv-diag-288.S
/kvm-unit-tests/s390x/snippets/asm/snippet-pv-diag-500.S
/kvm-unit-tests/s390x/snippets/asm/snippet-pv-diag-yield.S
/kvm-unit-tests/s390x/snippets/c/cstart.S
/kvm-unit-tests/s390x/snippets/c/flat.lds.S
/kvm-unit-tests/s390x/snippets/c/spec_ex.c
/kvm-unit-tests/s390x/spec_ex-sie.c
/kvm-unit-tests/s390x/spec_ex.c
/kvm-unit-tests/s390x/stsi.c
/kvm-unit-tests/s390x/tprot.c
/kvm-unit-tests/s390x/unittests.cfg
/kvm-unit-tests/s390x/uv-guest.c
/kvm-unit-tests/s390x/uv-host.c
/kvm-unit-tests/scripts/arch-run.bash
/kvm-unit-tests/scripts/pretty_print_stacks.py
/kvm-unit-tests/scripts/runtime.bash
/kvm-unit-tests/scripts/s390x/func.bash
/kvm-unit-tests/x86/Makefile.common
/kvm-unit-tests/x86/Makefile.i386
/kvm-unit-tests/x86/Makefile.x86_64
/kvm-unit-tests/x86/access.c
/kvm-unit-tests/x86/access.h
/kvm-unit-tests/x86/access_test.c
/kvm-unit-tests/x86/apic.c
/kvm-unit-tests/x86/cet.c
/kvm-unit-tests/x86/cstart.S
/kvm-unit-tests/x86/cstart64.S
/kvm-unit-tests/x86/debug.c
/kvm-unit-tests/x86/dummy.c
/kvm-unit-tests/x86/efi/README.md
/kvm-unit-tests/x86/efi/crt0-efi-x86_64.S
/kvm-unit-tests/x86/efi/efistart64.S
/kvm-unit-tests/x86/efi/run
/kvm-unit-tests/x86/emulator.c
/kvm-unit-tests/x86/emulator64.c
/kvm-unit-tests/x86/eventinj.c
/kvm-unit-tests/x86/flat.lds
/kvm-unit-tests/x86/ioapic.c
/kvm-unit-tests/x86/kvmclock.c
/kvm-unit-tests/x86/la57.c
/kvm-unit-tests/x86/memory.c
/kvm-unit-tests/x86/msr.c
/kvm-unit-tests/x86/pcid.c
/kvm-unit-tests/x86/pks.c
/kvm-unit-tests/x86/pku.c
/kvm-unit-tests/x86/pmu.c
/kvm-unit-tests/x86/pmu_lbr.c
/kvm-unit-tests/x86/pmu_pebs.c
/kvm-unit-tests/x86/rdpru.c
/kvm-unit-tests/x86/run
/kvm-unit-tests/x86/s3.c
/kvm-unit-tests/x86/smap.c
/kvm-unit-tests/x86/svm.c
/kvm-unit-tests/x86/svm.h
/kvm-unit-tests/x86/svm_npt.c
/kvm-unit-tests/x86/svm_tests.c
/kvm-unit-tests/x86/syscall.c
/kvm-unit-tests/x86/taskswitch2.c
/kvm-unit-tests/x86/trampolines.S
/kvm-unit-tests/x86/tsc.c
/kvm-unit-tests/x86/unittests.cfg
/kvm-unit-tests/x86/vmexit.c
/kvm-unit-tests/x86/vmx.c
/kvm-unit-tests/x86/vmx.h
/kvm-unit-tests/x86/vmx_tests.c
/kvm-unit-tests/x86/xsave.c
7a84b7b211-Mar-2022 Thomas Huth <thuth@redhat.com>

arm: Fix typos

Correct typos which were discovered with the "codespell" utility.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Andrew Jones <drjones@redhat.com>


/kvm-unit-tests/.gitignore
/kvm-unit-tests/.gitlab-ci.yml
/kvm-unit-tests/MAINTAINERS
/kvm-unit-tests/Makefile
/kvm-unit-tests/README.md
/kvm-unit-tests/arm/Makefile.arm
/kvm-unit-tests/arm/Makefile.arm64
/kvm-unit-tests/arm/cstart.S
/kvm-unit-tests/arm/debug.c
/kvm-unit-tests/arm/flat.lds
/kvm-unit-tests/arm/gic.c
/kvm-unit-tests/arm/micro-bench.c
/kvm-unit-tests/arm/run
/kvm-unit-tests/arm/timer.c
/kvm-unit-tests/arm/unittests.cfg
/kvm-unit-tests/ci/cirrus-ci-fedora.yml
/kvm-unit-tests/configure
/kvm-unit-tests/lib/alloc.c
asm/assembler.h
/kvm-unit-tests/lib/asm-generic/io.h
/kvm-unit-tests/lib/bitops.h
/kvm-unit-tests/lib/devicetree.c
/kvm-unit-tests/lib/efi.c
/kvm-unit-tests/lib/efi.h
/kvm-unit-tests/lib/libcflat.h
/kvm-unit-tests/lib/linux/compiler.h
/kvm-unit-tests/lib/linux/efi.h
/kvm-unit-tests/lib/ppc64/asm/io.h
/kvm-unit-tests/lib/s390x/asm/arch_def.h
/kvm-unit-tests/lib/s390x/asm/mem.h
/kvm-unit-tests/lib/s390x/asm/uv.h
/kvm-unit-tests/lib/s390x/css.h
/kvm-unit-tests/lib/s390x/fault.c
/kvm-unit-tests/lib/s390x/fault.h
/kvm-unit-tests/lib/s390x/interrupt.c
/kvm-unit-tests/lib/s390x/malloc_io.c
/kvm-unit-tests/lib/s390x/sclp.c
/kvm-unit-tests/lib/s390x/sclp.h
/kvm-unit-tests/lib/s390x/sie.c
/kvm-unit-tests/lib/s390x/sie.h
/kvm-unit-tests/lib/s390x/smp.c
/kvm-unit-tests/lib/s390x/smp.h
/kvm-unit-tests/lib/s390x/snippet.h
/kvm-unit-tests/lib/s390x/stsi.h
/kvm-unit-tests/lib/s390x/uv.c
/kvm-unit-tests/lib/s390x/uv.h
/kvm-unit-tests/lib/s390x/vm.c
/kvm-unit-tests/lib/s390x/vm.h
/kvm-unit-tests/lib/stdlib.h
/kvm-unit-tests/lib/string.c
/kvm-unit-tests/lib/x86/acpi.c
/kvm-unit-tests/lib/x86/acpi.h
/kvm-unit-tests/lib/x86/amd_sev.c
/kvm-unit-tests/lib/x86/amd_sev.h
/kvm-unit-tests/lib/x86/asm/debugreg.h
/kvm-unit-tests/lib/x86/asm/page.h
/kvm-unit-tests/lib/x86/asm/setup.h
/kvm-unit-tests/lib/x86/desc.c
/kvm-unit-tests/lib/x86/desc.h
/kvm-unit-tests/lib/x86/processor.h
/kvm-unit-tests/lib/x86/setup.c
/kvm-unit-tests/lib/x86/usermode.c
/kvm-unit-tests/lib/x86/vm.c
/kvm-unit-tests/lib/x86/vm.h
/kvm-unit-tests/powerpc/emulator.c
/kvm-unit-tests/powerpc/run
/kvm-unit-tests/run_tests.sh
/kvm-unit-tests/s390x/Makefile
/kvm-unit-tests/s390x/cpumodel.c
/kvm-unit-tests/s390x/firq.c
/kvm-unit-tests/s390x/mvpg-sie.c
/kvm-unit-tests/s390x/pv-diags.c
/kvm-unit-tests/s390x/run
/kvm-unit-tests/s390x/skey.c
/kvm-unit-tests/s390x/skrf.c
/kvm-unit-tests/s390x/smp.c
/kvm-unit-tests/s390x/snippets/asm/snippet-pv-diag-288.S
/kvm-unit-tests/s390x/snippets/asm/snippet-pv-diag-500.S
/kvm-unit-tests/s390x/snippets/asm/snippet-pv-diag-yield.S
/kvm-unit-tests/s390x/snippets/c/cstart.S
/kvm-unit-tests/s390x/snippets/c/flat.lds
/kvm-unit-tests/s390x/snippets/c/mvpg-snippet.c
/kvm-unit-tests/s390x/snippets/c/spec_ex.c
/kvm-unit-tests/s390x/spec_ex-sie.c
/kvm-unit-tests/s390x/sthyi.c
/kvm-unit-tests/s390x/stsi.c
/kvm-unit-tests/s390x/unittests.cfg
/kvm-unit-tests/s390x/uv-guest.c
/kvm-unit-tests/s390x/uv-host.c
/kvm-unit-tests/scripts/arch-run.bash
/kvm-unit-tests/scripts/mkstandalone.sh
/kvm-unit-tests/scripts/runtime.bash
/kvm-unit-tests/x86/Makefile.common
/kvm-unit-tests/x86/Makefile.i386
/kvm-unit-tests/x86/Makefile.x86_64
/kvm-unit-tests/x86/access.c
/kvm-unit-tests/x86/access.h
/kvm-unit-tests/x86/access_test.c
/kvm-unit-tests/x86/amd_sev.c
/kvm-unit-tests/x86/cet.c
/kvm-unit-tests/x86/cstart.S
/kvm-unit-tests/x86/cstart64.S
/kvm-unit-tests/x86/debug.c
/kvm-unit-tests/x86/dummy.c
/kvm-unit-tests/x86/efi/README.md
/kvm-unit-tests/x86/efi/crt0-efi-x86_64.S
/kvm-unit-tests/x86/efi/efistart64.S
/kvm-unit-tests/x86/efi/elf_x86_64_efi.lds
/kvm-unit-tests/x86/efi/reloc_x86_64.c
/kvm-unit-tests/x86/efi/run
/kvm-unit-tests/x86/emulator.c
/kvm-unit-tests/x86/eventinj.c
/kvm-unit-tests/x86/flat.lds
/kvm-unit-tests/x86/memory.c
/kvm-unit-tests/x86/msr.c
/kvm-unit-tests/x86/pcid.c
/kvm-unit-tests/x86/pmu.c
/kvm-unit-tests/x86/run
/kvm-unit-tests/x86/smap.c
/kvm-unit-tests/x86/svm_tests.c
/kvm-unit-tests/x86/syscall.c
/kvm-unit-tests/x86/taskswitch.c
/kvm-unit-tests/x86/tsc_adjust.c
/kvm-unit-tests/x86/umip.c
/kvm-unit-tests/x86/unittests.cfg
/kvm-unit-tests/x86/vmexit.c
/kvm-unit-tests/x86/vmware_backdoors.c
/kvm-unit-tests/x86/vmx.c
/kvm-unit-tests/x86/vmx.h
/kvm-unit-tests/x86/vmx_tests.c
b4667f4c11-Oct-2021 Andrew Jones <drjones@redhat.com>

arm64: gic-v3: Avoid NULL dereferences

LPI allocation requires that the redistributors are configured first.
It's unlikely that offline cpus have had their redistributors
configured, so filter them

arm64: gic-v3: Avoid NULL dereferences

LPI allocation requires that the redistributors are configured first.
It's unlikely that offline cpus have had their redistributors
configured, so filter them out right away. Also, assert on any cpu,
not just the calling cpu, in gicv3_lpi_alloc_tables() when we detect
a unit test failed to follow instructions. Improve the assert with a
hint message while we're at it.

Cc: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Message-Id: <20211011160420.26785-1-drjones@redhat.com>
Signed-off-by: Andrew Jones <drjones@redhat.com>

show more ...


/kvm-unit-tests/.gitignore
/kvm-unit-tests/.gitlab-ci.yml
/kvm-unit-tests/.travis.yml
/kvm-unit-tests/MAINTAINERS
/kvm-unit-tests/Makefile
/kvm-unit-tests/README.md
/kvm-unit-tests/arm/Makefile.arm64
/kvm-unit-tests/arm/micro-bench.c
/kvm-unit-tests/arm/psci.c
/kvm-unit-tests/arm/timer.c
/kvm-unit-tests/ci/cirrus-ci-macos-i386.yml
/kvm-unit-tests/ci/cirrus-ci-macos-x86-64.yml
/kvm-unit-tests/configure
/kvm-unit-tests/lib/argv.h
/kvm-unit-tests/lib/arm/gic-v3.c
/kvm-unit-tests/lib/arm/io.h
/kvm-unit-tests/lib/arm/mmu.c
gic-v3-its.c
/kvm-unit-tests/lib/libcflat.h
/kvm-unit-tests/lib/linux/compiler.h
/kvm-unit-tests/lib/powerpc/io.h
/kvm-unit-tests/lib/report.c
/kvm-unit-tests/lib/s390x/asm/arch_def.h
/kvm-unit-tests/lib/s390x/asm/float.h
/kvm-unit-tests/lib/s390x/asm/interrupt.h
/kvm-unit-tests/lib/s390x/asm/mem.h
/kvm-unit-tests/lib/s390x/asm/page.h
/kvm-unit-tests/lib/s390x/asm/pgtable.h
/kvm-unit-tests/lib/s390x/asm/uv.h
/kvm-unit-tests/lib/s390x/css_lib.c
/kvm-unit-tests/lib/s390x/interrupt.c
/kvm-unit-tests/lib/s390x/mmu.c
/kvm-unit-tests/lib/s390x/mmu.h
/kvm-unit-tests/lib/s390x/sclp.c
/kvm-unit-tests/lib/s390x/sie.c
/kvm-unit-tests/lib/s390x/sie.h
/kvm-unit-tests/lib/s390x/smp.c
/kvm-unit-tests/lib/s390x/stack.c
/kvm-unit-tests/lib/s390x/uv.c
/kvm-unit-tests/lib/util.c
/kvm-unit-tests/lib/vmalloc.c
/kvm-unit-tests/lib/vmalloc.h
/kvm-unit-tests/lib/x86/processor.h
/kvm-unit-tests/lib/x86/vm.c
/kvm-unit-tests/powerpc/Makefile.common
/kvm-unit-tests/run_tests.sh
/kvm-unit-tests/s390x/Makefile
/kvm-unit-tests/s390x/cpu.S
/kvm-unit-tests/s390x/css.c
/kvm-unit-tests/s390x/diag288.c
/kvm-unit-tests/s390x/edat.c
/kvm-unit-tests/s390x/gs.c
/kvm-unit-tests/s390x/iep.c
/kvm-unit-tests/s390x/mvpg-sie.c
/kvm-unit-tests/s390x/run
/kvm-unit-tests/s390x/selftest.c
/kvm-unit-tests/s390x/sie.c
/kvm-unit-tests/s390x/skrf.c
/kvm-unit-tests/s390x/smp.c
/kvm-unit-tests/s390x/snippets/c/cstart.S
/kvm-unit-tests/s390x/snippets/c/flat.lds
/kvm-unit-tests/s390x/snippets/c/mvpg-snippet.c
/kvm-unit-tests/s390x/stsi.c
/kvm-unit-tests/s390x/unittests.cfg
/kvm-unit-tests/s390x/uv-host.c
/kvm-unit-tests/s390x/vector.c
/kvm-unit-tests/scripts/arch-run.bash
/kvm-unit-tests/scripts/get_maintainer.pl
/kvm-unit-tests/scripts/s390x/func.bash
/kvm-unit-tests/x86/access.c
/kvm-unit-tests/x86/asyncpf.c
/kvm-unit-tests/x86/debug.c
/kvm-unit-tests/x86/emulator.c
/kvm-unit-tests/x86/hyperv_stimer.c
/kvm-unit-tests/x86/hyperv_synic.c
/kvm-unit-tests/x86/pmu_lbr.c
/kvm-unit-tests/x86/realmode.c
/kvm-unit-tests/x86/svm.c
/kvm-unit-tests/x86/svm.h
/kvm-unit-tests/x86/svm_tests.c
/kvm-unit-tests/x86/syscall.c
/kvm-unit-tests/x86/taskswitch2.c
/kvm-unit-tests/x86/tsc_adjust.c
/kvm-unit-tests/x86/umip.c
/kvm-unit-tests/x86/vmx.c
/kvm-unit-tests/x86/vmx.h
/kvm-unit-tests/x86/vmx_tests.c
80e8b3d810-Jun-2021 Cornelia Huck <cohuck@redhat.com>

header guards: clean up some stragglers

Some headers had been missed during the initial header guard
standardization.

Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: Laurent Vivier <l

header guards: clean up some stragglers

Some headers had been missed during the initial header guard
standardization.

Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20210610135937.94375-2-cohuck@redhat.com>

show more ...


/kvm-unit-tests/configure
/kvm-unit-tests/lib/arm/asm/mmu-api.h
/kvm-unit-tests/lib/arm/asm/mmu.h
asm/mmu.h
/kvm-unit-tests/lib/pci.h
/kvm-unit-tests/lib/s390x/asm/arch_def.h
/kvm-unit-tests/lib/s390x/asm/barrier.h
/kvm-unit-tests/lib/s390x/asm/cpacf.h
/kvm-unit-tests/lib/s390x/asm/facility.h
/kvm-unit-tests/lib/s390x/asm/float.h
/kvm-unit-tests/lib/s390x/asm/mem.h
/kvm-unit-tests/lib/s390x/asm/sigp.h
/kvm-unit-tests/lib/s390x/asm/spinlock.h
/kvm-unit-tests/lib/s390x/asm/time.h
/kvm-unit-tests/lib/s390x/asm/uv.h
/kvm-unit-tests/lib/s390x/css.h
/kvm-unit-tests/lib/s390x/interrupt.h
/kvm-unit-tests/lib/s390x/mmu.h
/kvm-unit-tests/lib/s390x/sclp.h
/kvm-unit-tests/lib/s390x/sie.h
/kvm-unit-tests/lib/s390x/smp.h
/kvm-unit-tests/lib/s390x/uv.h
/kvm-unit-tests/lib/s390x/vm.h
/kvm-unit-tests/lib/x86/acpi.h
/kvm-unit-tests/lib/x86/apic-defs.h
/kvm-unit-tests/lib/x86/apic.h
/kvm-unit-tests/lib/x86/asm/barrier.h
/kvm-unit-tests/lib/x86/asm/debugreg.h
/kvm-unit-tests/lib/x86/asm/io.h
/kvm-unit-tests/lib/x86/asm/memory_areas.h
/kvm-unit-tests/lib/x86/asm/page.h
/kvm-unit-tests/lib/x86/asm/pci.h
/kvm-unit-tests/lib/x86/asm/spinlock.h
/kvm-unit-tests/lib/x86/asm/stack.h
/kvm-unit-tests/lib/x86/atomic.h
/kvm-unit-tests/lib/x86/delay.h
/kvm-unit-tests/lib/x86/desc.h
/kvm-unit-tests/lib/x86/fault_test.h
/kvm-unit-tests/lib/x86/fwcfg.h
/kvm-unit-tests/lib/x86/intel-iommu.h
/kvm-unit-tests/lib/x86/io.c
/kvm-unit-tests/lib/x86/isr.h
/kvm-unit-tests/lib/x86/msr.h
/kvm-unit-tests/lib/x86/processor.h
/kvm-unit-tests/lib/x86/smp.h
/kvm-unit-tests/lib/x86/usermode.h
/kvm-unit-tests/lib/x86/vm.h
/kvm-unit-tests/powerpc/spapr.h
/kvm-unit-tests/s390x/sthyi.h
/kvm-unit-tests/x86/emulator.c
/kvm-unit-tests/x86/hypercall.c
/kvm-unit-tests/x86/hyperv.h
/kvm-unit-tests/x86/hyperv_clock.c
/kvm-unit-tests/x86/ioram.h
/kvm-unit-tests/x86/kvmclock.h
/kvm-unit-tests/x86/pmu.c
/kvm-unit-tests/x86/realmode.c
/kvm-unit-tests/x86/smptest.c
/kvm-unit-tests/x86/svm.h
/kvm-unit-tests/x86/syscall.c
/kvm-unit-tests/x86/tsx-ctrl.c
/kvm-unit-tests/x86/types.h
/kvm-unit-tests/x86/vmx.h
/kvm-unit-tests/x86/vmx_tests.c
16f52ec909-Jun-2021 Cornelia Huck <cohuck@redhat.com>

arm: unify header guards

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

arm: unify header guards

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>

show more ...

e97e1c8211-Nov-2020 Andrew Jones <drjones@redhat.com>

arm/arm64: mmu: Stop mapping an assumed IO region

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 b

arm/arm64: mmu: Stop mapping an assumed IO region

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>

show more ...

a09aa3fb25-Mar-2021 Andrew Jones <drjones@redhat.com>

arm64: Output PC load offset on unhandled exceptions

Since for arm64 we can load the unit tests at different addresses,
then let's make it easier to debug by calculating the PC offset for
the user.

arm64: Output PC load offset on unhandled exceptions

Since for arm64 we can load the unit tests at different addresses,
then let's make it easier to debug by calculating the PC offset for
the user. The offset can then be directly used when looking at the
disassembly of the test's elf file.

Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Signed-off-by: Andrew Jones <drjones@redhat.com>

show more ...

8425ac5c22-Mar-2021 Alexandru Elisei <alexandru.elisei@arm.com>

arm64: Disable TTBR1_EL1 translation table walks

From an architectural point of view, the PE can speculate instruction
fetches and data reads at any time when the MMU is enabled using the
translatio

arm64: Disable TTBR1_EL1 translation table walks

From an architectural point of view, the PE can speculate instruction
fetches and data reads at any time when the MMU is enabled using the
translation tables from TTBR0_EL1 and TTBR1_EL1. kvm-unit-tests uses an
identity map, and as such it only programs TTBR0_EL1 with a valid table and
leaves TTBR1_EL1 unchanged. The reset value for TTBR1_EL1 is UNKNOWN, which
means it is possible for the PE to perform reads from memory locations
where accesses can cause side effects (like memory-mapped devices) as part
of the speculated translation table walk.

So far, this hasn't been a problem, because KVM resets TTBR{0,1}_EL1 to
zero, and that address is used for emulation for both qemu and kvmtool and
it doesn't point to a real device. However, kvm-unit-tests shouldn't rely
on a particular combination of hypervisor and userspace for correctness.
Another situation where we can't rely on these assumptions being true is
when kvm-unit-tests is run as an EFI app.

To prevent reads from arbitrary addresses, set the TCR_EL1.EPD1 bit to
disable speculative translation table walks using TTBR1_EL1.

This is similar to EDK2 commit fafb7e9c110e ("ArmPkg: correct TTBR1_EL1
settings in TCR_EL1"). Also mentioned in that commit is the Cortex-A57
erratum 822227 which impacts the hypervisor, but kvm-unit-tests is
protected against it because asm_mmu_enable sets both the TCR_EL1.TG0 and
TCR_EL1.TG1 bits when programming the register.

Suggested-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Alexandru Elisei <alexandru.elisei@arm.com>
Signed-off-by: Andrew Jones <drjones@redhat.com>

show more ...

10b65ce722-Mar-2021 Alexandru Elisei <alexandru.elisei@arm.com>

arm64: Configure SCTLR_EL1 at boot

Some fields in SCTLR_EL1 are UNKNOWN at reset and the arm64 boot
requirements, as stated by Linux in Documentation/arm64/booting.rst, do not
specify a particular v

arm64: Configure SCTLR_EL1 at boot

Some fields in SCTLR_EL1 are UNKNOWN at reset and the arm64 boot
requirements, as stated by Linux in Documentation/arm64/booting.rst, do not
specify a particular value for all the fields. Do not rely on the good will
of the hypervisor and userspace to set SCTLR_EL1 to a sane value (by their
definition of sane) and set SCTLR_EL1 explicitely before running setup().
This will ensure that all tests are performed with the hardware set up
identically, regardless of the KVM or VMM versions.

Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Alexandru Elisei <alexandru.elisei@arm.com>
Signed-off-by: Andrew Jones <drjones@redhat.com>

show more ...

1dd3501a22-Mar-2021 Alexandru Elisei <alexandru.elisei@arm.com>

lib: arm64: Consolidate register definitions to sysreg.h

Move system register field definitions to sysreg.h, where the opcodes for
system register access are defined, to align ourselves with the Lin

lib: arm64: Consolidate register definitions to sysreg.h

Move system register field definitions to sysreg.h, where the opcodes for
system register access are defined, to align ourselves with the Linux
kernel. EL2 support, needed for EFI and nested virtualization testing, will
require additional register and field definions, and having them in the
same place as Linux will make maintenance easier.

Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Alexandru Elisei <alexandru.elisei@arm.com>
Signed-off-by: Andrew Jones <drjones@redhat.com>

show more ...

1234