All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Xen-devel <xen-devel@lists.xen.org>
Subject: Re: [PATCH 5/5] x86/monitor: Capture Xen's intent to use monitor at boot time
Date: Thu, 18 Jan 2018 01:05:28 -0700	[thread overview]
Message-ID: <5A606358020000780019FB6A@prv-mh.provo.novell.com> (raw)
In-Reply-To: <1515782244-6412-6-git-send-email-andrew.cooper3@citrix.com>

>>> On 12.01.18 at 19:37, <andrew.cooper3@citrix.com> wrote:
> @@ -312,6 +313,12 @@ static void generic_identify(struct cpuinfo_x86 *c)
>  	if ( cpu_has(c, X86_FEATURE_CLFLUSH) )
>  		c->x86_clflush_size = ((ebx >> 8) & 0xff) * 8;
>  
> +	/* Xen only uses MONITOR if INTERRUPT_BREAK is available. */
> +	if ( cpu_has(c, X86_FEATURE_MONITOR) &&
> +	     ((cpuid_ecx(CPUID_MWAIT_LEAF) & CPUID_MWAIT_MIN_FEATURES) ==
> +	      CPUID_MWAIT_MIN_FEATURES) )
> +		set_bit(X86_FEATURE_XEN_MONITOR, c->x86_capability);

Leaving aside that this could/should be __set_bit(), I think we
shouldn't do anything like this for synthetic feature bits and at
the same time ...

> @@ -104,6 +100,7 @@
>  #define cpu_has_arch_perfmon    boot_cpu_has(X86_FEATURE_ARCH_PERFMON)
>  #define cpu_has_cpuid_faulting  boot_cpu_has(X86_FEATURE_CPUID_FAULTING)
>  #define cpu_has_aperfmperf      boot_cpu_has(X86_FEATURE_APERFMPERF)
> +#define cpu_has_xen_monitor     boot_cpu_has(X86_FEATURE_XEN_MONITOR)

... test for them like this. Either we're certain all CPUs are identical,
in which case the above should be setup_force_cpu_cap(), or each
CPU should really inspect its own feature flag before using the
feature. I'd got the former route for now, and with that change
Reviewed-by: Jan Beulich <jbeulich@suse.com>

Jan


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

      reply	other threads:[~2018-01-18  8:05 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-12 18:37 [PATCH 0/5] x86: Misc improvements from KAISER-prep work Andrew Cooper
2018-01-12 18:37 ` [PATCH 1/5] x86/idt: Factor out enabling and disabling of ISTs Andrew Cooper
2018-01-12 20:12   ` Doug Goldstein
2018-01-17 14:43   ` Wei Liu
2018-01-18  7:43     ` Jan Beulich
2018-01-12 18:37 ` [PATCH 2/5] x86/pv: Rename invalidate_shadow_ldt() to pv_destroy_ldt() Andrew Cooper
2018-01-12 20:15   ` Doug Goldstein
2018-01-17 14:43   ` Wei Liu
2018-01-18  7:45     ` Jan Beulich
2018-01-12 18:37 ` [PATCH 3/5] x86/pv: Break handle_ldt_mapping_fault() out of handle_gdt_ldt_mapping_fault() Andrew Cooper
2018-01-12 20:22   ` Doug Goldstein
2018-01-18  7:48   ` Jan Beulich
2018-01-12 18:37 ` [PATCH 4/5] x86/pv: Drop support for paging out the LDT Andrew Cooper
2018-01-12 21:53   ` Doug Goldstein
2018-01-18  7:59   ` Jan Beulich
2018-01-18 10:38     ` George Dunlap
2018-01-18 10:57       ` Jan Beulich
2018-01-18 10:57       ` Andrew Cooper
2018-01-18 11:00         ` Andrew Cooper
2018-01-18 11:37           ` Jan Beulich
2018-01-12 18:37 ` [PATCH 5/5] x86/monitor: Capture Xen's intent to use monitor at boot time Andrew Cooper
2018-01-18  8:05   ` 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=5A606358020000780019FB6A@prv-mh.provo.novell.com \
    --to=jbeulich@suse.com \
    --cc=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.