aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/include/asm/pgtable.h
diff options
context:
space:
mode:
authorClaudio Imbrenda <imbrenda@linux.vnet.ibm.com>2017-04-20 04:03:45 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2017-04-20 07:33:08 -0400
commit2d42f9477320befd33846c4083cab898998cdee5 (patch)
tree71045127b1000beafd1760b509e6ba9e66e1d3c6 /arch/s390/include/asm/pgtable.h
parentb13de4b7adeb7a5e37a5aa78d5a4926c3cd4e131 (diff)
s390/kvm: Add PGSTE manipulation functions
Add PGSTE manipulation functions: * set_pgste_bits sets specific bits in a PGSTE * get_pgste returns the whole PGSTE * pgste_perform_essa manipulates a PGSTE to set specific storage states * ESSA_[SG]ET_* macros used to indicate the action for manipulate_pgste Signed-off-by: Claudio Imbrenda <imbrenda@linux.vnet.ibm.com> Reviewed-by: Janosch Frank <frankja@de.ibm.com> Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/include/asm/pgtable.h')
-rw-r--r--arch/s390/include/asm/pgtable.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/arch/s390/include/asm/pgtable.h b/arch/s390/include/asm/pgtable.h
index 93e37b12e882..bdabbbb3e925 100644
--- a/arch/s390/include/asm/pgtable.h
+++ b/arch/s390/include/asm/pgtable.h
@@ -372,10 +372,12 @@ static inline int is_module_addr(void *addr)
372#define PGSTE_VSIE_BIT 0x0000200000000000UL /* ref'd in a shadow table */ 372#define PGSTE_VSIE_BIT 0x0000200000000000UL /* ref'd in a shadow table */
373 373
374/* Guest Page State used for virtualization */ 374/* Guest Page State used for virtualization */
375#define _PGSTE_GPS_ZERO 0x0000000080000000UL 375#define _PGSTE_GPS_ZERO 0x0000000080000000UL
376#define _PGSTE_GPS_USAGE_MASK 0x0000000003000000UL 376#define _PGSTE_GPS_USAGE_MASK 0x0000000003000000UL
377#define _PGSTE_GPS_USAGE_STABLE 0x0000000000000000UL 377#define _PGSTE_GPS_USAGE_STABLE 0x0000000000000000UL
378#define _PGSTE_GPS_USAGE_UNUSED 0x0000000001000000UL 378#define _PGSTE_GPS_USAGE_UNUSED 0x0000000001000000UL
379#define _PGSTE_GPS_USAGE_POT_VOLATILE 0x0000000002000000UL
380#define _PGSTE_GPS_USAGE_VOLATILE _PGSTE_GPS_USAGE_MASK
379 381
380/* 382/*
381 * A user page table pointer has the space-switch-event bit, the 383 * A user page table pointer has the space-switch-event bit, the
@@ -1041,6 +1043,12 @@ int reset_guest_reference_bit(struct mm_struct *mm, unsigned long addr);
1041int get_guest_storage_key(struct mm_struct *mm, unsigned long addr, 1043int get_guest_storage_key(struct mm_struct *mm, unsigned long addr,
1042 unsigned char *key); 1044 unsigned char *key);
1043 1045
1046int set_pgste_bits(struct mm_struct *mm, unsigned long addr,
1047 unsigned long bits, unsigned long value);
1048int get_pgste(struct mm_struct *mm, unsigned long hva, unsigned long *pgstep);
1049int pgste_perform_essa(struct mm_struct *mm, unsigned long hva, int orc,
1050 unsigned long *oldpte, unsigned long *oldpgste);
1051
1044/* 1052/*
1045 * Certain architectures need to do special things when PTEs 1053 * Certain architectures need to do special things when PTEs
1046 * within a page table are directly modified. Thus, the following 1054 * within a page table are directly modified. Thus, the following