diff options
Diffstat (limited to 'arch/powerpc/kvm/book3s_xics.c')
-rw-r--r-- | arch/powerpc/kvm/book3s_xics.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/powerpc/kvm/book3s_xics.c b/arch/powerpc/kvm/book3s_xics.c index a3a5cb8ee7ea..02a17dcf1610 100644 --- a/arch/powerpc/kvm/book3s_xics.c +++ b/arch/powerpc/kvm/book3s_xics.c | |||
@@ -818,7 +818,7 @@ int kvmppc_xics_hcall(struct kvm_vcpu *vcpu, u32 req) | |||
818 | } | 818 | } |
819 | 819 | ||
820 | /* Check for real mode returning too hard */ | 820 | /* Check for real mode returning too hard */ |
821 | if (xics->real_mode) | 821 | if (xics->real_mode && is_kvmppc_hv_enabled(vcpu->kvm)) |
822 | return kvmppc_xics_rm_complete(vcpu, req); | 822 | return kvmppc_xics_rm_complete(vcpu, req); |
823 | 823 | ||
824 | switch (req) { | 824 | switch (req) { |
@@ -840,6 +840,7 @@ int kvmppc_xics_hcall(struct kvm_vcpu *vcpu, u32 req) | |||
840 | 840 | ||
841 | return rc; | 841 | return rc; |
842 | } | 842 | } |
843 | EXPORT_SYMBOL_GPL(kvmppc_xics_hcall); | ||
843 | 844 | ||
844 | 845 | ||
845 | /* -- Initialisation code etc. -- */ | 846 | /* -- Initialisation code etc. -- */ |
@@ -1250,13 +1251,13 @@ static int kvmppc_xics_create(struct kvm_device *dev, u32 type) | |||
1250 | 1251 | ||
1251 | xics_debugfs_init(xics); | 1252 | xics_debugfs_init(xics); |
1252 | 1253 | ||
1253 | #ifdef CONFIG_KVM_BOOK3S_64_HV | 1254 | #ifdef CONFIG_KVM_BOOK3S_HV_POSSIBLE |
1254 | if (cpu_has_feature(CPU_FTR_ARCH_206)) { | 1255 | if (cpu_has_feature(CPU_FTR_ARCH_206)) { |
1255 | /* Enable real mode support */ | 1256 | /* Enable real mode support */ |
1256 | xics->real_mode = ENABLE_REALMODE; | 1257 | xics->real_mode = ENABLE_REALMODE; |
1257 | xics->real_mode_dbg = DEBUG_REALMODE; | 1258 | xics->real_mode_dbg = DEBUG_REALMODE; |
1258 | } | 1259 | } |
1259 | #endif /* CONFIG_KVM_BOOK3S_64_HV */ | 1260 | #endif /* CONFIG_KVM_BOOK3S_HV_POSSIBLE */ |
1260 | 1261 | ||
1261 | return 0; | 1262 | return 0; |
1262 | } | 1263 | } |