mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 04:04:43 +01:00
KVM: s390: Add P bit in table entry bitfields, move union vaddress
Add P bit in hardware definition of region 3 and segment table entries. Move union vaddress from kvm/gaccess.c to asm/dat_bits.h Reviewed-by: Christian Borntraeger <borntraeger@linux.ibm.com> Reviewed-by: Steffen Eiden <seiden@linux.ibm.com> Reviewed-by: Christoph Schlameuss <schlameuss@linux.ibm.com> Acked-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
This commit is contained in:
parent
05664e0021
commit
013bf0f57e
2 changed files with 30 additions and 28 deletions
|
|
@ -9,6 +9,32 @@
|
|||
#ifndef _S390_DAT_BITS_H
|
||||
#define _S390_DAT_BITS_H
|
||||
|
||||
/*
|
||||
* vaddress union in order to easily decode a virtual address into its
|
||||
* region first index, region second index etc. parts.
|
||||
*/
|
||||
union vaddress {
|
||||
unsigned long addr;
|
||||
struct {
|
||||
unsigned long rfx : 11;
|
||||
unsigned long rsx : 11;
|
||||
unsigned long rtx : 11;
|
||||
unsigned long sx : 11;
|
||||
unsigned long px : 8;
|
||||
unsigned long bx : 12;
|
||||
};
|
||||
struct {
|
||||
unsigned long rfx01 : 2;
|
||||
unsigned long : 9;
|
||||
unsigned long rsx01 : 2;
|
||||
unsigned long : 9;
|
||||
unsigned long rtx01 : 2;
|
||||
unsigned long : 9;
|
||||
unsigned long sx01 : 2;
|
||||
unsigned long : 29;
|
||||
};
|
||||
};
|
||||
|
||||
union asce {
|
||||
unsigned long val;
|
||||
struct {
|
||||
|
|
@ -98,7 +124,8 @@ union region3_table_entry {
|
|||
struct {
|
||||
unsigned long : 53;
|
||||
unsigned long fc: 1; /* Format-Control */
|
||||
unsigned long : 4;
|
||||
unsigned long p : 1; /* DAT-Protection Bit */
|
||||
unsigned long : 3;
|
||||
unsigned long i : 1; /* Region-Invalid Bit */
|
||||
unsigned long cr: 1; /* Common-Region Bit */
|
||||
unsigned long tt: 2; /* Table-Type Bits */
|
||||
|
|
@ -140,7 +167,8 @@ union segment_table_entry {
|
|||
struct {
|
||||
unsigned long : 53;
|
||||
unsigned long fc: 1; /* Format-Control */
|
||||
unsigned long : 4;
|
||||
unsigned long p : 1; /* DAT-Protection Bit */
|
||||
unsigned long : 3;
|
||||
unsigned long i : 1; /* Segment-Invalid Bit */
|
||||
unsigned long cs: 1; /* Common-Segment Bit */
|
||||
unsigned long tt: 2; /* Table-Type Bits */
|
||||
|
|
|
|||
|
|
@ -20,32 +20,6 @@
|
|||
|
||||
#define GMAP_SHADOW_FAKE_TABLE 1ULL
|
||||
|
||||
/*
|
||||
* vaddress union in order to easily decode a virtual address into its
|
||||
* region first index, region second index etc. parts.
|
||||
*/
|
||||
union vaddress {
|
||||
unsigned long addr;
|
||||
struct {
|
||||
unsigned long rfx : 11;
|
||||
unsigned long rsx : 11;
|
||||
unsigned long rtx : 11;
|
||||
unsigned long sx : 11;
|
||||
unsigned long px : 8;
|
||||
unsigned long bx : 12;
|
||||
};
|
||||
struct {
|
||||
unsigned long rfx01 : 2;
|
||||
unsigned long : 9;
|
||||
unsigned long rsx01 : 2;
|
||||
unsigned long : 9;
|
||||
unsigned long rtx01 : 2;
|
||||
unsigned long : 9;
|
||||
unsigned long sx01 : 2;
|
||||
unsigned long : 29;
|
||||
};
|
||||
};
|
||||
|
||||
/*
|
||||
* raddress union which will contain the result (real or absolute address)
|
||||
* after a page table walk. The rfaa, sfaa and pfra members are used to
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue