Skip to content

Commit

Permalink
KVM: arm64: Drop perf.c and fold its tiny bits of code into arm.c
Browse files Browse the repository at this point in the history
Call KVM's (un)register perf callbacks helpers directly from arm.c and
delete perf.c

No functional change intended.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20211111020738.2512932-17-seanjc@google.com
  • Loading branch information
Sean Christopherson authored and Peter Zijlstra committed Nov 17, 2021
1 parent be399d8 commit 17ed14e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 28 deletions.
3 changes: 0 additions & 3 deletions arch/arm64/include/asm/kvm_host.h
Original file line number Diff line number Diff line change
Expand Up @@ -675,9 +675,6 @@ unsigned long kvm_mmio_read_buf(const void *buf, unsigned int len);
int kvm_handle_mmio_return(struct kvm_vcpu *vcpu);
int io_mem_abort(struct kvm_vcpu *vcpu, phys_addr_t fault_ipa);

void kvm_perf_init(void);
void kvm_perf_teardown(void);

/*
* Returns true if a Performance Monitoring Interrupt (PMI), a.k.a. perf event,
* arrived in guest context. For arm64, any event that arrives while a vCPU is
Expand Down
2 changes: 1 addition & 1 deletion arch/arm64/kvm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ obj-$(CONFIG_KVM) += hyp/

kvm-y := $(KVM)/kvm_main.o $(KVM)/coalesced_mmio.o $(KVM)/eventfd.o \
$(KVM)/vfio.o $(KVM)/irqchip.o $(KVM)/binary_stats.o \
arm.o mmu.o mmio.o psci.o perf.o hypercalls.o pvtime.o \
arm.o mmu.o mmio.o psci.o hypercalls.o pvtime.o \
inject_fault.o va_layout.o handle_exit.o \
guest.o debug.o reset.o sys_regs.o \
vgic-sys-reg-v3.o fpsimd.o pmu.o \
Expand Down
5 changes: 3 additions & 2 deletions arch/arm64/kvm/arm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1773,7 +1773,8 @@ static int init_subsystems(void)
if (err)
goto out;

kvm_perf_init();
kvm_register_perf_callbacks(NULL);

kvm_sys_reg_table_init();

out:
Expand Down Expand Up @@ -2161,7 +2162,7 @@ int kvm_arch_init(void *opaque)
/* NOP: Compiling as a module not supported */
void kvm_arch_exit(void)
{
kvm_perf_teardown();
kvm_unregister_perf_callbacks();
}

static int __init early_kvm_mode_cfg(char *arg)
Expand Down
22 changes: 0 additions & 22 deletions arch/arm64/kvm/perf.c

This file was deleted.

0 comments on commit 17ed14e

Please sign in to comment.