@@ -2084,17 +2084,6 @@ static bool bad_redir_trap(struct kvm_vcpu *vcpu,
2084
2084
#define EL2_REG_VNCR (name , rst , v ) EL2_REG(name, bad_vncr_trap, rst, v)
2085
2085
#define EL2_REG_REDIR (name , rst , v ) EL2_REG(name, bad_redir_trap, rst, v)
2086
2086
2087
- /*
2088
- * EL{0,1}2 registers are the EL2 view on an EL0 or EL1 register when
2089
- * HCR_EL2.E2H==1, and only in the sysreg table for convenience of
2090
- * handling traps. Given that, they are always hidden from userspace.
2091
- */
2092
- static unsigned int hidden_user_visibility (const struct kvm_vcpu * vcpu ,
2093
- const struct sys_reg_desc * rd )
2094
- {
2095
- return REG_HIDDEN_USER ;
2096
- }
2097
-
2098
2087
/*
2099
2088
* Since reset() callback and field val are not used for idregs, they will be
2100
2089
* used for specific purposes for idregs.
@@ -4273,7 +4262,7 @@ int kvm_sys_reg_get_user(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg,
4273
4262
int ret ;
4274
4263
4275
4264
r = id_to_sys_reg_desc (vcpu , reg -> id , table , num );
4276
- if (!r || sysreg_hidden_user (vcpu , r ))
4265
+ if (!r || sysreg_hidden (vcpu , r ))
4277
4266
return - ENOENT ;
4278
4267
4279
4268
if (r -> get_user ) {
@@ -4317,7 +4306,7 @@ int kvm_sys_reg_set_user(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg,
4317
4306
return - EFAULT ;
4318
4307
4319
4308
r = id_to_sys_reg_desc (vcpu , reg -> id , table , num );
4320
- if (!r || sysreg_hidden_user (vcpu , r ))
4309
+ if (!r || sysreg_hidden (vcpu , r ))
4321
4310
return - ENOENT ;
4322
4311
4323
4312
if (sysreg_user_write_ignore (vcpu , r ))
@@ -4403,7 +4392,7 @@ static int walk_one_sys_reg(const struct kvm_vcpu *vcpu,
4403
4392
if (!(rd -> reg || rd -> get_user ))
4404
4393
return 0 ;
4405
4394
4406
- if (sysreg_hidden_user (vcpu , rd ))
4395
+ if (sysreg_hidden (vcpu , rd ))
4407
4396
return 0 ;
4408
4397
4409
4398
if (!copy_reg_to_user (rd , uind ))
0 commit comments