public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: "Joerg Roedel" <joerg.roedel@amd.com>
To: "Alexey Eremenko" <alexey.eremenko@qumranet.com>
Cc: kvm-devel@lists.sourceforge.net
Subject: Re: KVM: SVM: Implement LBRV virtualization
Date: Tue, 12 Feb 2008 18:02:21 +0100	[thread overview]
Message-ID: <20080212170221.GL6960@amd.com> (raw)
In-Reply-To: <64F9B87B6B770947A9F8391472E032160C95C68F@ehost011-8.exch011.intermedia.net>

On Tue, Feb 12, 2008 at 08:35:50AM -0800, Alexey Eremenko wrote:
> 
> Hi all,
> 
> Can you explain a bit more about "LBRV virtualization" or give links, that explain this ?

LBRV stands for Last Branch Record Virtualization. The LBR consists
basically of 4 MSRs: The RIPs of the last branch (from and to RIP) and the
RIPs of the last exception (from and to RIP). The recording of these
MSRs need to enabled in a fifth MSR (DEBUG_CTL). On K8 with SVM the
guest has no own copys of these MSRs. On Barcelona, there is a new SVM
feature which gives the guest its own copies of these MSRs. This needs
to be enabled setting lbr_ctl to 1 in the VMCB. If this is done, the
hardware switches to the guest copies of these MSRs when doing a VMRUN.
You can find more details about this in the AMD Architecture Programmers
Manual Volume 2, Section 15.22.
My patch only enables LBRV if the guest enables Last Branch Recording in
its copy of the DEBUG_CTL MSR.

Joerg

-- 
           |           AMD Saxony Limited Liability Company & Co. KG
 Operating |         Wilschdorfer Landstr. 101, 01109 Dresden, Germany
 System    |                  Register Court Dresden: HRA 4896
 Research  |              General Partner authorized to represent:
 Center    |             AMD Saxony LLC (Wilmington, Delaware, US)
           | General Manager of AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy



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

      reply	other threads:[~2008-02-12 17:02 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-12 15:27 KVM: SVM: Implement LBRV virtualization Joerg Roedel
2008-02-12 15:27 ` [PATCH 1/3] KVM: SVM: let init_vmcb() take struct vcpu_svm as parameter Joerg Roedel
2008-02-12 15:27 ` [PATCH 2/3] KVM: SVM: allocate the MSR permission map per VCPU Joerg Roedel
2008-02-12 15:27 ` [PATCH 3/3] KVM: SVM: enable LBRV virtualization Joerg Roedel
2008-02-13  9:50   ` Avi Kivity
2008-02-13 10:03     ` Joerg Roedel
2008-02-13 10:20       ` Avi Kivity
2008-02-12 15:53 ` KVM: SVM: Implement " Maciej Kowalczyk
2008-02-12 16:01   ` Joerg Roedel
2008-02-12 16:35     ` Alexey Eremenko
2008-02-12 17:02       ` Joerg Roedel [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=20080212170221.GL6960@amd.com \
    --to=joerg.roedel@amd.com \
    --cc=alexey.eremenko@qumranet.com \
    --cc=kvm-devel@lists.sourceforge.net \
    /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