aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Graf <alex@csgraf.de>2008-02-21 06:11:01 -0500
committerAvi Kivity <avi@qumranet.com>2008-04-27 04:53:25 -0400
commit847f0ad8cbfa70c1af6948025836dfbd9ed6da1e (patch)
treed3e1f91b460648189922cbb27b6a9571beb312cf
parent14af3f3c56103d8c3bb173c255ef5d89fb0c9350 (diff)
KVM: Implement dummy values for MSR_PERF_STATUS
Darwin relies on this and ceases to work without. Signed-off-by: Alexander Graf <alex@csgraf.de> Signed-off-by: Avi Kivity <avi@qumranet.com>
-rw-r--r--arch/x86/kvm/x86.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index cf6261e3d928..0dd038e7392b 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -426,6 +426,7 @@ static u32 msrs_to_save[] = {
426 MSR_CSTAR, MSR_KERNEL_GS_BASE, MSR_SYSCALL_MASK, MSR_LSTAR, 426 MSR_CSTAR, MSR_KERNEL_GS_BASE, MSR_SYSCALL_MASK, MSR_LSTAR,
427#endif 427#endif
428 MSR_IA32_TIME_STAMP_COUNTER, MSR_KVM_SYSTEM_TIME, MSR_KVM_WALL_CLOCK, 428 MSR_IA32_TIME_STAMP_COUNTER, MSR_KVM_SYSTEM_TIME, MSR_KVM_WALL_CLOCK,
429 MSR_IA32_PERF_STATUS,
429}; 430};
430 431
431static unsigned num_msrs_to_save; 432static unsigned num_msrs_to_save;
@@ -653,7 +654,6 @@ int kvm_get_msr_common(struct kvm_vcpu *vcpu, u32 msr, u64 *pdata)
653 case MSR_IA32_MC0_MISC+12: 654 case MSR_IA32_MC0_MISC+12:
654 case MSR_IA32_MC0_MISC+16: 655 case MSR_IA32_MC0_MISC+16:
655 case MSR_IA32_UCODE_REV: 656 case MSR_IA32_UCODE_REV:
656 case MSR_IA32_PERF_STATUS:
657 case MSR_IA32_EBL_CR_POWERON: 657 case MSR_IA32_EBL_CR_POWERON:
658 /* MTRR registers */ 658 /* MTRR registers */
659 case 0xfe: 659 case 0xfe:
@@ -669,6 +669,12 @@ int kvm_get_msr_common(struct kvm_vcpu *vcpu, u32 msr, u64 *pdata)
669 case MSR_IA32_MISC_ENABLE: 669 case MSR_IA32_MISC_ENABLE:
670 data = vcpu->arch.ia32_misc_enable_msr; 670 data = vcpu->arch.ia32_misc_enable_msr;
671 break; 671 break;
672 case MSR_IA32_PERF_STATUS:
673 /* TSC increment by tick */
674 data = 1000ULL;
675 /* CPU multiplier */
676 data |= (((uint64_t)4ULL) << 40);
677 break;
672 case MSR_EFER: 678 case MSR_EFER:
673 data = vcpu->arch.shadow_efer; 679 data = vcpu->arch.shadow_efer;
674 break; 680 break;