Skip to content

Commit 5b78077

Browse files
author
Marc Zyngier
committed
KVM: arm64: debug: Drop useless vpcu parameter
As part of the ongoing spring cleanup, remove the now useless vcpu parameter that is passed around (host and guest contexts give us everything we need). Signed-off-by: Marc Zyngier <[email protected]>
1 parent 2c3db77 commit 5b78077

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

arch/arm64/kvm/hyp/include/hyp/debug-sr.h

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,8 @@
8888
default: write_debug(ptr[0], reg, 0); \
8989
}
9090

91-
static inline void __debug_save_state(struct kvm_vcpu *vcpu,
92-
struct kvm_guest_debug_arch *dbg,
93-
struct kvm_cpu_context *ctxt)
91+
static void __debug_save_state(struct kvm_guest_debug_arch *dbg,
92+
struct kvm_cpu_context *ctxt)
9493
{
9594
u64 aa64dfr0;
9695
int brps, wrps;
@@ -107,9 +106,8 @@ static inline void __debug_save_state(struct kvm_vcpu *vcpu,
107106
ctxt_sys_reg(ctxt, MDCCINT_EL1) = read_sysreg(mdccint_el1);
108107
}
109108

110-
static inline void __debug_restore_state(struct kvm_vcpu *vcpu,
111-
struct kvm_guest_debug_arch *dbg,
112-
struct kvm_cpu_context *ctxt)
109+
static void __debug_restore_state(struct kvm_guest_debug_arch *dbg,
110+
struct kvm_cpu_context *ctxt)
113111
{
114112
u64 aa64dfr0;
115113
int brps, wrps;
@@ -142,8 +140,8 @@ static inline void __debug_switch_to_guest_common(struct kvm_vcpu *vcpu)
142140
host_dbg = &vcpu->arch.host_debug_state.regs;
143141
guest_dbg = kern_hyp_va(vcpu->arch.debug_ptr);
144142

145-
__debug_save_state(vcpu, host_dbg, host_ctxt);
146-
__debug_restore_state(vcpu, guest_dbg, guest_ctxt);
143+
__debug_save_state(host_dbg, host_ctxt);
144+
__debug_restore_state(guest_dbg, guest_ctxt);
147145
}
148146

149147
static inline void __debug_switch_to_host_common(struct kvm_vcpu *vcpu)
@@ -161,8 +159,8 @@ static inline void __debug_switch_to_host_common(struct kvm_vcpu *vcpu)
161159
host_dbg = &vcpu->arch.host_debug_state.regs;
162160
guest_dbg = kern_hyp_va(vcpu->arch.debug_ptr);
163161

164-
__debug_save_state(vcpu, guest_dbg, guest_ctxt);
165-
__debug_restore_state(vcpu, host_dbg, host_ctxt);
162+
__debug_save_state(guest_dbg, guest_ctxt);
163+
__debug_restore_state(host_dbg, host_ctxt);
166164

167165
vcpu->arch.flags &= ~KVM_ARM64_DEBUG_DIRTY;
168166
}

0 commit comments

Comments
 (0)