public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Implement dummy values for MSR_PERF_STATUS
@ 2008-02-21 11:11 Alexander Graf
  2008-02-21 11:19 ` Avi Kivity
  0 siblings, 1 reply; 2+ messages in thread
From: Alexander Graf @ 2008-02-21 11:11 UTC (permalink / raw)
  To: kvm-devel

[-- Attachment #1: Type: text/plain, Size: 288 bytes --]

Hi,

this is mostly the same patch I sent to the list several weeks ago,  
but with fixed whitespaces and comments.
It implements a dummy value for the MSR_PERF_STATUS MSR. Darwin relies  
on this and ceases to work without.

Signed-off-by: Alexander Graf <alex@csgraf.de>

Regards,

Alex

[-- Attachment #2: kvm-perfstatus.patch --]
[-- Type: application/octet-stream, Size: 958 bytes --]

--- 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;
@@ -636,7 +637,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:
@@ -652,6 +652,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;

[-- Attachment #3: Type: text/plain, Size: 228 bytes --]

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

[-- Attachment #4: Type: text/plain, Size: 158 bytes --]

_______________________________________________
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Implement dummy values for MSR_PERF_STATUS
  2008-02-21 11:11 [PATCH] Implement dummy values for MSR_PERF_STATUS Alexander Graf
@ 2008-02-21 11:19 ` Avi Kivity
  0 siblings, 0 replies; 2+ messages in thread
From: Avi Kivity @ 2008-02-21 11:19 UTC (permalink / raw)
  To: Alexander Graf; +Cc: kvm-devel

Alexander Graf wrote:
> Hi,
>
> this is mostly the same patch I sent to the list several weeks ago, 
> but with fixed whitespaces and comments.
> It implements a dummy value for the MSR_PERF_STATUS MSR. Darwin relies 
> on this and ceases to work without.
>

Applied, thanks.

-- 
error compiling committee.c: too many arguments to function


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-02-21 11:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-21 11:11 [PATCH] Implement dummy values for MSR_PERF_STATUS Alexander Graf
2008-02-21 11:19 ` Avi Kivity

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox