All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>,
	xen-devel <xen-devel@lists.xenproject.org>
Cc: Keir Fraser <keir@xen.org>
Subject: Re: [PATCH 3/4] x86: don't use FPU instructions when there is no FPU
Date: Wed, 14 Oct 2015 15:30:45 +0100	[thread overview]
Message-ID: <561E6715.70509@citrix.com> (raw)
In-Reply-To: <561E753602000078000AAF09@prv-mh.provo.novell.com>

On 14/10/15 14:31, Jan Beulich wrote:
> --- a/xen/include/asm-x86/cpufeature.h
> +++ b/xen/include/asm-x86/cpufeature.h
> @@ -170,6 +170,7 @@
>  #define CPUID5_ECX_EXTENSIONS_SUPPORTED 0x1
>  #define CPUID5_ECX_INTERRUPT_BREAK      0x2
>  
> +#define cpu_has_fpu		boot_cpu_has(X86_FEATURE_FPU)

This distinguishes only between an onboard fpu or an original x87
co-processor.  It does not represent the presence or absence of an fpu.

Looking at the Xeon Phi documentation
(http://download-software.intel.com/sites/default/files/forum/278102/327364001en.pdf),
it has this feature bit set, although it does have MMX clear.

Interestingly however, a Phi's default MXCSR value ix 0x20000h and will
#GP at any attempt to clear bit 21, which means fpu_init() will
unconditionally blow up on such a system.

I am not aware of a bit which signifies the absence of FPU
capabilities.  Until there is, I don't think changes along these lines
are a safe way to go.

~Andrew

  reply	other threads:[~2015-10-14 14:30 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-14 13:22 [PATCH 0/4] x86: capabilities handling adjustments Jan Beulich
2015-10-14 13:29 ` [PATCH 1/4] x86: remove unused x87 remnants of 32-bit days Jan Beulich
2015-10-14 13:57   ` Andrew Cooper
2015-10-14 14:05     ` Andrew Cooper
2015-10-14 13:30 ` [PATCH 2/4] x86: drop further constant cpu_has_* predicates Jan Beulich
2015-10-14 14:02   ` Andrew Cooper
2015-10-14 13:31 ` [PATCH 3/4] x86: don't use FPU instructions when there is no FPU Jan Beulich
2015-10-14 14:30   ` Andrew Cooper [this message]
2015-10-14 14:46     ` Jan Beulich
2015-10-14 13:31 ` [PATCH 4/4] x86/capabilities: set/clear them using non-locked bitops Jan Beulich
2015-10-14 14:36   ` 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=561E6715.70509@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=keir@xen.org \
    --cc=xen-devel@lists.xenproject.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.