[PATCH 24/32] s390/kvm: Convert inline assembly to EX_TABLE_INSN
From: Heiko Carstens
Date: Thu Oct 01 2026 - 06:44:10 EST
Convert the gaccess mvcos exception table entries to use EX_TABLE_INSN.
With EX_TABLE_INSN entries always point to the faulting instruction,
so duplicate entries are removed.
Signed-off-by: Heiko Carstens <hca@xxxxxxxxxxxxx>
---
arch/s390/kvm/s390/gaccess.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/arch/s390/kvm/s390/gaccess.c b/arch/s390/kvm/s390/gaccess.c
index 405345ccc4f1..2d27dcb68002 100644
--- a/arch/s390/kvm/s390/gaccess.c
+++ b/arch/s390/kvm/s390/gaccess.c
@@ -838,12 +838,11 @@ static int mvcos_key(void *to, const void *from, unsigned long size, u8 dst_key,
int exception = PGM_PROTECTION;
asm_inline volatile(
- " lr %%r0,%[spec]\n"
- "0: mvcos %[to],%[from],%[size]\n"
- "1: lhi %[exc],0\n"
- "2:\n"
- EX_TABLE(0b, 2b)
- EX_TABLE(1b, 2b)
+ " lr %%r0,%[spec]\n"
+ "0: mvcos %[to],%[from],%[size]\n"
+ " lhi %[exc],0\n"
+ "1:\n"
+ EX_TABLE_INSN(0b, 1b)
: [size] "+d" (size), [to] "=Q" (*(char *)to), [exc] "+d" (exception)
: [spec] "d" (spec.val), [from] "Q" (*(const char *)from)
: "memory", "cc", "0");
--
2.53.0