Skip to content

Commit ebdef0d

Browse files
committed
KVM: selftests: riscv: Fix alignment of the guest_hang() function
The guest_hang() function is used as the default exception handler for various KVM selftests applications by setting it's address in the vstvec CSR. The vstvec CSR requires exception handler base address to be at least 4-byte aligned so this patch fixes alignment of the guest_hang() function. Fixes: 3e06cdf ("KVM: selftests: Add initial support for RISC-V 64-bit") Signed-off-by: Anup Patel <[email protected]> Tested-by: Mayuresh Chitale <[email protected]> Signed-off-by: Anup Patel <[email protected]>
1 parent fac3725 commit ebdef0d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/testing/selftests/kvm/lib/riscv/processor.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ void vcpu_dump(FILE *stream, struct kvm_vm *vm, uint32_t vcpuid, uint8_t indent)
268268
core.regs.t3, core.regs.t4, core.regs.t5, core.regs.t6);
269269
}
270270

271-
static void guest_hang(void)
271+
static void __aligned(16) guest_hang(void)
272272
{
273273
while (1)
274274
;

0 commit comments

Comments
 (0)