From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Keir Fraser <keir@xen.org>,
George Dunlap <George.Dunlap@eu.citrix.com>,
Eddie Dong <eddie.dong@intel.com>,
xen-devel <xen-devel@lists.xen.org>,
paul.durrant@citrix.com, Jun Nakajima <jun.nakajima@intel.com>,
Yang Z Zhang <yang.z.zhang@intel.com>
Subject: Re: [PATCH v2 4/5] Viridian: populate CPUID leaf 6
Date: Thu, 4 Jul 2013 10:38:10 +0100 [thread overview]
Message-ID: <51D54282.6080907@citrix.com> (raw)
In-Reply-To: <51C80C3102000078000DFDC6@nat28.tlf.novell.com>
[-- Attachment #1.1: Type: text/plain, Size: 1723 bytes --]
On 24/06/13 08:06, Jan Beulich wrote:
> Properly reporting hardware features we use can only help Windows in
> making decisions towards its own performance tuning.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
Does viridian allow for the possibility of these flags to change during
runtime, e.g. migrating an HVM domain from hardware supporting HAP to
hardware which can only manage shadow?
~Andrew
>
> --- a/xen/arch/x86/hvm/viridian.c
> +++ b/xen/arch/x86/hvm/viridian.c
> @@ -41,6 +41,11 @@
> #define CPUID4A_MSR_BASED_APIC (1 << 3)
> #define CPUID4A_RELAX_TIMER_INT (1 << 5)
>
> +/* Viridian CPUID 4000006, Implementation HW features detected and in use. */
> +#define CPUID6A_APIC_OVERLAY (1 << 0)
> +#define CPUID6A_MSR_BITMAPS (1 << 1)
> +#define CPUID6A_NESTED_PAGING (1 << 3)
> +
> int cpuid_viridian_leaves(unsigned int leaf, unsigned int *eax,
> unsigned int *ebx, unsigned int *ecx,
> unsigned int *edx)
> @@ -92,6 +97,15 @@ int cpuid_viridian_leaves(unsigned int l
> *eax |= CPUID4A_MSR_BASED_APIC;
> *ebx = 2047; /* long spin count */
> break;
> + case 6:
> + /* Detected and in use hardware features. */
> + if ( cpu_has_vmx_virtualize_apic_accesses )
> + *eax |= CPUID6A_APIC_OVERLAY;
> + if ( cpu_has_vmx_msr_bitmap || (read_efer() & EFER_SVME) )
> + *eax |= CPUID6A_MSR_BITMAPS;
> + if ( hap_enabled(d) )
> + *eax |= CPUID6A_NESTED_PAGING;
> + break;
> }
>
> return 1;
>
>
>
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
[-- Attachment #1.2: Type: text/html, Size: 2553 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2013-07-04 9:38 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-24 6:54 [PATCH v2 0/5] VMX: fix interaction of Viridian emulation with advanced features Jan Beulich
2013-06-24 7:03 ` [PATCH v2 1/5] VMX: fix interaction of APIC-V and Viridian emulation Jan Beulich
2013-06-24 10:10 ` George Dunlap
2013-06-24 12:52 ` Jan Beulich
2013-06-24 13:09 ` George Dunlap
2013-06-24 13:26 ` Jan Beulich
2013-06-24 13:29 ` George Dunlap
2013-06-24 13:48 ` Jan Beulich
2013-07-04 9:03 ` Andrew Cooper
2013-06-24 7:04 ` [PATCH v2 2/5] VMX/Viridian: suppress MSR-based APIC suggestion when having APIC-V Jan Beulich
2013-06-25 10:29 ` Paul Durrant
2013-06-25 13:43 ` George Dunlap
2013-06-25 13:59 ` Jan Beulich
2013-06-24 7:06 ` [PATCH v2 3/5] VMX: suppress pointless indirect calls Jan Beulich
2013-07-04 9:10 ` Andrew Cooper
2013-06-24 7:06 ` [PATCH v2 4/5] Viridian: populate CPUID leaf 6 Jan Beulich
2013-07-04 9:38 ` Andrew Cooper [this message]
2013-07-04 10:05 ` Jan Beulich
2013-07-04 10:18 ` Andrew Cooper
2013-06-24 7:08 ` [PATCH v2 5/5] Viridian: cleanup Jan Beulich
2013-07-04 9:38 ` Andrew Cooper
2013-07-04 8:38 ` [PATCH v2 0/5] VMX: fix interaction of Viridian emulation with advanced features Jan Beulich
2013-07-04 9:24 ` Zhang, Yang Z
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=51D54282.6080907@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=George.Dunlap@eu.citrix.com \
--cc=JBeulich@suse.com \
--cc=eddie.dong@intel.com \
--cc=jun.nakajima@intel.com \
--cc=keir@xen.org \
--cc=paul.durrant@citrix.com \
--cc=xen-devel@lists.xen.org \
--cc=yang.z.zhang@intel.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).