On 29.05.2017 21:24, Aurelien Jarno wrote: > Signed-off-by: Aurelien Jarno <aurel...@aurel32.net> > --- > target/s390x/cpu.h | 2 ++ > target/s390x/mem_helper.c | 17 ++++++++++------- > target/s390x/mmu_helper.c | 4 +--- > 3 files changed, 13 insertions(+), 10 deletions(-) > > diff --git a/target/s390x/cpu.h b/target/s390x/cpu.h > index 79235cfa45..d89ad83e71 100644 > --- a/target/s390x/cpu.h > +++ b/target/s390x/cpu.h > @@ -1033,6 +1033,8 @@ struct sysib_322 { > #define _SEGMENT_ENTRY_RO 0x200 /* page protection bit > */ > #define _SEGMENT_ENTRY_INV 0x20 /* invalid segment table entry > */ > > +#define _VADDR_PX 0xff000 /* page index bits > */
Even though the other #defines start with an underscore, we should not use this for new code anymore. #defines that start with an underscore + capital letter are reserved for the C compiler. If you're afraid that this "VADDR_PX" is not unique enough, maybe rename it to "MMU_VADDR_PX" instead? > #define _PAGE_RO 0x200 /* HW read-only bit */ > #define _PAGE_INVALID 0x400 /* HW invalid bit */ > #define _PAGE_RES0 0x800 /* bit must be zero */ [...] Thomas