]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: Control guest reads of MSR_PLATFORM_INFO
authorDrew Schmitt <dasch@google.com>
Mon, 20 Aug 2018 17:32:15 +0000 (10:32 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 19 Sep 2018 22:51:46 +0000 (00:51 +0200)
commit8c52c9a3292676fe33d647cc453c8759528ca81c
tree39bdc75de08111b9b6a7a28e238eb8efca0841cc
parentf7b0ddf5ca26987dd9f2d2f2cf43ce2fdec7805e
KVM: x86: Control guest reads of MSR_PLATFORM_INFO

Add KVM_CAP_MSR_PLATFORM_INFO so that userspace can disable guest access
to reads of MSR_PLATFORM_INFO.

Disabling access to reads of this MSR gives userspace the control to "expose"
this platform-dependent information to guests in a clear way. As it exists
today, guests that read this MSR would get unpopulated information if userspace
hadn't already set it (and prior to this patch series, only the CPUID faulting
information could have been populated). This existing interface could be
confusing if guests don't handle the potential for incorrect/incomplete
information gracefully (e.g. zero reported for base frequency).

Signed-off-by: Drew Schmitt <dasch@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Documentation/virtual/kvm/api.txt
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/x86.c
include/uapi/linux/kvm.h