Commit 013bf0f5 authored by Claudio Imbrenda's avatar Claudio Imbrenda
Browse files

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: default avatarChristian Borntraeger <borntraeger@linux.ibm.com>
Reviewed-by: default avatarSteffen Eiden <seiden@linux.ibm.com>
Reviewed-by: default avatarChristoph Schlameuss <schlameuss@linux.ibm.com>
Acked-by: default avatarHeiko Carstens <hca@linux.ibm.com>
Signed-off-by: default avatarClaudio Imbrenda <imbrenda@linux.ibm.com>
parent 05664e00
Loading
Loading
Loading
Loading
+30 −2
Original line number Diff line number Diff line
@@ -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 */
+0 −26
Original line number Diff line number Diff line
@@ -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