Commit e5ff0127 authored by Clément Léger's avatar Clément Léger Committed by Anup Patel
Browse files

riscv: kvm: use ".L" local labels in assembly when applicable



For the sake of coherency, use local labels in assembly when
applicable. This also avoid kprobes being confused when applying a
kprobe since the size of function is computed by checking where the
next visible symbol is located. This might end up in computing some
function size to be way shorter than expected and thus failing to apply
kprobes to the specified offset.

Signed-off-by: default avatarClément Léger <cleger@rivosinc.com>
Reviewed-by: default avatarAndrew Jones <ajones@ventanamicro.com>
Acked-by: default avatarPalmer Dabbelt <palmer@rivosinc.com>
Signed-off-by: default avatarAnup Patel <anup@brainfault.org>
parent 683c5bbb
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -45,7 +45,7 @@ SYM_FUNC_START(__kvm_riscv_switch_to)
	REG_L	t0, (KVM_ARCH_GUEST_SSTATUS)(a0)
	REG_L	t1, (KVM_ARCH_GUEST_HSTATUS)(a0)
	REG_L	t2, (KVM_ARCH_GUEST_SCOUNTEREN)(a0)
	la	t4, __kvm_switch_return
	la	t4, .Lkvm_switch_return
	REG_L	t5, (KVM_ARCH_GUEST_SEPC)(a0)

	/* Save Host and Restore Guest SSTATUS */
@@ -113,7 +113,7 @@ SYM_FUNC_START(__kvm_riscv_switch_to)

	/* Back to Host */
	.align 2
__kvm_switch_return:
.Lkvm_switch_return:
	/* Swap Guest A0 with SSCRATCH */
	csrrw	a0, CSR_SSCRATCH, a0