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>,
	Jan Beulich <JBeulich@suse.com>
Subject: [PATCH 6/6] x86/cpuid: Offer ITSC to domains which are automatically non-migrateable
Date: Mon, 16 Jan 2017 11:40:30 +0000	[thread overview]
Message-ID: <1484566830-13916-7-git-send-email-andrew.cooper3@citrix.com> (raw)
In-Reply-To: <1484566830-13916-1-git-send-email-andrew.cooper3@citrix.com>

Dom0 doesn't have a toolstack to explicitly decide that ITSC is safe to offer.
For domains which are constructed with disable_migrate set, offer ITSC
automatically.

This is important for HVM-based dom0, and for when cpuid faulting is imposed
on the control domain.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Jan Beulich <JBeulich@suse.com>
---
 xen/arch/x86/cpuid.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/xen/arch/x86/cpuid.c b/xen/arch/x86/cpuid.c
index 9f16502..bf1eed6 100644
--- a/xen/arch/x86/cpuid.c
+++ b/xen/arch/x86/cpuid.c
@@ -440,6 +440,9 @@ int init_domain_cpuid_policy(struct domain *d)
 
     *d->arch.cpuid = is_pv_domain(d) ? pv_max_policy : hvm_max_policy;
 
+    if ( d->disable_migrate )
+        d->arch.cpuid->extd.itsc = cpu_has_itsc;
+
     recalculate_cpuid_policy(d);
 
     for ( i = 0; i < MAX_CPUID_INPUT; i++ )
-- 
2.1.4


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

  parent reply	other threads:[~2017-01-16 11:40 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-16 11:40 [PATCH 0/6] Further CPUID improvements Andrew Cooper
2017-01-16 11:40 ` [PATCH 1/6] x86/xstate: Fix array overrun on hardware with LWP Andrew Cooper
2017-01-16 16:26   ` Jan Beulich
2017-01-16 11:40 ` [PATCH 2/6] x86/cpuid: Introduce recalculate_xstate() Andrew Cooper
2017-01-16 16:45   ` Jan Beulich
2017-01-16 17:02     ` Andrew Cooper
2017-01-16 17:09       ` Jan Beulich
2017-01-17 11:27   ` [PATCH v2 " Andrew Cooper
2017-01-17 12:52     ` Jan Beulich
2017-01-17 15:15       ` Andrew Cooper
2017-01-17 15:28         ` Jan Beulich
2017-01-17 15:30           ` Andrew Cooper
2017-01-16 11:40 ` [PATCH 3/6] x86/cpuid: Move all xstate leaf handling into guest_cpuid() Andrew Cooper
2017-01-16 16:58   ` Jan Beulich
2017-01-16 17:07     ` Andrew Cooper
2017-01-16 11:40 ` [PATCH 4/6] tools/libxc: Remove xsave calculations from libxc Andrew Cooper
2017-01-16 11:44   ` Wei Liu
2017-01-16 11:40 ` [PATCH 5/6] x86/cpuid: Don't offer HVM hypervisor leaves to PV guests Andrew Cooper
2017-01-16 17:02   ` Jan Beulich
2017-01-17 11:01     ` Andrew Cooper
2017-01-16 11:40 ` Andrew Cooper [this message]
2017-01-16 17:07   ` [PATCH 6/6] x86/cpuid: Offer ITSC to domains which are automatically non-migrateable Jan Beulich
2017-01-16 17:26     ` Andrew Cooper
2017-01-17  9:00       ` Jan Beulich

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=1484566830-13916-7-git-send-email-andrew.cooper3@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=JBeulich@suse.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.