s390: rename struct psw_bits members
Rename a couple of the struct psw_bits members so it is more obvious for what they are good. Initially I thought using the single character names from the PoP would be sufficient and obvious, but admittedly that is not true. The current implementation is not easy to use, if one has to look into the source file to figure out which member represents the 'per' bit (which is the 'r' member). Therefore rename the members to sane names that are identical to the uapi psw mask defines: r -> per i -> io e -> ext t -> dat m -> mcheck w -> wait p -> pstate Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
This commit is contained in:

committed by
Martin Schwidefsky

parent
8bb3fdd686
commit
a752598254
@@ -551,7 +551,7 @@ static int get_vcpu_asce(struct kvm_vcpu *vcpu, union asce *asce,
|
||||
int rc;
|
||||
struct psw_bits psw = psw_bits(vcpu->arch.sie_block->gpsw);
|
||||
|
||||
if (!psw.t) {
|
||||
if (!psw.dat) {
|
||||
asce->val = 0;
|
||||
asce->r = 1;
|
||||
return 0;
|
||||
@@ -771,7 +771,7 @@ static int low_address_protection_enabled(struct kvm_vcpu *vcpu,
|
||||
|
||||
if (!ctlreg0.lap)
|
||||
return 0;
|
||||
if (psw_bits(*psw).t && asce.p)
|
||||
if (psw_bits(*psw).dat && asce.p)
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
@@ -790,7 +790,7 @@ static int guest_page_range(struct kvm_vcpu *vcpu, unsigned long ga, u8 ar,
|
||||
return trans_exc(vcpu, PGM_PROTECTION, ga, ar, mode,
|
||||
PROT_TYPE_LA);
|
||||
ga &= PAGE_MASK;
|
||||
if (psw_bits(*psw).t) {
|
||||
if (psw_bits(*psw).dat) {
|
||||
rc = guest_translate(vcpu, ga, pages, asce, mode);
|
||||
if (rc < 0)
|
||||
return rc;
|
||||
@@ -831,7 +831,7 @@ int access_guest(struct kvm_vcpu *vcpu, unsigned long ga, u8 ar, void *data,
|
||||
pages = vmalloc(nr_pages * sizeof(unsigned long));
|
||||
if (!pages)
|
||||
return -ENOMEM;
|
||||
need_ipte_lock = psw_bits(*psw).t && !asce.r;
|
||||
need_ipte_lock = psw_bits(*psw).dat && !asce.r;
|
||||
if (need_ipte_lock)
|
||||
ipte_lock(vcpu);
|
||||
rc = guest_page_range(vcpu, ga, ar, pages, nr_pages, asce, mode);
|
||||
@@ -899,7 +899,7 @@ int guest_translate_address(struct kvm_vcpu *vcpu, unsigned long gva, u8 ar,
|
||||
mode, PROT_TYPE_LA);
|
||||
}
|
||||
|
||||
if (psw_bits(*psw).t && !asce.r) { /* Use DAT? */
|
||||
if (psw_bits(*psw).dat && !asce.r) { /* Use DAT? */
|
||||
rc = guest_translate(vcpu, gva, gpa, asce, mode);
|
||||
if (rc > 0)
|
||||
return trans_exc(vcpu, rc, gva, 0, mode, PROT_TYPE_DAT);
|
||||
|
Reference in New Issue
Block a user