]> Pileus Git - ~andy/linux/blobdiff - arch/powerpc/include/asm/kvm_ppc.h
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm
[~andy/linux] / arch / powerpc / include / asm / kvm_ppc.h
index 3069cf4dcc881f20a67e184790526b9e51c56e49..c8317fbf92c470f03842da5cf363efd97aed99b4 100644 (file)
@@ -183,7 +183,6 @@ union kvmppc_one_reg {
 
 struct kvmppc_ops {
        struct module *owner;
-       bool is_hv_enabled;
        int (*get_sregs)(struct kvm_vcpu *vcpu, struct kvm_sregs *sregs);
        int (*set_sregs)(struct kvm_vcpu *vcpu, struct kvm_sregs *sregs);
        int (*get_one_reg)(struct kvm_vcpu *vcpu, u64 id,
@@ -232,6 +231,11 @@ struct kvmppc_ops {
 extern struct kvmppc_ops *kvmppc_hv_ops;
 extern struct kvmppc_ops *kvmppc_pr_ops;
 
+static inline bool is_kvmppc_hv_enabled(struct kvm *kvm)
+{
+       return kvm->arch.kvm_ops == kvmppc_hv_ops;
+}
+
 /*
  * Cuts out inst bits with ordering according to spec.
  * That means the leftmost bit is zero. All given bits are included.