Skip to content

Commit c533289

Browse files
author
Marc Zyngier
committed
KVM: arm64: Descope kvm_arm_sys_reg_{get,set}_reg()
Having kvm_arm_sys_reg_get_reg and co in kvm_host.h gives the impression that these functions are free to be called from anywhere. Not quite. They really are tied to out internal sysreg handling, and they would be better off in the sys_regs.h header, which is private. kvm_host.h could also get a bit of a diet, so let's just do that. Signed-off-by: Marc Zyngier <[email protected]>
1 parent f6dddbb commit c533289

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

arch/arm64/include/asm/kvm_host.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -620,8 +620,6 @@ int kvm_arm_set_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg);
620620

621621
unsigned long kvm_arm_num_sys_reg_descs(struct kvm_vcpu *vcpu);
622622
int kvm_arm_copy_sys_reg_indices(struct kvm_vcpu *vcpu, u64 __user *uindices);
623-
int kvm_arm_sys_reg_get_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *);
624-
int kvm_arm_sys_reg_set_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *);
625623

626624
int __kvm_arm_vcpu_get_events(struct kvm_vcpu *vcpu,
627625
struct kvm_vcpu_events *events);

arch/arm64/kvm/sys_regs.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,10 @@ const struct sys_reg_desc *get_reg_by_id(u64 id,
194194
const struct sys_reg_desc table[],
195195
unsigned int num);
196196

197+
int kvm_arm_sys_reg_get_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *);
198+
int kvm_arm_sys_reg_set_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *);
197199
int kvm_sys_reg_get_user(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg,
198200
const struct sys_reg_desc table[], unsigned int num);
199-
200201
int kvm_sys_reg_set_user(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg,
201202
const struct sys_reg_desc table[], unsigned int num);
202203

0 commit comments

Comments
 (0)