summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kvm/book3s_pr_papr.c
diff options
context:
space:
mode:
authorGleb Natapov <gleb@redhat.com>2013-04-28 12:50:07 +0300
committerGleb Natapov <gleb@redhat.com>2013-04-28 12:50:07 +0300
commit064d1afaa5a60fc391d0b4b77599fc8f63f99cd3 (patch)
tree2e640cdfa50b0048c52e021f07a8b24560251b26 /arch/powerpc/kvm/book3s_pr_papr.c
parent730dca42c1d363c939da18c1499c7327c66e2b37 (diff)
parent8b78645c93b5d469e8006d68dbc92edc2640c654 (diff)
Merge git://github.com/agraf/linux-2.6.git kvm-ppc-next into queue
Diffstat (limited to 'arch/powerpc/kvm/book3s_pr_papr.c')
-rw-r--r--arch/powerpc/kvm/book3s_pr_papr.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/powerpc/kvm/book3s_pr_papr.c b/arch/powerpc/kvm/book3s_pr_papr.c
index ee02b30878e..b24309c6c2d 100644
--- a/arch/powerpc/kvm/book3s_pr_papr.c
+++ b/arch/powerpc/kvm/book3s_pr_papr.c
@@ -227,6 +227,13 @@ static int kvmppc_h_pr_put_tce(struct kvm_vcpu *vcpu)
return EMULATE_DONE;
}
+static int kvmppc_h_pr_xics_hcall(struct kvm_vcpu *vcpu, u32 cmd)
+{
+ long rc = kvmppc_xics_hcall(vcpu, cmd);
+ kvmppc_set_gpr(vcpu, 3, rc);
+ return EMULATE_DONE;
+}
+
int kvmppc_h_pr(struct kvm_vcpu *vcpu, unsigned long cmd)
{
switch (cmd) {
@@ -246,6 +253,20 @@ int kvmppc_h_pr(struct kvm_vcpu *vcpu, unsigned long cmd)
clear_bit(KVM_REQ_UNHALT, &vcpu->requests);
vcpu->stat.halt_wakeup++;
return EMULATE_DONE;
+ case H_XIRR:
+ case H_CPPR:
+ case H_EOI:
+ case H_IPI:
+ if (kvmppc_xics_enabled(vcpu))
+ return kvmppc_h_pr_xics_hcall(vcpu, cmd);
+ break;
+ case H_RTAS:
+ if (list_empty(&vcpu->kvm->arch.rtas_tokens))
+ return RESUME_HOST;
+ if (kvmppc_rtas_hcall(vcpu))
+ break;
+ kvmppc_set_gpr(vcpu, 3, 0);
+ return EMULATE_DONE;
}
return EMULATE_FAIL;