#
aee1f093 |
| 23-Oct-2024 |
Raghavendra Rao Ananta <rananta@google.com> |
arm: fpu: Fix the input/output args for inline asm in fpu.c
The macros fpu_reg_{read,write} post-increment the '__val' pointer register as a part of 'stp' and 'ldp' instructions. As a result, mark i
arm: fpu: Fix the input/output args for inline asm in fpu.c
The macros fpu_reg_{read,write} post-increment the '__val' pointer register as a part of 'stp' and 'ldp' instructions. As a result, mark it with "+r" for the compiler to treat it as read-write operand.
On the contrary, sve_reg_read() never updates the value of the pointer/register. Hence, mark this as "r" for the compiler to treat it as read-only operand.
Without these adjustments, the compiler can potentially perform optimizations over the registers holding the pointers that could lead to data aborts.
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 ...
|
#
5c1c125a |
| 23-Oct-2024 |
Raghavendra Rao Ananta <rananta@google.com> |
arm: fpu: Add '.arch_extension fp' to fpu macros
Since the tests are built with '-mgeneral-regs-only', clang-18 tends to push 'q' registers out of the scope and hence, the following error is observe
arm: fpu: Add '.arch_extension fp' to fpu macros
Since the tests are built with '-mgeneral-regs-only', clang-18 tends to push 'q' registers out of the scope and hence, the following error is observed:
arm/fpu.c:281:3: error: instruction requires: fp-armv8 281 | fpu_reg_write(*indata); | ^ arm/fpu.c:74:15: note: expanded from macro 'fpu_reg_write' 74 | asm volatile("ldp q0, q1, [%0], #32\n\t" \ | ^ <inline asm>:1:2: note: instantiated into assembly here 1 | ldp q0, q1, [x8], #32 | ^
Hence, explicitly add fp support where these registers are used.
Reported-by: Andrew Jones <andrew.jones@linux.dev> Signed-off-by: Raghavendra Rao Ananta <rananta@google.com> Signed-off-by: Andrew Jones <andrew.jones@linux.dev>
show more ...
|
#
ad0b76f5 |
| 23-Oct-2024 |
Raghavendra Rao Ananta <rananta@google.com> |
arm: fpu: Convert 'q' registers to 'v' to satisfy clang
Clang doesn't seem to support 'q' register notation in the clobbered list, and hence throws the following error:
arm/fpu.c:235:3: error: unkn
arm: fpu: Convert 'q' registers to 'v' to satisfy clang
Clang doesn't seem to support 'q' register notation in the clobbered list, and hence throws the following error:
arm/fpu.c:235:3: error: unknown register name 'q0' in asm fpu_reg_read(outdata); ^ arm/fpu.c:59:10: note: expanded from macro 'fpu_reg_read' : "q0", "q1", "q2", "q3", \ ^ arm/fpu.c:281:3: error: unknown register name 'q0' in asm fpu_reg_write(*indata); ^ arm/fpu.c:92:10: note: expanded from macro 'fpu_reg_write' : "q0", "q1", "q2", "q3", \ ^ 2 errors generated.
Hence, replace 'q' with 'v' registers for the clobbered list.
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 ...
|
#
220ac1e0 |
| 12-Aug-2024 |
Andrew Jones <andrew.jones@linux.dev> |
Merge branch 'misc/queue' into 'master'
gitlab-ci fixes and improvements
See merge request kvm-unit-tests/kvm-unit-tests!64
|
#
762752f3 |
| 26-Jul-2024 |
Nicholas Piggin <npiggin@gmail.com> |
arm: Fix kerneldoc
Some invalid kerneldoc comments crept in while centos ci job was down.
Cc: Subhasish Ghosh <subhasish.ghosh@arm.com> Cc: Joey Gouly <joey.gouly@arm.com> Cc: Suzuki K Poulose <suz
arm: Fix kerneldoc
Some invalid kerneldoc comments crept in while centos ci job was down.
Cc: Subhasish Ghosh <subhasish.ghosh@arm.com> Cc: Joey Gouly <joey.gouly@arm.com> Cc: Suzuki K Poulose <suzuki.poulose@arm.com> Fixes: d47d370c8f ("arm: Add test for FPU/SIMD context save/restore") Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com> Acked-by: Andrew Jones <andrew.jones@linux.dev> Signed-off-by: Andrew Jones <andrew.jones@linux.dev>
show more ...
|
#
201b9e8b |
| 03-Jul-2024 |
Andrew Jones <andrew.jones@linux.dev> |
Merge branch 'arm/queue' into 'master'
arm/arm64: LPA2 support and fpu/sve s/r test
See merge request kvm-unit-tests/kvm-unit-tests!61
|
#
d47d370c |
| 12-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 ...
|