diff options
author | David Hildenbrand <dahi@linux.vnet.ibm.com> | 2015-11-16 09:42:11 -0500 |
---|---|---|
committer | Christian Borntraeger <borntraeger@de.ibm.com> | 2016-02-10 07:12:50 -0500 |
commit | 92c9632119b67f3e201240f6813cd0343bfb0141 (patch) | |
tree | 3ff5116af2531962e9686cb8b1214f907aff105c /arch/s390/kvm/intercept.c | |
parent | 634790b82759c98ee57c80966d859083fa2fcd8c (diff) |
KVM: s390: gaccess: introduce access modes
We will need special handling when fetching instructions, so let's
introduce new guest access modes GACC_FETCH and GACC_STORE instead
of a write flag. An additional patch will then introduce GACC_IFETCH.
Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Diffstat (limited to 'arch/s390/kvm/intercept.c')
-rw-r--r-- | arch/s390/kvm/intercept.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/s390/kvm/intercept.c b/arch/s390/kvm/intercept.c index 7f992e02124a..44bb923a6482 100644 --- a/arch/s390/kvm/intercept.c +++ b/arch/s390/kvm/intercept.c | |||
@@ -317,7 +317,7 @@ static int handle_mvpg_pei(struct kvm_vcpu *vcpu) | |||
317 | 317 | ||
318 | /* Make sure that the source is paged-in */ | 318 | /* Make sure that the source is paged-in */ |
319 | rc = guest_translate_address(vcpu, vcpu->run->s.regs.gprs[reg2], | 319 | rc = guest_translate_address(vcpu, vcpu->run->s.regs.gprs[reg2], |
320 | reg2, &srcaddr, 0); | 320 | reg2, &srcaddr, GACC_FETCH); |
321 | if (rc) | 321 | if (rc) |
322 | return kvm_s390_inject_prog_cond(vcpu, rc); | 322 | return kvm_s390_inject_prog_cond(vcpu, rc); |
323 | rc = kvm_arch_fault_in_page(vcpu, srcaddr, 0); | 323 | rc = kvm_arch_fault_in_page(vcpu, srcaddr, 0); |
@@ -326,7 +326,7 @@ static int handle_mvpg_pei(struct kvm_vcpu *vcpu) | |||
326 | 326 | ||
327 | /* Make sure that the destination is paged-in */ | 327 | /* Make sure that the destination is paged-in */ |
328 | rc = guest_translate_address(vcpu, vcpu->run->s.regs.gprs[reg1], | 328 | rc = guest_translate_address(vcpu, vcpu->run->s.regs.gprs[reg1], |
329 | reg1, &dstaddr, 1); | 329 | reg1, &dstaddr, GACC_STORE); |
330 | if (rc) | 330 | if (rc) |
331 | return kvm_s390_inject_prog_cond(vcpu, rc); | 331 | return kvm_s390_inject_prog_cond(vcpu, rc); |
332 | rc = kvm_arch_fault_in_page(vcpu, dstaddr, 1); | 332 | rc = kvm_arch_fault_in_page(vcpu, dstaddr, 1); |