union kvmppc_one_reg *val);
 extern int kvmppc_xive_native_set_vp(struct kvm_vcpu *vcpu,
                                     union kvmppc_one_reg *val);
+extern bool kvmppc_xive_native_supported(void);
 
 #else
 static inline int kvmppc_xive_set_xive(struct kvm *kvm, u32 irq, u32 server,
 
 extern int xive_native_set_queue_state(u32 vp_id, uint32_t prio, u32 qtoggle,
                                       u32 qindex);
 extern int xive_native_get_vp_state(u32 vp_id, u64 *out_state);
+extern bool xive_native_has_queue_state_support(void);
 
 #else
 
 
        if (xics_on_xive()) {
                kvmppc_xive_init_module();
                kvm_register_device_ops(&kvm_xive_ops, KVM_DEV_TYPE_XICS);
-               kvmppc_xive_native_init_module();
-               kvm_register_device_ops(&kvm_xive_native_ops,
-                                       KVM_DEV_TYPE_XIVE);
+               if (kvmppc_xive_native_supported()) {
+                       kvmppc_xive_native_init_module();
+                       kvm_register_device_ops(&kvm_xive_native_ops,
+                                               KVM_DEV_TYPE_XIVE);
+               }
        } else
 #endif
                kvm_register_device_ops(&kvm_xics_ops, KVM_DEV_TYPE_XICS);
 
        return 0;
 }
 
+bool kvmppc_xive_native_supported(void)
+{
+       return xive_native_has_queue_state_support();
+}
+
 static int xive_native_debug_show(struct seq_file *m, void *private)
 {
        struct kvmppc_xive *xive = m->private;
 
                 * a POWER9 processor) and the PowerNV platform, as
                 * nested is not yet supported.
                 */
-               r = xive_enabled() && !!cpu_has_feature(CPU_FTR_HVMODE);
+               r = xive_enabled() && !!cpu_has_feature(CPU_FTR_HVMODE) &&
+                       kvmppc_xive_native_supported();
                break;
 #endif
 
 
 }
 EXPORT_SYMBOL_GPL(xive_native_set_queue_state);
 
+bool xive_native_has_queue_state_support(void)
+{
+       return opal_check_token(OPAL_XIVE_GET_QUEUE_STATE) &&
+               opal_check_token(OPAL_XIVE_SET_QUEUE_STATE);
+}
+EXPORT_SYMBOL_GPL(xive_native_has_queue_state_support);
+
 int xive_native_get_vp_state(u32 vp_id, u64 *out_state)
 {
        __be64 state;