History

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).

Drew Schmitt committed 8 years ago

Commit 6fbbde91 parent d84f1cf4 files · +22 −0Browse files

Showing the changes to include/uapi (1 of 4 files). Show all

Unified · Split

include/uapi/linux/kvm.h+1−0
@@ -952,6 +952,7 @@ struct kvm_ppc_resize_hpt { · 951 unmodified lines
952952 #define KVM_CAP_S390_HPAGE_1M 156
953953 #define KVM_CAP_NESTED_STATE 157
954954 #define KVM_CAP_ARM_INJECT_SERROR_ESR 158
955+#define KVM_CAP_MSR_PLATFORM_INFO 159
955956
956957 #ifdef KVM_CAP_IRQ_ROUTING
957958