Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 215689
b: refs/heads/master
c: 5fc8740
h: refs/heads/master
i:
  215687: 873d3d8
v: v3
  • Loading branch information
Alexander Graf authored and Avi Kivity committed Oct 24, 2010
1 parent b45f1ca commit bf887de
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e8508940a88691ad3d1c46608cd968eb4be9cbc5
refs/heads/master: 5fc87407b55f5799418f4dc5931232c2bc06d077
2 changes: 2 additions & 0 deletions trunk/arch/powerpc/include/asm/kvm_para.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ struct kvm_vcpu_arch_shared {
#define HC_EV_SUCCESS 0
#define HC_EV_UNIMPLEMENTED 12

#define KVM_FEATURE_MAGIC_PAGE 1

#ifdef __KERNEL__

#ifdef CONFIG_KVM_GUEST
Expand Down
11 changes: 11 additions & 0 deletions trunk/arch/powerpc/kvm/powerpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,19 @@ int kvmppc_kvm_pv(struct kvm_vcpu *vcpu)
}

switch (nr) {
case HC_VENDOR_KVM | KVM_HC_PPC_MAP_MAGIC_PAGE:
{
vcpu->arch.magic_page_pa = param1;
vcpu->arch.magic_page_ea = param2;

r = HC_EV_SUCCESS;
break;
}
case HC_VENDOR_KVM | KVM_HC_FEATURES:
r = HC_EV_SUCCESS;
#if defined(CONFIG_PPC_BOOK3S) /* XXX Missing magic page on BookE */
r2 |= (1 << KVM_FEATURE_MAGIC_PAGE);
#endif

/* Second return value is in r4 */
kvmppc_set_gpr(vcpu, 4, r2);
Expand Down

0 comments on commit bf887de

Please sign in to comment.