[PATCH v3 2/2] s390/pgtable: add missing hardware bits for puds, pmds

Claudio Imbrenda posted 2 patches 1 year, 7 months ago
There is a newer version of this series
[PATCH v3 2/2] s390/pgtable: add missing hardware bits for puds, pmds
Posted by Claudio Imbrenda 1 year, 7 months ago
Add the table type and ACCF validity bits to _SEGMENT_ENTRY_BITS and
_SEGMENT_ENTRY_HARDWARE_BITS{,_LARGE}.

For completeness, introduce _REGION3_ENTRY_HARDWARE_BITS_LARGE and
_REGION3_ENTRY_HARDWARE_BITS, containing the hardware bits used for
large puds and normal puds.

Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
---
 arch/s390/include/asm/pgtable.h | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/arch/s390/include/asm/pgtable.h b/arch/s390/include/asm/pgtable.h
index 3da2995fd196..e2f713fae9c9 100644
--- a/arch/s390/include/asm/pgtable.h
+++ b/arch/s390/include/asm/pgtable.h
@@ -262,6 +262,8 @@ static inline int is_module_addr(void *addr)
 #define _REGION3_ENTRY		(_REGION_ENTRY_TYPE_R3 | _REGION_ENTRY_LENGTH)
 #define _REGION3_ENTRY_EMPTY	(_REGION_ENTRY_TYPE_R3 | _REGION_ENTRY_INVALID)
 
+#define _REGION3_ENTRY_HARDWARE_BITS_LARGE	0xffffffff8001073cUL
+#define _REGION3_ENTRY_HARDWARE_BITS		0xfffffffffffff6ffUL
 #define _REGION3_ENTRY_ORIGIN_LARGE ~0x7fffffffUL /* large page address	     */
 #define _REGION3_ENTRY_DIRTY	0x2000	/* SW region dirty bit */
 #define _REGION3_ENTRY_YOUNG	0x1000	/* SW region young bit */
@@ -278,9 +280,9 @@ static inline int is_module_addr(void *addr)
 #define _REGION_ENTRY_BITS	 0xfffffffffffff22fUL
 
 /* Bits in the segment table entry */
-#define _SEGMENT_ENTRY_BITS			0xfffffffffffffe33UL
-#define _SEGMENT_ENTRY_HARDWARE_BITS		0xfffffffffffffe30UL
-#define _SEGMENT_ENTRY_HARDWARE_BITS_LARGE	0xfffffffffff00730UL
+#define _SEGMENT_ENTRY_BITS			0xfffffffffffffe3fUL
+#define _SEGMENT_ENTRY_HARDWARE_BITS		0xfffffffffffffe3cUL
+#define _SEGMENT_ENTRY_HARDWARE_BITS_LARGE	0xfffffffffff1073cUL
 #define _SEGMENT_ENTRY_ORIGIN_LARGE ~0xfffffUL /* large page address	    */
 #define _SEGMENT_ENTRY_ORIGIN	~0x7ffUL/* page table origin		    */
 #define _SEGMENT_ENTRY_PROTECT	0x200	/* segment protection bit	    */
-- 
2.44.0
Re: [PATCH v3 2/2] s390/pgtable: add missing hardware bits for puds, pmds
Posted by Heiko Carstens 1 year, 7 months ago
On Fri, Apr 26, 2024 at 02:04:47PM +0200, Claudio Imbrenda wrote:
> Add the table type and ACCF validity bits to _SEGMENT_ENTRY_BITS and
> _SEGMENT_ENTRY_HARDWARE_BITS{,_LARGE}.
> 
> For completeness, introduce _REGION3_ENTRY_HARDWARE_BITS_LARGE and
> _REGION3_ENTRY_HARDWARE_BITS, containing the hardware bits used for
> large puds and normal puds.
> 
> Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
> ---
>  arch/s390/include/asm/pgtable.h | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)

...
> +#define _REGION3_ENTRY_HARDWARE_BITS_LARGE	0xffffffff8001073cUL
> +#define _REGION3_ENTRY_HARDWARE_BITS		0xfffffffffffff6ffUL
...
> +#define _SEGMENT_ENTRY_BITS			0xfffffffffffffe3fUL
> +#define _SEGMENT_ENTRY_HARDWARE_BITS		0xfffffffffffffe3cUL
> +#define _SEGMENT_ENTRY_HARDWARE_BITS_LARGE	0xfffffffffff1073cUL

Please resend and make sure the order (BITS, BITS_LARGE, ...) is the
same; then Alexander can pick this up.

For the definitions:
Reviewed-by: Heiko Carstens <hca@linux.ibm.com>
Re: [PATCH v3 2/2] s390/pgtable: add missing hardware bits for puds, pmds
Posted by Claudio Imbrenda 1 year, 7 months ago
On Mon, 29 Apr 2024 15:11:49 +0200
Heiko Carstens <hca@linux.ibm.com> wrote:

> On Fri, Apr 26, 2024 at 02:04:47PM +0200, Claudio Imbrenda wrote:
> > Add the table type and ACCF validity bits to _SEGMENT_ENTRY_BITS and
> > _SEGMENT_ENTRY_HARDWARE_BITS{,_LARGE}.
> > 
> > For completeness, introduce _REGION3_ENTRY_HARDWARE_BITS_LARGE and
> > _REGION3_ENTRY_HARDWARE_BITS, containing the hardware bits used for
> > large puds and normal puds.
> > 
> > Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
> > ---
> >  arch/s390/include/asm/pgtable.h | 8 +++++---
> >  1 file changed, 5 insertions(+), 3 deletions(-)  
> 
> ...
> > +#define _REGION3_ENTRY_HARDWARE_BITS_LARGE	0xffffffff8001073cUL
> > +#define _REGION3_ENTRY_HARDWARE_BITS		0xfffffffffffff6ffUL  
> ...
> > +#define _SEGMENT_ENTRY_BITS			0xfffffffffffffe3fUL
> > +#define _SEGMENT_ENTRY_HARDWARE_BITS		0xfffffffffffffe3cUL
> > +#define _SEGMENT_ENTRY_HARDWARE_BITS_LARGE	0xfffffffffff1073cUL  
> 
> Please resend and make sure the order (BITS, BITS_LARGE, ...) is the
> same; then Alexander can pick this up.

oops, will fix

> 
> For the definitions:
> Reviewed-by: Heiko Carstens <hca@linux.ibm.com>