All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Xen-devel <xen-devel@lists.xen.org>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
Subject: [PATCH v2 15/25] x86/pv: Use per-domain policy information when calculating the cpumasks
Date: Mon, 9 Jan 2017 11:03:32 +0000	[thread overview]
Message-ID: <1483959822-30484-16-git-send-email-andrew.cooper3@citrix.com> (raw)
In-Reply-To: <1483959822-30484-1-git-send-email-andrew.cooper3@citrix.com>

... rather than dynamically clamping against the PV maximum policy.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
---
v2:
 * Spelling fix in the commit message
---
 xen/arch/x86/domctl.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/xen/arch/x86/domctl.c b/xen/arch/x86/domctl.c
index a3b2b72..c538781 100644
--- a/xen/arch/x86/domctl.c
+++ b/xen/arch/x86/domctl.c
@@ -100,8 +100,8 @@ static void update_domain_cpuid_info(struct domain *d,
         if ( is_pv_domain(d) && ((levelling_caps & LCAP_1cd) == LCAP_1cd) )
         {
             uint64_t mask = cpuidmask_defaults._1cd;
-            uint32_t ecx = ctl->ecx & pv_featureset[FEATURESET_1c];
-            uint32_t edx = ctl->edx & pv_featureset[FEATURESET_1d];
+            uint32_t ecx = p->basic._1c;
+            uint32_t edx = p->basic._1d;
 
             /*
              * Must expose hosts HTT and X2APIC value so a guest using native
@@ -175,7 +175,7 @@ static void update_domain_cpuid_info(struct domain *d,
         {
             uint64_t mask = cpuidmask_defaults._7ab0;
             uint32_t eax = ctl->eax;
-            uint32_t ebx = ctl->ebx & pv_featureset[FEATURESET_7b0];
+            uint32_t ebx = p->feat._7b0;
 
             if ( boot_cpu_data.x86_vendor == X86_VENDOR_AMD )
                 mask &= ((uint64_t)eax << 32) | ebx;
@@ -191,7 +191,7 @@ static void update_domain_cpuid_info(struct domain *d,
         if ( is_pv_domain(d) && ((levelling_caps & LCAP_Da1) == LCAP_Da1) )
         {
             uint64_t mask = cpuidmask_defaults.Da1;
-            uint32_t eax = ctl->eax & pv_featureset[FEATURESET_Da1];
+            uint32_t eax = p->xstate.Da1;
 
             if ( boot_cpu_data.x86_vendor == X86_VENDOR_INTEL )
                 mask &= (~0ULL << 32) | eax;
@@ -204,8 +204,8 @@ static void update_domain_cpuid_info(struct domain *d,
         if ( is_pv_domain(d) && ((levelling_caps & LCAP_e1cd) == LCAP_e1cd) )
         {
             uint64_t mask = cpuidmask_defaults.e1cd;
-            uint32_t ecx = ctl->ecx & pv_featureset[FEATURESET_e1c];
-            uint32_t edx = ctl->edx & pv_featureset[FEATURESET_e1d];
+            uint32_t ecx = p->extd.e1c;
+            uint32_t edx = p->extd.e1d;
 
             /*
              * Must expose hosts CMP_LEGACY value so a guest using native
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

  parent reply	other threads:[~2017-01-09 11:03 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-09 11:03 [PATCH v2 00/25] xen/x86: Per-domain CPUID policies Andrew Cooper
2017-01-09 11:03 ` [PATCH v2 01/25] x86/cpuid: Introduce guest_cpuid() and struct cpuid_leaf Andrew Cooper
2017-01-09 11:38   ` Paul Durrant
2017-01-09 15:04   ` Jan Beulich
2017-01-09 15:09     ` Andrew Cooper
2017-01-09 15:40       ` Jan Beulich
2017-01-09 15:45         ` Andrew Cooper
2017-01-09 23:31   ` Boris Ostrovsky
2017-01-11  5:47   ` Tian, Kevin
2017-01-09 11:03 ` [PATCH v2 02/25] x86/cpuid: Introduce struct cpuid_policy Andrew Cooper
2017-01-09 15:15   ` Jan Beulich
2017-01-09 16:08     ` Andrew Cooper
2017-01-09 16:10       ` Jan Beulich
2017-01-09 11:03 ` [PATCH v2 03/25] x86/cpuid: Move featuresets into " Andrew Cooper
2017-01-09 11:03 ` [PATCH v2 04/25] x86/cpuid: Allocate a CPUID policy for every domain Andrew Cooper
2017-01-09 11:03 ` [PATCH v2 05/25] x86/cpuid: Recalculate a domains CPUID policy when appropriate Andrew Cooper
2017-01-09 11:35   ` Andrew Cooper
2017-01-09 18:11     ` Stefano Stabellini
2017-01-09 15:22   ` Jan Beulich
2017-01-09 11:03 ` [PATCH v2 06/25] x86/hvm: Dispatch cpuid_viridian_leaves() from guest_cpuid() Andrew Cooper
2017-01-09 11:36   ` Paul Durrant
2017-01-09 15:29   ` Jan Beulich
2017-01-09 11:03 ` [PATCH v2 07/25] x86/cpuid: Dispatch cpuid_hypervisor_leaves() " Andrew Cooper
2017-01-09 16:21   ` Jan Beulich
2017-01-09 16:28     ` Andrew Cooper
2017-01-09 16:35       ` Jan Beulich
2017-01-09 11:03 ` [PATCH v2 08/25] x86/cpuid: Introduce named feature bitfields Andrew Cooper
2017-01-09 16:31   ` Jan Beulich
2017-01-09 16:39     ` Andrew Cooper
2017-01-09 11:03 ` [PATCH v2 09/25] x86/hvm: Improve hvm_efer_valid() using named features Andrew Cooper
2017-01-09 11:03 ` [PATCH v2 10/25] x86/hvm: Improve CR4 verification " Andrew Cooper
2017-01-09 11:03 ` [PATCH v2 11/25] x86/vvmx: Use hvm_cr4_guest_valid_bits() to calculate MSR_IA32_VMX_CR4_FIXED1 Andrew Cooper
2017-01-09 11:03 ` [PATCH v2 12/25] x86/pv: Improve pv_cpuid() using named features Andrew Cooper
2017-01-09 11:03 ` [PATCH v2 13/25] x86/hvm: Improve CPUID and MSR handling " Andrew Cooper
2017-01-09 11:03 ` [PATCH v2 14/25] x86/svm: Improvements " Andrew Cooper
2017-01-09 16:38   ` Jan Beulich
2017-01-09 23:34   ` Boris Ostrovsky
2017-01-09 11:03 ` Andrew Cooper [this message]
2017-01-09 11:03 ` [PATCH v2 16/25] x86/pv: Use per-domain policy information in pv_cpuid() Andrew Cooper
2017-01-12 15:22   ` Boris Ostrovsky
2017-01-12 15:31     ` Andrew Cooper
2017-01-12 15:50       ` Boris Ostrovsky
2017-01-12 16:14         ` Andrew Cooper
2017-01-12 18:00           ` Boris Ostrovsky
2017-01-12 19:27             ` Andrew Cooper
2017-01-12 20:46               ` Boris Ostrovsky
2017-01-12 20:48                 ` Andrew Cooper
2017-01-12 20:51                   ` Boris Ostrovsky
2017-01-13  2:19                     ` Boris Ostrovsky
2017-01-09 11:03 ` [PATCH v2 17/25] x86/hvm: Use per-domain policy information in hvm_cpuid() Andrew Cooper
2017-01-09 11:03 ` [PATCH v2 18/25] x86/cpuid: Drop the temporary linear feature bitmap from struct cpuid_policy Andrew Cooper
2017-01-09 11:03 ` [PATCH v2 19/25] x86/cpuid: Calculate appropriate max_leaf values for the global policies Andrew Cooper
2017-01-09 11:03 ` [PATCH v2 20/25] x86/cpuid: Perform max_leaf calculations in guest_cpuid() Andrew Cooper
2017-01-09 16:40   ` Jan Beulich
2017-01-09 11:03 ` [PATCH v2 21/25] x86/cpuid: Move all leaf 7 handling into guest_cpuid() Andrew Cooper
2017-01-09 16:46   ` Jan Beulich
2017-01-09 11:03 ` [PATCH v2 22/25] x86/hvm: Use guest_cpuid() rather than hvm_cpuid() Andrew Cooper
2017-01-09 11:03 ` [PATCH v2 23/25] x86/svm: " Andrew Cooper
2017-01-09 11:03 ` [PATCH v2 24/25] x86/cpuid: Effectively remove pv_cpuid() and hvm_cpuid() Andrew Cooper
2017-01-09 11:03 ` [PATCH v2 25/25] x86/cpuid: Alter the legacy-path prototypes to match guest_cpuid() Andrew Cooper

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=1483959822-30484-16-git-send-email-andrew.cooper3@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=xen-devel@lists.xen.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.