aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kvm/powerpc.c
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2010-08-03 05:32:56 -0400
committerAvi Kivity <avi@redhat.com>2010-10-24 04:52:09 -0400
commit7508e16c9f2a20f7721d7bc47c33a7b34c873a2c (patch)
treedac48c9ea56f69f4d8b9759aa51349bad0f3abdc /arch/powerpc/kvm/powerpc.c
parentcb24c50826e0722bffb0674f088954cd4980818b (diff)
KVM: PPC: Add feature bitmap for magic page
We will soon add SR PV support to the shared page, so we need some infrastructure that allows the guest to query for features KVM exports. This patch adds a second return value to the magic mapping that indicated to the guest which features are available. Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'arch/powerpc/kvm/powerpc.c')
-rw-r--r--arch/powerpc/kvm/powerpc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c
index 6a53a3f86dae..496d7a5200dc 100644
--- a/arch/powerpc/kvm/powerpc.c
+++ b/arch/powerpc/kvm/powerpc.c
@@ -66,6 +66,8 @@ int kvmppc_kvm_pv(struct kvm_vcpu *vcpu)
66 vcpu->arch.magic_page_pa = param1; 66 vcpu->arch.magic_page_pa = param1;
67 vcpu->arch.magic_page_ea = param2; 67 vcpu->arch.magic_page_ea = param2;
68 68
69 r2 = 0;
70
69 r = HC_EV_SUCCESS; 71 r = HC_EV_SUCCESS;
70 break; 72 break;
71 } 73 }
@@ -76,13 +78,14 @@ int kvmppc_kvm_pv(struct kvm_vcpu *vcpu)
76#endif 78#endif
77 79
78 /* Second return value is in r4 */ 80 /* Second return value is in r4 */
79 kvmppc_set_gpr(vcpu, 4, r2);
80 break; 81 break;
81 default: 82 default:
82 r = HC_EV_UNIMPLEMENTED; 83 r = HC_EV_UNIMPLEMENTED;
83 break; 84 break;
84 } 85 }
85 86
87 kvmppc_set_gpr(vcpu, 4, r2);
88
86 return r; 89 return r;
87} 90}
88 91