summaryrefslogtreecommitdiffstats
path: root/arch/s390/kvm/gaccess.h
diff options
context:
space:
mode:
authorMichael Mueller <mimu@linux.vnet.ibm.com>2014-05-13 16:58:30 +0200
committerChristian Borntraeger <borntraeger@de.ibm.com>2014-05-16 14:57:31 +0200
commitfda902cb8347da121025c4079b9e87748228a27e (patch)
treeb5cbcce14afbe2da194e4b3cb8f1594cea800fb5 /arch/s390/kvm/gaccess.h
parents390/sclp: add sclp_get_ibc function (diff)
downloadlinux-fda902cb8347da121025c4079b9e87748228a27e.tar.xz
linux-fda902cb8347da121025c4079b9e87748228a27e.zip
KVM: s390: split SIE state guest prefix field
This patch splits the SIE state guest prefix at offset 4 into a prefix bit field. Additionally it provides the access functions: - kvm_s390_get_prefix() - kvm_s390_set_prefix() to access the prefix per vcpu. Signed-off-by: Michael Mueller <mimu@linux.vnet.ibm.com> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
Diffstat (limited to 'arch/s390/kvm/gaccess.h')
-rw-r--r--arch/s390/kvm/gaccess.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/s390/kvm/gaccess.h b/arch/s390/kvm/gaccess.h
index 68db43e4254f..a07ee08ac478 100644
--- a/arch/s390/kvm/gaccess.h
+++ b/arch/s390/kvm/gaccess.h
@@ -30,7 +30,7 @@
static inline unsigned long kvm_s390_real_to_abs(struct kvm_vcpu *vcpu,
unsigned long gra)
{
- unsigned long prefix = vcpu->arch.sie_block->prefix;
+ unsigned long prefix = kvm_s390_get_prefix(vcpu);
if (gra < 2 * PAGE_SIZE)
gra += prefix;
@@ -99,7 +99,7 @@ static inline unsigned long kvm_s390_logical_to_effective(struct kvm_vcpu *vcpu,
unsigned long __gpa; \
\
__gpa = (unsigned long)(gra); \
- __gpa += __vcpu->arch.sie_block->prefix; \
+ __gpa += kvm_s390_get_prefix(__vcpu); \
kvm_write_guest(__vcpu->kvm, __gpa, &__x, sizeof(__x)); \
})
@@ -124,7 +124,7 @@ static inline __must_check
int write_guest_lc(struct kvm_vcpu *vcpu, unsigned long gra, void *data,
unsigned long len)
{
- unsigned long gpa = gra + vcpu->arch.sie_block->prefix;
+ unsigned long gpa = gra + kvm_s390_get_prefix(vcpu);
return kvm_write_guest(vcpu->kvm, gpa, data, len);
}
@@ -150,7 +150,7 @@ static inline __must_check
int read_guest_lc(struct kvm_vcpu *vcpu, unsigned long gra, void *data,
unsigned long len)
{
- unsigned long gpa = gra + vcpu->arch.sie_block->prefix;
+ unsigned long gpa = gra + kvm_s390_get_prefix(vcpu);
return kvm_read_guest(vcpu->kvm, gpa, data, len);
}