linux-stable/arch/x86/kvm
Paolo Bonzini 891bd1a93e KVM: x86/pmu: do not mask the value that is written to fixed PMUs
[ Upstream commit 2924b52117 ]

According to the SDM, for MSR_IA32_PERFCTR0/1 "the lower-order 32 bits of
each MSR may be written with any value, and the high-order 8 bits are
sign-extended according to the value of bit 31", but the fixed counters
in real hardware are limited to the width of the fixed counters ("bits
beyond the width of the fixed-function counter are reserved and must be
written as zeros").  Fix KVM to do the same.

Reported-by: Nadav Amit <nadav.amit@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-06-19 08:20:58 +02:00
..
cpuid.c x86/kvm: Expose X86_FEATURE_MD_CLEAR to guests 2019-05-14 19:18:43 +02:00
cpuid.h KVM/x86: Update the reverse_cpuid list to include CPUID_7_EDX 2018-02-07 11:12:25 -08:00
debugfs.c kvm: x86: export TSC information to user-space 2016-09-16 16:57:48 +02:00
emulate.c KVM: x86: Don't clear EFER during SMM transitions for 32-bit vCPU 2019-04-27 09:35:35 +02:00
hyperv.c x86: Delay skip of emulated hypercall instruction 2018-06-21 04:02:57 +09:00
hyperv.h kvm: x86: hyperv: make VP_INDEX managed by userspace 2017-07-14 16:28:18 +02:00
i8254.c KVM: x86: take slots_lock in kvm_free_pit 2017-07-12 22:38:26 +02: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: simplify pic_ioport_read() 2017-04-12 20:17:15 +02:00
ioapic.c KVM: x86: ioapic: Preserve read-only values in the redirection table 2018-02-03 17:38:57 +01:00
ioapic.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
irq.c KVM: x86: get rid of pic_irqchip() 2017-04-12 20:17:13 +02:00
irq.h KVM: x86: don't hold kvm->lock in KVM_SET_GSI_ROUTING 2017-05-02 14:45:45 +02:00
irq_comm.c KVM: x86: don't hold kvm->lock in KVM_SET_GSI_ROUTING 2017-05-02 14:45:45 +02:00
Kconfig License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
kvm_cache_regs.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
lapic.c KVM: fix spectrev1 gadgets 2019-05-16 19:42:22 +02:00
lapic.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mmu.c KVM: x86/mmu: Detect MMIO generation wrap in any address space 2019-03-23 14:35:31 +01:00
mmu.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mmu_audit.c KVM: MMU: Add 5 level EPT & Shadow page table support. 2017-08-24 18:09:17 +02:00
mmutrace.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mtrr.c KVM: x86: generalize guest_cpuid_has_ helpers 2017-08-07 16:11:50 +02:00
page_track.c mm: introduce kv[mz]alloc helpers 2017-05-08 17:15:12 -07:00
paging_tmpl.h KVM: x86: Update the exit_qualification access bits while walking an address 2018-11-04 14:52:43 +01:00
pmu.c KVM: x86: never specify a sample period for virtualized in_tx_cp counters 2017-03-01 14:19:46 +01:00
pmu.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pmu_amd.c perf/x86/amd: Make HW_CACHE_REFERENCES and HW_CACHE_MISSES measure L2 2016-09-16 16:19:49 +02:00
pmu_intel.c KVM: x86/pmu: do not mask the value that is written to fixed PMUs 2019-06-19 08:20:58 +02:00
svm.c kvm: svm/avic: fix off-by-one in checking host APIC ID 2019-05-31 06:47:11 -07:00
trace.h KVM: x86: avoid misreporting level-triggered irqs as edge-triggered in tracing 2019-05-16 19:42:22 +02: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
vmx.c Documentation: Move L1TF to separate directory 2019-05-14 19:18:45 +02:00
x86.c KVM: s390: Do not report unusabled IDs via KVM_CAP_MAX_VCPU_ID 2019-06-09 09:18:16 +02:00
x86.h KVM: x86/mmu: Do not cache MMIO accesses while memslots are in flux 2019-03-23 14:35:31 +01:00