kvm: powerpc: book3s: Allow the HV and PR selection per virtual machine
[deliverable/linux.git] / arch / powerpc / kvm / book3s_xics.c
index a3a5cb8ee7eac2baa68cfb809e6a4eebce5457a9..f7a5108a3483f3d2b55013cab6a083fe28c65b64 100644 (file)
@@ -818,7 +818,7 @@ int kvmppc_xics_hcall(struct kvm_vcpu *vcpu, u32 req)
        }
 
        /* Check for real mode returning too hard */
-       if (xics->real_mode)
+       if (xics->real_mode && vcpu->kvm->arch.kvm_ops->is_hv_enabled)
                return kvmppc_xics_rm_complete(vcpu, req);
 
        switch (req) {
@@ -840,6 +840,7 @@ int kvmppc_xics_hcall(struct kvm_vcpu *vcpu, u32 req)
 
        return rc;
 }
+EXPORT_SYMBOL_GPL(kvmppc_xics_hcall);
 
 
 /* -- Initialisation code etc. -- */
@@ -1250,13 +1251,13 @@ static int kvmppc_xics_create(struct kvm_device *dev, u32 type)
 
        xics_debugfs_init(xics);
 
-#ifdef CONFIG_KVM_BOOK3S_64_HV
+#ifdef CONFIG_KVM_BOOK3S_HV_POSSIBLE
        if (cpu_has_feature(CPU_FTR_ARCH_206)) {
                /* Enable real mode support */
                xics->real_mode = ENABLE_REALMODE;
                xics->real_mode_dbg = DEBUG_REALMODE;
        }
-#endif /* CONFIG_KVM_BOOK3S_64_HV */
+#endif /* CONFIG_KVM_BOOK3S_HV_POSSIBLE */
 
        return 0;
 }
This page took 0.026537 seconds and 5 git commands to generate.