KVM: x86: PMU Event Filter
Some events can provide a guest with information about other guests or the host (e.g. L3 cache stats); providing the capability to restrict access to a "safe" set of events would limit the potential for the PMU to be used in any side channel attacks. This change introduces a new VM ioctl that sets an event filter. If the guest attempts to program a counter for any blacklisted or non-whitelisted event, the kernel counter won't be created, so any RDPMC/RDMSR will show 0 instances of that event. Signed-off-by:Eric Hankland <ehankland@google.com> [Lots of changes. All remaining bugs are probably mine. - Paolo] Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
Showing
- Documentation/virtual/kvm/api.txt 26 additions, 0 deletionsDocumentation/virtual/kvm/api.txt
- arch/x86/include/asm/kvm_host.h 2 additions, 0 deletionsarch/x86/include/asm/kvm_host.h
- arch/x86/include/uapi/asm/kvm.h 10 additions, 0 deletionsarch/x86/include/uapi/asm/kvm.h
- arch/x86/kvm/pmu.c 63 additions, 0 deletionsarch/x86/kvm/pmu.c
- arch/x86/kvm/pmu.h 1 addition, 0 deletionsarch/x86/kvm/pmu.h
- arch/x86/kvm/x86.c 5 additions, 0 deletionsarch/x86/kvm/x86.c
- include/uapi/linux/kvm.h 3 additions, 0 deletionsinclude/uapi/linux/kvm.h
Loading
Please register or sign in to comment