diff mbox series

[kvm-unit-tests,1/5] lib: s390x: Add spm cc shift constant

Message ID 20240108132921.255769-2-frankja@linux.ibm.com (mailing list archive)
State New, archived
Headers show
Series s390x: Dirty cc before executing tested instructions | expand

Commit Message

Janosch Frank Jan. 8, 2024, 1:29 p.m. UTC
Set Program Mask expects the CC in bits 34 and 35 of a GPR.
Adding a constant makes setting the CC in inline assembly a bit easier.

Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
---
 lib/s390x/asm/arch_def.h | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/lib/s390x/asm/arch_def.h b/lib/s390x/asm/arch_def.h
index 745a3387..65ae1e93 100644
--- a/lib/s390x/asm/arch_def.h
+++ b/lib/s390x/asm/arch_def.h
@@ -84,6 +84,8 @@  struct cpu {
 	bool in_interrupt_handler;
 };
 
+#define SPM_CC_SHIFT 28
+
 enum address_space {
 	AS_PRIM = 0,
 	AS_ACCR = 1,