linux-stable/arch/x86/kvm
Alexander Graf 1ae099540e KVM: x86: Allow deflecting unknown MSR accesses to user space
MSRs are weird. Some of them are normal control registers, such as EFER.
Some however are registers that really are model specific, not very
interesting to virtualization workloads, and not performance critical.
Others again are really just windows into package configuration.

Out of these MSRs, only the first category is necessary to implement in
kernel space. Rarely accessed MSRs, MSRs that should be fine tunes against
certain CPU models and MSRs that contain information on the package level
are much better suited for user space to process. However, over time we have
accumulated a lot of MSRs that are not the first category, but still handled
by in-kernel KVM code.

This patch adds a generic interface to handle WRMSR and RDMSR from user
space. With this, any future MSR that is part of the latter categories can
be handled in user space.

Furthermore, it allows us to replace the existing "ignore_msrs" logic with
something that applies per-VM rather than on the full system. That way you
can run productive VMs in parallel to experimental ones where you don't care
about proper MSR handling.

Signed-off-by: Alexander Graf <graf@amazon.com>
Reviewed-by: Jim Mattson <jmattson@google.com>

Message-Id: <20200925143422.21718-3-graf@amazon.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-09-28 07:58:04 -04:00
..
mmu KVM: x86/mmu: Move individual kvm_mmu initialization into common helper 2020-09-28 07:57:54 -04:00
svm KVM: x86: Use common definition for kvm_nested_vmexit tracepoint 2020-09-28 07:57:52 -04:00
vmx KVM: VMX: Rename vmx_uret_msr's "index" to "slot" 2020-09-28 07:58:02 -04:00
cpuid.c KVM: x86: Unexport cpuid_query_maxphyaddr() 2020-09-28 07:57:26 -04:00
cpuid.h KVM: x86: Move illegal GPA helper out of the MMU code 2020-09-28 07:57:27 -04:00
debugfs.c KVM: let kvm_destroy_vm_debugfs clean up vCPU debugfs directories 2020-06-04 11:00:54 -04:00
emulate.c KVM: x86: Allow deflecting unknown MSR accesses to user space 2020-09-28 07:58:04 -04:00
hyperv.c KVM: x86: hyper-v: disallow configuring SynIC timers with no SynIC 2020-09-28 07:57:33 -04:00
hyperv.h x86/kvm/hyper-v: Add support for synthetic debugger interface 2020-06-01 04:26:11 -04:00
i8254.c kvm: i8254: remove redundant assignment to pointer s 2020-06-11 12:35:18 -04:00
i8254.h
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: Remove redundant function implementations 2020-05-27 13:11:10 -04:00
irq.c KVM: nSVM: extract svm_set_gif 2020-06-01 04:26:01 -04:00
irq.h kvm/x86: Remove redundant function implementations 2020-05-27 13:11:10 -04:00
irq_comm.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
Kconfig x86/kvm: Use generic xfer to guest work function 2020-07-24 15:05:01 +02:00
kvm_cache_regs.h KVM: x86: Mark CR4.TSD as being possibly owned by the guest 2020-07-03 12:16:28 -04:00
kvm_emulate.h ARM: 2020-04-02 15:13:15 -07:00
lapic.c KVM: nVMX: Morph notification vector IRQ on nested VM-Enter to pending PI 2020-09-28 07:57:22 -04:00
lapic.h KVM: nVMX: Morph notification vector IRQ on nested VM-Enter to pending PI 2020-09-28 07:57:22 -04:00
Makefile KVM: VMX: Extract posted interrupt support to separate files 2020-09-28 07:57:38 -04:00
mmu.h KVM: x86: Move illegal GPA helper out of the MMU code 2020-09-28 07:57:27 -04: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: pmu: Fix #GP condition check for RDPMC emulation 2020-07-09 07:08:37 -04:00
pmu.h kvm: x86: limit the maximum number of vPMU fixed counters to 3 2020-07-08 16:21:59 -04:00
trace.h KVM: x86: Use common definition for kvm_nested_vmexit tracepoint 2020-09-28 07:57:52 -04:00
tss.h
x86.c KVM: x86: Allow deflecting unknown MSR accesses to user space 2020-09-28 07:58:04 -04:00
x86.h KVM: X86: Move handling of INVPCID types to x86 2020-09-28 07:57:17 -04:00