KVM: arm64: Consolidate REG_HIDDEN_GUEST/USER
[linux-2.6-microblaze.git] / arch / arm64 / kvm / sys_regs.h
index 5a6fc30..2641b2e 100644 (file)
@@ -59,8 +59,7 @@ struct sys_reg_desc {
                                   const struct sys_reg_desc *rd);
 };
 
-#define REG_HIDDEN_USER                (1 << 0) /* hidden from userspace ioctls */
-#define REG_HIDDEN_GUEST       (1 << 1) /* hidden from guest */
+#define REG_HIDDEN             (1 << 0) /* hidden from userspace and guest */
 
 static __printf(2, 3)
 inline void print_sys_reg_msg(const struct sys_reg_params *p,
@@ -111,22 +110,13 @@ static inline void reset_val(struct kvm_vcpu *vcpu, const struct sys_reg_desc *r
        __vcpu_sys_reg(vcpu, r->reg) = r->val;
 }
 
-static inline bool sysreg_hidden_from_guest(const struct kvm_vcpu *vcpu,
-                                           const struct sys_reg_desc *r)
-{
-       if (likely(!r->visibility))
-               return false;
-
-       return r->visibility(vcpu, r) & REG_HIDDEN_GUEST;
-}
-
-static inline bool sysreg_hidden_from_user(const struct kvm_vcpu *vcpu,
-                                          const struct sys_reg_desc *r)
+static inline bool sysreg_hidden(const struct kvm_vcpu *vcpu,
+                                const struct sys_reg_desc *r)
 {
        if (likely(!r->visibility))
                return false;
 
-       return r->visibility(vcpu, r) & REG_HIDDEN_USER;
+       return r->visibility(vcpu, r) & REG_HIDDEN;
 }
 
 static inline int cmp_sys_reg(const struct sys_reg_desc *i1,