aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm
diff options
context:
space:
mode:
authorMarcelo Tosatti <mtosatti@redhat.com>2014-04-26 21:30:23 -0400
committerPaolo Bonzini <pbonzini@redhat.com>2014-04-29 09:22:43 -0400
commite4c9a5a17567f8ea975bdcfdd1bf9d63965de6c9 (patch)
tree15e1ab5e94d2f606171fd781029cde2e06cd5247 /arch/x86/kvm
parente9545b9f8aeb63e05818e4b3250057260bc072aa (diff)
KVM: x86: expose invariant tsc cpuid bit (v2)
Invariant TSC is a property of TSC, no additional support code necessary. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm')
-rw-r--r--arch/x86/kvm/cpuid.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c
index f47a104a749c..333b88db22fe 100644
--- a/arch/x86/kvm/cpuid.c
+++ b/arch/x86/kvm/cpuid.c
@@ -495,6 +495,13 @@ static inline int __do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function,
495 entry->ecx &= kvm_supported_word6_x86_features; 495 entry->ecx &= kvm_supported_word6_x86_features;
496 cpuid_mask(&entry->ecx, 6); 496 cpuid_mask(&entry->ecx, 6);
497 break; 497 break;
498 case 0x80000007: /* Advanced power management */
499 /* invariant TSC is CPUID.80000007H:EDX[8] */
500 entry->edx &= (1 << 8);
501 /* mask against host */
502 entry->edx &= boot_cpu_data.x86_power;
503 entry->eax = entry->ebx = entry->ecx = 0;
504 break;
498 case 0x80000008: { 505 case 0x80000008: {
499 unsigned g_phys_as = (entry->eax >> 16) & 0xff; 506 unsigned g_phys_as = (entry->eax >> 16) & 0xff;
500 unsigned virt_as = max((entry->eax >> 8) & 0xff, 48U); 507 unsigned virt_as = max((entry->eax >> 8) & 0xff, 48U);
@@ -525,7 +532,6 @@ static inline int __do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function,
525 case 3: /* Processor serial number */ 532 case 3: /* Processor serial number */
526 case 5: /* MONITOR/MWAIT */ 533 case 5: /* MONITOR/MWAIT */
527 case 6: /* Thermal management */ 534 case 6: /* Thermal management */
528 case 0x80000007: /* Advanced power management */
529 case 0xC0000002: 535 case 0xC0000002:
530 case 0xC0000003: 536 case 0xC0000003:
531 case 0xC0000004: 537 case 0xC0000004: