From: "Jan Beulich" <JBeulich@novell.com>
To: Wei Huang <wei.huang2@amd.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: [PATCH][RFC] FPU LWP 4/5: enable LWP for SVM guest
Date: Fri, 15 Apr 2011 10:17:30 +0100 [thread overview]
Message-ID: <4DA8294A020000780003C9D3@vpn.id2.novell.com> (raw)
In-Reply-To: <4DA75B64.30709@amd.com>
>>> On 14.04.11 at 22:39, Wei Huang <wei.huang2@amd.com> wrote:
>+static void svm_lwp_save(struct vcpu *v)
>+{
>+ if ( cpu_has_lwp )
>+ {
>+ rdmsrl(MSR_AMD64_LWP_CFG, v->arch.hvm_svm.guest_lwp_cfg);
>+ wrmsrl(MSR_AMD64_LWP_CFG, 0x0);
>+ /* Disable LWP for next VCPU */
>+ wrmsrl(MSR_AMD64_LWP_CBADDR, 0x0);
>+ }
>+}
>+
>+static void svm_lwp_load(struct vcpu *v)
>+{
>+ if ( cpu_has_lwp )
>+ {
>+ /* Only LWP_CFG is reloaded. LWP_CBADDR will be reloaded via xrstor */
>+ wrmsrl(MSR_AMD64_LWP_CFG, v->arch.hvm_svm.guest_lwp_cfg);
>+ }
>+}
I think I had pointed this out before - to avoid these MSR accesses
for guests not using LWP, you should track whether the vCPU has
LWP support enabled (e.g. non-zero written into LWP_CFG) and
key off of that instead of cpu_has_lwp.
Jan
prev parent reply other threads:[~2011-04-15 9:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-14 20:39 [PATCH][RFC] FPU LWP 4/5: enable LWP for SVM guest Wei Huang
2011-04-15 9:17 ` Jan Beulich [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=4DA8294A020000780003C9D3@vpn.id2.novell.com \
--to=jbeulich@novell.com \
--cc=wei.huang2@amd.com \
--cc=xen-devel@lists.xensource.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;
as well as URLs for NNTP newsgroup(s).