From: "Joerg Roedel" <joerg.roedel@amd.com>
To: "Avi Kivity" <avi@qumranet.com>
Cc: kvm-devel@lists.sourceforge.net,
Markus Rechberger <markus.rechberger@amd.com>
Subject: Re: [PATCH 3/3] KVM: SVM: enable LBRV virtualization
Date: Wed, 13 Feb 2008 11:03:54 +0100 [thread overview]
Message-ID: <20080213100354.GA22943@amd.com> (raw)
In-Reply-To: <47B2BD82.1050800@qumranet.com>
On Wed, Feb 13, 2008 at 11:50:58AM +0200, Avi Kivity wrote:
> Joerg Roedel wrote:
> >@@ -1224,6 +1261,15 @@ static int svm_set_msr(struct kvm_vcpu *vcpu, unsigned ecx, u64 data)
> > if (data != 0)
> > goto unhandled;
> > break;
> >+ case MSR_IA32_DEBUGCTLMSR:
> >+ svm->vmcb->save.dbgctl = data;
> >+ if (!svm_has(SVM_FEATURE_LBRV))
> >+ break;
> >+ if (data & (1ULL<<0))
> >+ svm_enable_lbrv(svm);
> >+ else
> >+ svm_disable_lbrv(svm);
> >+ break;
> > default:
> > unhandled:
> > return kvm_set_msr_common(vcpu, ecx, data);
> >
>
> This still has the same issue as the previous patchset: if the guest enables some other bit
> in MSR_IA32_DEBUCTLMSR, we silently ignore it. We should either pr_unimpl() on such bits or
> not handle them (ultimately injecting a #GP).
Thats not true. The patch saves the MSR value in vmcb->save.dbgctl. This
value is returned on reads of that MSR. So no bit is ignored. This value
in the VMCB is also used as the guests copy of that MSR if LBR
virtualization is enabled. But another issue, I should ensure the guest
does not set reserved bits in that MSR.
> Also, I'd like a simple patch for 2.6.25 to add support for Windows x86 on AMD. So if the
> first patch in the series can add support for the bits that Windows sets in
> MSR_IA32_DEBUGCTLMSR (I imagine it just writes zero?) then I can queue that for 2.6.25 and
> the rest for 2.6.26.
Ok, I will work that into the patchset.
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/
next prev parent reply other threads:[~2008-02-13 10:03 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 [this message]
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
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=20080213100354.GA22943@amd.com \
--to=joerg.roedel@amd.com \
--cc=avi@qumranet.com \
--cc=kvm-devel@lists.sourceforge.net \
--cc=markus.rechberger@amd.com \
/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