public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
To: Markus Rechberger <markus.rechberger-5C7GfCeVMHo@public.gmane.org>
Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: [PATCH] svm last branch recording MSR emulation
Date: Sun, 27 Jan 2008 09:29:44 +0200	[thread overview]
Message-ID: <479C32E8.7090205@qumranet.com> (raw)
In-Reply-To: <4799D852.9080606-5C7GfCeVMHo@public.gmane.org>

Markus Rechberger wrote:
> 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>
> @@ -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;
>   

blank line

> +			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:

What is the performance impact (for example, on 
user/test/x86/vmexit.flat when modified to set a bit in debugctl)?

Is it not better to enable LBR virtualization only when the guest 
enables LBR (but avoid it when other bits are enabled)?

Can we disable LBR virtualization when the guest disables LBR?

-- 
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/

      parent reply	other threads:[~2008-01-27  7:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-25 12:38 [PATCH] svm last branch recording MSR emulation Markus Rechberger
     [not found] ` <4799D852.9080606-5C7GfCeVMHo@public.gmane.org>
2008-01-27  7:29   ` Avi Kivity [this message]

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=479C32E8.7090205@qumranet.com \
    --to=avi-atkuwr5tajbwk0htik3j/w@public.gmane.org \
    --cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    --cc=markus.rechberger-5C7GfCeVMHo@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox