@@ -43,6 +43,8 @@ struct kvm_vcpu_arch_shared {
#define KVM_SC_MAGIC_R3 0x4b564d52 /* "KVMR" */
#define KVM_SC_MAGIC_R4 0x554c455a /* "ULEZ" */
+#define KVM_FEATURE_MAGIC_PAGE 1
+
#ifdef __KERNEL__
static inline int kvm_para_available(void)
@@ -60,8 +60,19 @@ int kvmppc_kvm_pv(struct kvm_vcpu *vcpu)
}
switch (nr) {
+ case KVM_HC_PPC_MAP_MAGIC_PAGE:
+ {
+ vcpu->arch.magic_page_pa = param1;
+ vcpu->arch.magic_page_ea = param2;
+
+ r = 0;
+ break;
+ }
case KVM_HC_FEATURES:
r = 0;
+#if !defined(CONFIG_KVM_440) /* XXX missing bits on 440 */
+ r |= (1 << KVM_FEATURE_MAGIC_PAGE);
+#endif
break;
default:
r = -KVM_ENOSYS;