mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Avi Kivity <avi@qumranet.com>
To: kvm-devel@lists.sourceforge.net
Cc: linux-kernel@vger.kernel.org, Alexander Graf <alex@csgraf.de>
Subject: [PATCH 06/35] KVM: Implement dummy values for MSR_PERF_STATUS
Date: Thu,  3 Apr 2008 22:32:21 +0300	[thread overview]
Message-ID: <1207251170-5013-7-git-send-email-avi@qumranet.com> (raw)
In-Reply-To: <1207251170-5013-1-git-send-email-avi@qumranet.com>

From: Alexander Graf <alex@csgraf.de>

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>
---
 arch/x86/kvm/x86.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index cf6261e..0dd038e 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -426,6 +426,7 @@ static u32 msrs_to_save[] = {
 	MSR_CSTAR, MSR_KERNEL_GS_BASE, MSR_SYSCALL_MASK, MSR_LSTAR,
 #endif
 	MSR_IA32_TIME_STAMP_COUNTER, MSR_KVM_SYSTEM_TIME, MSR_KVM_WALL_CLOCK,
+	MSR_IA32_PERF_STATUS,
 };
 
 static unsigned num_msrs_to_save;
@@ -653,7 +654,6 @@ int kvm_get_msr_common(struct kvm_vcpu *vcpu, u32 msr, u64 *pdata)
 	case MSR_IA32_MC0_MISC+12:
 	case MSR_IA32_MC0_MISC+16:
 	case MSR_IA32_UCODE_REV:
-	case MSR_IA32_PERF_STATUS:
 	case MSR_IA32_EBL_CR_POWERON:
 		/* MTRR registers */
 	case 0xfe:
@@ -669,6 +669,12 @@ int kvm_get_msr_common(struct kvm_vcpu *vcpu, u32 msr, u64 *pdata)
 	case MSR_IA32_MISC_ENABLE:
 		data = vcpu->arch.ia32_misc_enable_msr;
 		break;
+	case MSR_IA32_PERF_STATUS:
+		/* TSC increment by tick */
+		data = 1000ULL;
+		/* CPU multiplier */
+		data |= (((uint64_t)4ULL) << 40);
+		break;
 	case MSR_EFER:
 		data = vcpu->arch.shadow_efer;
 		break;
-- 
1.5.4.5


  parent reply	other threads:[~2008-04-03 19:34 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-03 19:32 [PATCH 00/35] KVM updates for the 2.6.26 merge window (part II) Avi Kivity
2008-04-03 19:32 ` [PATCH 01/35] KVM: Use x86's segment descriptor struct instead of private definition Avi Kivity
2008-04-03 19:32 ` [PATCH 02/35] KVM: Add stat counter for hypercalls Avi Kivity
2008-04-03 19:32 ` [PATCH 03/35] KVM: x86 emulator: fix sparse warnings in x86_emulate.c Avi Kivity
2008-04-03 19:32 ` [PATCH 04/35] KVM: SVM: make iopm_base static Avi Kivity
2008-04-03 19:32 ` [PATCH 05/35] KVM: sparse fixes for kvm/x86.c Avi Kivity
2008-04-03 19:32 ` Avi Kivity [this message]
2008-04-03 19:32 ` [PATCH 07/35] KVM: MMU: ignore zapped root pagetables Avi Kivity
2008-04-03 19:32 ` [PATCH 08/35] KVM: MMU: large page support Avi Kivity
2008-04-03 19:32 ` [PATCH 09/35] KVM: Prefix control register accessors with kvm_ to avoid namespace pollution Avi Kivity
2008-04-03 19:32 ` [PATCH 10/35] KVM: Use kzalloc to avoid allocating kvm_regs from kernel stack Avi Kivity
2008-04-03 19:32 ` [PATCH 11/35] KVM: detect if VCPU triple faults Avi Kivity
2008-04-03 19:32 ` [PATCH 12/35] KVM: replace remaining __FUNCTION__ occurances Avi Kivity
2008-04-03 19:32 ` [PATCH 13/35] KVM: VMX: Don't adjust tsc offset forward Avi Kivity
2008-04-03 19:32 ` [PATCH 14/35] KVM: Remove pointless desc_ptr #ifdef Avi Kivity
2008-04-03 19:32 ` [PATCH 15/35] KVM: In kernel PIT model Avi Kivity
2008-04-03 19:32 ` [PATCH 16/35] KVM: Add save/restore supporting of in kernel PIT Avi Kivity
2008-04-03 19:32 ` [PATCH 17/35] KVM: Add reset support for " Avi Kivity
2008-04-03 19:32 ` [PATCH 18/35] KVM: add basic paravirt support Avi Kivity
2008-04-03 19:32 ` [PATCH 19/35] x86: KVM guest: " Avi Kivity
2008-04-03 19:32 ` [PATCH 20/35] KVM: Provide unlocked version of emulator_write_phys() Avi Kivity
2008-04-03 19:32 ` [PATCH 21/35] KVM: MMU: hypercall based pte updates and TLB flushes Avi Kivity
2008-04-03 19:32 ` [PATCH 22/35] x86: KVM guest: " Avi Kivity
2008-04-03 19:32 ` [PATCH 23/35] x86: KVM guest: hypercall batching Avi Kivity
2008-04-03 19:32 ` [PATCH 24/35] x86: allow machine_crash_shutdown to be replaced Avi Kivity
2008-04-03 19:32 ` [PATCH 25/35] x86: make native_machine_shutdown non-static Avi Kivity
2008-04-03 19:32 ` [PATCH 26/35] x86: KVM guest: disable clock before rebooting Avi Kivity
2008-04-03 19:32 ` [PATCH 27/35] KVM: kvm.h: __user requires compiler.h Avi Kivity
2008-04-03 19:32 ` [PATCH 28/35] KVM: MMU: Set the accessed bit on non-speculative shadow ptes Avi Kivity
2008-04-03 19:32 ` [PATCH 29/35] KVM: Move some x86 specific constants and structures to include/asm-x86 Avi Kivity
2008-04-03 19:32 ` [PATCH 30/35] KVM: MMU: fix dirty bit setting when removing write permissions Avi Kivity
2008-04-03 19:32 ` [PATCH 31/35] KVM: MMU: Introduce and use spte_to_page() Avi Kivity
2008-04-03 19:32 ` [PATCH 32/35] KVM: no longer EXPERIMENTAL Avi Kivity
2008-04-03 19:32 ` [PATCH 33/35] KVM: VMX: Add module option to disable flexpriority Avi Kivity
2008-04-03 19:32 ` [PATCH 34/35] KVM: x86: add functions to get the cpl of vcpu Avi Kivity
2008-04-03 19:32 ` [PATCH 35/35] KVM: x86: hardware task switching support Avi Kivity

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1207251170-5013-7-git-send-email-avi@qumranet.com \
    --to=avi@qumranet.com \
    --cc=alex@csgraf.de \
    --cc=kvm-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®