aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kvm/book3s_emulate.c
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2010-07-29 08:47:45 -0400
committerAvi Kivity <avi@redhat.com>2010-10-24 04:50:45 -0400
commit5e030186dfc4e4e47c84d2557b17e4aa06c76f96 (patch)
treef41b39de6fc9367537d89fa358a00db4b3d07935 /arch/powerpc/kvm/book3s_emulate.c
parentd562de48de68b60b3d2522e7d8273d7112034ee6 (diff)
KVM: PPC: Convert DAR to shared page.
The DAR register contains the address a data page fault occured at. This register behaves pretty much like a simple data storage register that gets written to on data faults. There is no hypervisor interaction required on read or write. This patch converts all users of the current field to the shared page. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/powerpc/kvm/book3s_emulate.c')
-rw-r--r--arch/powerpc/kvm/book3s_emulate.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/powerpc/kvm/book3s_emulate.c b/arch/powerpc/kvm/book3s_emulate.c
index 9982ff163af0..c1478642f856 100644
--- a/arch/powerpc/kvm/book3s_emulate.c
+++ b/arch/powerpc/kvm/book3s_emulate.c
@@ -212,7 +212,7 @@ int kvmppc_core_emulate_op(struct kvm_run *run, struct kvm_vcpu *vcpu,
212 r = kvmppc_st(vcpu, &addr, 32, zeros, true); 212 r = kvmppc_st(vcpu, &addr, 32, zeros, true);
213 if ((r == -ENOENT) || (r == -EPERM)) { 213 if ((r == -ENOENT) || (r == -EPERM)) {
214 *advance = 0; 214 *advance = 0;
215 vcpu->arch.dear = vaddr; 215 vcpu->arch.shared->dar = vaddr;
216 to_svcpu(vcpu)->fault_dar = vaddr; 216 to_svcpu(vcpu)->fault_dar = vaddr;
217 217
218 dsisr = DSISR_ISSTORE; 218 dsisr = DSISR_ISSTORE;
@@ -330,7 +330,7 @@ int kvmppc_core_emulate_mtspr(struct kvm_vcpu *vcpu, int sprn, int rs)
330 vcpu->arch.shared->dsisr = spr_val; 330 vcpu->arch.shared->dsisr = spr_val;
331 break; 331 break;
332 case SPRN_DAR: 332 case SPRN_DAR:
333 vcpu->arch.dear = spr_val; 333 vcpu->arch.shared->dar = spr_val;
334 break; 334 break;
335 case SPRN_HIOR: 335 case SPRN_HIOR:
336 to_book3s(vcpu)->hior = spr_val; 336 to_book3s(vcpu)->hior = spr_val;
@@ -443,7 +443,7 @@ int kvmppc_core_emulate_mfspr(struct kvm_vcpu *vcpu, int sprn, int rt)
443 kvmppc_set_gpr(vcpu, rt, vcpu->arch.shared->dsisr); 443 kvmppc_set_gpr(vcpu, rt, vcpu->arch.shared->dsisr);
444 break; 444 break;
445 case SPRN_DAR: 445 case SPRN_DAR:
446 kvmppc_set_gpr(vcpu, rt, vcpu->arch.dear); 446 kvmppc_set_gpr(vcpu, rt, vcpu->arch.shared->dar);
447 break; 447 break;
448 case SPRN_HIOR: 448 case SPRN_HIOR:
449 kvmppc_set_gpr(vcpu, rt, to_book3s(vcpu)->hior); 449 kvmppc_set_gpr(vcpu, rt, to_book3s(vcpu)->hior);