2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-26 06:04:14 +08:00
linux-next/arch/x86/kvm
David Matlack cb953129bf kvm: add halt-polling cpu usage stats
Two new stats for exposing halt-polling cpu usage:
halt_poll_success_ns
halt_poll_fail_ns

Thus sum of these 2 stats is the total cpu time spent polling. "success"
means the VCPU polled until a virtual interrupt was delivered. "fail"
means the VCPU had to schedule out (either because the maximum poll time
was reached or it needed to yield the CPU).

To avoid touching every arch's kvm_vcpu_stat struct, only update and
export halt-polling cpu usage stats if we're on x86.

Exporting cpu usage as a u64 and in nanoseconds means we will overflow at
~500 years, which seems reasonably large.

Signed-off-by: David Matlack <dmatlack@google.com>
Signed-off-by: Jon Cargille <jcargill@google.com>
Reviewed-by: Jim Mattson <jmattson@google.com>

Message-Id: <20200508182240.68440-1-jcargill@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-05-15 12:26:26 -04:00
..
mmu KVM: x86/mmu: Add a helper to consolidate root sp allocation 2020-05-15 12:26:12 -04:00
svm KVM: SVM: Remove unnecessary V_IRQ unsetting 2020-05-15 12:26:23 -04:00
vmx KVM: nVMX: Migrate the VMX-preemption timer 2020-05-15 12:26:26 -04:00
cpuid.c kvm: x86: Cleanup vcpu->arch.guest_xstate_size 2020-05-15 12:26:10 -04:00
cpuid.h KVM: x86: Fix BUILD_BUG() in __cpuid_entry_get_reg() w/ CONFIG_UBSAN=y 2020-03-31 10:51:45 -04:00
debugfs.c KVM: no need to check return value of debugfs_create functions 2019-08-05 12:55:49 +02:00
emulate.c KVM: x86: handle wrap around 32-bit address space 2020-05-13 12:14:59 -04:00
hyperv.c Merge branch 'kvm-amd-fixes' into HEAD 2020-05-13 12:14:05 -04:00
hyperv.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 499 2019-06-19 17:09:53 +02:00
i8254.c KVM: x86: Fix print format and coding style 2020-03-16 17:57:08 +01:00
i8254.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
i8259.c KVM: x86: Refactor picdev_write() to prevent Spectre-v1/L1TF attacks 2020-01-27 19:59:37 +01:00
ioapic.c kvm: ioapic: Restrict lazy EOI update to edge-triggered interrupts 2020-05-04 12:29:05 -04:00
ioapic.h KVM: X86: Move irrelevant declarations out of ioapic.h 2020-01-08 17:33:14 +01:00
irq_comm.c KVM: x86: don't notify userspace IOAPIC on edge-triggered interrupt EOI 2020-02-21 18:04:57 +01:00
irq.c KVM: nVMX: Migrate the VMX-preemption timer 2020-05-15 12:26:26 -04:00
irq.h KVM: X86: Move irrelevant declarations out of ioapic.h 2020-01-08 17:33:14 +01:00
Kconfig vhost: refine vhost and vringh kconfig 2020-04-01 12:06:26 -04:00
kvm_cache_regs.h KVM: VMX: Add proper cache tracking for CR0 2020-05-13 12:15:12 -04:00
kvm_emulate.h ARM: 2020-04-02 15:13:15 -07:00
lapic.c KVM: X86: TSCDEADLINE MSR emulation fastpath 2020-05-15 12:26:21 -04:00
lapic.h KVM: x86: introduce kvm_can_use_hv_timer 2020-05-15 12:26:21 -04:00
Makefile kvm: Disable objtool frame pointer checking for vmenter.S 2020-04-20 17:11:19 -04:00
mmu_audit.c KVM: x86/mmu: Drop KVM's hugepage enums in favor of the kernel's enums 2020-05-15 12:26:11 -04:00
mmu.h KVM: x86: Copy kvm_x86_ops by value to eliminate layer of indirection 2020-03-31 10:48:08 -04:00
mmutrace.h KVM: x86: fix incorrect comparison in trace event 2020-02-20 18:13:44 +01:00
mtrr.c KVM: x86: Protect MSR-based index computations in fixed_msr_to_seg_unit() from Spectre-v1/L1TF attacks 2020-01-27 19:59:39 +01:00
pmu.c KVM: x86: Copy kvm_x86_ops by value to eliminate layer of indirection 2020-03-31 10:48:08 -04:00
pmu.h KVM: x86: Copy kvm_x86_ops by value to eliminate layer of indirection 2020-03-31 10:48:08 -04:00
trace.h KVM: x86: Print symbolic names of VMX VM-Exit flags in traces 2020-05-15 12:26:18 -04:00
tss.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
x86.c kvm: add halt-polling cpu usage stats 2020-05-15 12:26:26 -04:00
x86.h KVM: X86: Introduce more exit_fastpath_completion enum values 2020-05-15 12:26:19 -04:00