Skip to content

Commit aa9b1a6

Browse files
Marc ZyngierAlex Shi
authored andcommitted
arm64: KVM: Remove weak attributes
As we've now switched to the new world switch implementation, remove the weak attributes, as nobody is supposed to override it anymore. Acked-by: Christoffer Dall <christoffer.dall@linaro.org> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> (cherry picked from commit 3ffa75cd18134a03f86f9d9b8b6e9128e0eda254) Signed-off-by: Alex Shi <alex.shi@linaro.org>
1 parent 45adca2 commit aa9b1a6

5 files changed

Lines changed: 13 additions & 21 deletions

File tree

arch/arm64/kvm/hyp/debug-sr.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,9 @@ void __hyp_text __debug_cond_restore_host_state(struct kvm_vcpu *vcpu)
132132
vcpu->arch.debug_flags &= ~KVM_ARM64_DEBUG_DIRTY;
133133
}
134134

135-
u32 __hyp_text __debug_read_mdcr_el2(void)
135+
static u32 __hyp_text __debug_read_mdcr_el2(void)
136136
{
137137
return read_sysreg(mdcr_el2);
138138
}
139139

140-
__alias(__debug_read_mdcr_el2)
141-
u32 __weak __kvm_get_mdcr_el2(void);
140+
__alias(__debug_read_mdcr_el2) u32 __kvm_get_mdcr_el2(void);

arch/arm64/kvm/hyp/hyp-entry.S

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,9 +211,7 @@ ENDPROC(\label)
211211

212212
.align 11
213213

214-
.weak __kvm_hyp_vector
215214
ENTRY(__kvm_hyp_vector)
216-
ENTRY(__hyp_vector)
217215
ventry el2t_sync_invalid // Synchronous EL2t
218216
ventry el2t_irq_invalid // IRQ EL2t
219217
ventry el2t_fiq_invalid // FIQ EL2t
@@ -233,5 +231,4 @@ ENTRY(__hyp_vector)
233231
ventry el1_irq // IRQ 32-bit EL1
234232
ventry el1_fiq_invalid // FIQ 32-bit EL1
235233
ventry el1_error_invalid // Error 32-bit EL1
236-
ENDPROC(__hyp_vector)
237234
ENDPROC(__kvm_hyp_vector)

arch/arm64/kvm/hyp/switch.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ static void __hyp_text __vgic_restore_state(struct kvm_vcpu *vcpu)
8585
__vgic_call_restore_state()(vcpu);
8686
}
8787

88-
int __hyp_text __guest_run(struct kvm_vcpu *vcpu)
88+
static int __hyp_text __guest_run(struct kvm_vcpu *vcpu)
8989
{
9090
struct kvm_cpu_context *host_ctxt;
9191
struct kvm_cpu_context *guest_ctxt;
@@ -142,8 +142,7 @@ int __hyp_text __guest_run(struct kvm_vcpu *vcpu)
142142
return exit_code;
143143
}
144144

145-
__alias(__guest_run)
146-
int __weak __kvm_vcpu_run(struct kvm_vcpu *vcpu);
145+
__alias(__guest_run) int __kvm_vcpu_run(struct kvm_vcpu *vcpu);
147146

148147
static const char __hyp_panic_string[] = "HYP panic:\nPS:%08llx PC:%016llx ESR:%08llx\nFAR:%016llx HPFAR:%016llx PAR:%016llx\nVCPU:%p\n";
149148

arch/arm64/kvm/hyp/tlb.c

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
#include "hyp.h"
1919

20-
void __hyp_text __tlb_flush_vmid_ipa(struct kvm *kvm, phys_addr_t ipa)
20+
static void __hyp_text __tlb_flush_vmid_ipa(struct kvm *kvm, phys_addr_t ipa)
2121
{
2222
dsb(ishst);
2323

@@ -48,10 +48,10 @@ void __hyp_text __tlb_flush_vmid_ipa(struct kvm *kvm, phys_addr_t ipa)
4848
write_sysreg(0, vttbr_el2);
4949
}
5050

51-
__alias(__tlb_flush_vmid_ipa)
52-
void __weak __kvm_tlb_flush_vmid_ipa(struct kvm *kvm, phys_addr_t ipa);
51+
__alias(__tlb_flush_vmid_ipa) void __kvm_tlb_flush_vmid_ipa(struct kvm *kvm,
52+
phys_addr_t ipa);
5353

54-
void __hyp_text __tlb_flush_vmid(struct kvm *kvm)
54+
static void __hyp_text __tlb_flush_vmid(struct kvm *kvm)
5555
{
5656
dsb(ishst);
5757

@@ -67,16 +67,14 @@ void __hyp_text __tlb_flush_vmid(struct kvm *kvm)
6767
write_sysreg(0, vttbr_el2);
6868
}
6969

70-
__alias(__tlb_flush_vmid)
71-
void __weak __kvm_tlb_flush_vmid(struct kvm *kvm);
70+
__alias(__tlb_flush_vmid) void __kvm_tlb_flush_vmid(struct kvm *kvm);
7271

73-
void __hyp_text __tlb_flush_vm_context(void)
72+
static void __hyp_text __tlb_flush_vm_context(void)
7473
{
7574
dsb(ishst);
7675
asm volatile("tlbi alle1is \n"
7776
"ic ialluis ": : );
7877
dsb(ish);
7978
}
8079

81-
__alias(__tlb_flush_vm_context)
82-
void __weak __kvm_flush_vm_context(void);
80+
__alias(__tlb_flush_vm_context) void __kvm_flush_vm_context(void);

arch/arm64/kvm/hyp/vgic-v3-sr.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,10 +220,9 @@ void __hyp_text __vgic_v3_restore_state(struct kvm_vcpu *vcpu)
220220
}
221221
}
222222

223-
u64 __hyp_text __vgic_v3_read_ich_vtr_el2(void)
223+
static u64 __hyp_text __vgic_v3_read_ich_vtr_el2(void)
224224
{
225225
return read_gicreg(ICH_VTR_EL2);
226226
}
227227

228-
__alias(__vgic_v3_read_ich_vtr_el2)
229-
u64 __weak __vgic_v3_get_ich_vtr_el2(void);
228+
__alias(__vgic_v3_read_ich_vtr_el2) u64 __vgic_v3_get_ich_vtr_el2(void);

0 commit comments

Comments
 (0)