| 1 |
|
| 2 | |
| 3 | * s390x processor specific defines
|
| 4 |
|
| 5 | #ifndef SELFTEST_KVM_PROCESSOR_H
|
| 6 | #define SELFTEST_KVM_PROCESSOR_H
|
| 7 |
|
| 8 | #include <linux/compiler.h>
|
| 9 |
|
| 10 |
|
| 11 | #define REGION_ENTRY_ORIGIN ~0xfffUL
|
| 12 | #define REGION_ENTRY_PROTECT 0x200
|
| 13 | #define REGION_ENTRY_NOEXEC 0x100
|
| 14 | #define REGION_ENTRY_OFFSET 0xc0
|
| 15 | #define REGION_ENTRY_INVALID 0x20
|
| 16 | #define REGION_ENTRY_TYPE 0x0c
|
| 17 | #define REGION_ENTRY_LENGTH 0x03
|
| 18 |
|
| 19 |
|
| 20 | #define PAGE_INVALID 0x400
|
| 21 | #define PAGE_PROTECT 0x200
|
| 22 | #define PAGE_NOEXEC 0x100
|
| 23 |
|
| 24 |
|
| 25 | #define PAGE_SHIFT 12
|
| 26 | #define PAGE_SIZE BIT_ULL(PAGE_SHIFT)
|
| 27 | #define PAGE_MASK (~(PAGE_SIZE - 1))
|
| 28 |
|
| 29 |
|
| 30 | static inline void cpu_relax(void)
|
| 31 | {
|
| 32 | barrier();
|
| 33 | }
|
| 34 |
|
| 35 |
|
| 36 | static inline int insn_length(unsigned char code)
|
| 37 | {
|
| 38 | return ((((int)code + 64) >> 7) + 1) << 1;
|
| 39 | }
|
| 40 |
|
| 41 | #endif
|