s390x: mvpg: Dirty CC before mvpg execution
Dirtying the CC allows us to find missing CC changes when mvpg is
emulated.
Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Link: https://lore.kernel.org/r/20240131074427.70871-5-frankja@linux.ibm.com
Signed-off-by: Nico Boehr <nrb@linux.ibm.com>
diff --git a/s390x/mvpg.c b/s390x/mvpg.c
index 296338d..62d42e3 100644
--- a/s390x/mvpg.c
+++ b/s390x/mvpg.c
@@ -40,12 +40,14 @@
static inline int mvpg(unsigned long r0, void *dest, void *src)
{
register unsigned long reg0 asm ("0") = r0;
+ uint64_t bogus_cc = 3;
int cc;
- asm volatile(" mvpg %1,%2\n"
+ asm volatile(" tmll %[bogus_cc],3\n"
+ " mvpg %1,%2\n"
" ipm %0\n"
" srl %0,28"
- : "=&d" (cc) : "a" (dest), "a" (src), "d" (reg0)
+ : "=&d" (cc) : "a" (dest), "a" (src), "d" (reg0), [bogus_cc] "d" (bogus_cc)
: "memory", "cc");
return cc;
}