All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Markus Rechberger" <markus.rechberger-5C7GfCeVMHo@public.gmane.org>
To: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
	avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org,
	muli-7z/5BgaJwgfQT0dZR+AlfA@public.gmane.org
Subject: [PATCH] svm last branch recording MSR emulation
Date: Fri, 25 Jan 2008 13:38:42 +0100	[thread overview]
Message-ID: <4799D852.9080606@amd.com> (raw)

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

Hi,

this patch adds support for the lbr MSR emulation, it also enables 
support for Windows XP 64bit guests.

Signed-off-by: Joerg Roedel <Joerg.Roedel-5C7GfCeVMHo@public.gmane.org>
Signed-off-by: Markus Rechberger <Markus.Rechberger-5C7GfCeVMHo@public.gmane.org>


[-- Attachment #2: svm.diff --]
[-- Type: text/plain, Size: 1393 bytes --]

--- svm.c.orig	2008-01-23 10:04:14.000000000 +0100
+++ svm.c	2008-01-25 12:52:11.000000000 +0100
@@ -1099,6 +1100,21 @@
 	case MSR_IA32_SYSENTER_ESP:
 		*data = svm->vmcb->save.sysenter_esp;
 		break;
+	case MSR_IA32_DEBUGCTLMSR:
+		*data = svm->vmcb->save.dbgctl;
+		break;
+	case MSR_IA32_LASTBRANCHFROMIP:
+		*data = svm->vmcb->save.br_from;
+		break;
+	case MSR_IA32_LASTBRANCHTOIP:
+		*data = svm->vmcb->save.br_to;
+		break;
+	case MSR_IA32_LASTINTFROMIP:
+		*data = svm->vmcb->save.last_excp_from;
+		break;
+	case MSR_IA32_LASTINTTOIP:
+		*data = svm->vmcb->save.last_excp_to;
+		break;
 	default:
 		return kvm_get_msr_common(vcpu, ecx, data);
 	}
@@ -1171,6 +1187,19 @@
 		if (data != 0)
 			goto unhandled;
 		break;
+	case MSR_IA32_DEBUGCTLMSR:
+		svm->vmcb->save.dbgctl = data;
+		if (svm->vmcb->save.dbgctl && svm_has(SVM_FEATURE_LBRV)) {
+			void *msrpm_va;
+			svm->vmcb->control.lbr_ctl = 1;
+			msrpm_va = page_address(pfn_to_page(msrpm_base >> PAGE_SHIFT));
+			set_msr_interception(msrpm_va, MSR_IA32_DEBUGCTLMSR, 0, 0);
+			set_msr_interception(msrpm_va, MSR_IA32_LASTBRANCHFROMIP, 0, 0);
+			set_msr_interception(msrpm_va, MSR_IA32_LASTBRANCHTOIP, 0, 0);
+			set_msr_interception(msrpm_va, MSR_IA32_LASTINTFROMIP, 0, 0);
+			set_msr_interception(msrpm_va, MSR_IA32_LASTINTTOIP, 0, 0);
+		}
+		break;
 	default:
 	unhandled:
 		return kvm_set_msr_common(vcpu, ecx, data);

[-- 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: 186 bytes --]

_______________________________________________
kvm-devel mailing list
kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/kvm-devel

             reply	other threads:[~2008-01-25 12:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-25 12:38 Markus Rechberger [this message]
     [not found] ` <4799D852.9080606-5C7GfCeVMHo@public.gmane.org>
2008-01-27  7:29   ` [PATCH] svm last branch recording MSR emulation Avi Kivity
  -- strict thread matches above, loose matches on Subject: below --
2007-08-09 12:05 [PATCH] svm: " Jan Beulich

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=4799D852.9080606@amd.com \
    --to=markus.rechberger-5c7gfcevmho@public.gmane.org \
    --cc=avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org \
    --cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    --cc=muli-7z/5BgaJwgfQT0dZR+AlfA@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.