From: Jeff Law <law@redhat.com>
To: konrad@darnok.org
Cc: Jeremy Fitzhardinge <jeremy@goop.org>,
Tim.Deegan@citrix.com,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
haitao.shan@intel.com, weidong.han@intel.com,
stefan.bader@canonical.com, xen-devel <xen-devel@lists.xen.org>,
Jan Beulich <JBeulich@suse.com>
Subject: Re: xsave=0 workaround needed on 3.2 kernels with Xen 4.1 or Xen-unstable.
Date: Thu, 10 May 2012 20:27:14 -0600 [thread overview]
Message-ID: <4FAC7902.6050701@redhat.com> (raw)
In-Reply-To: <CAPbh3rtBywB8t+gnQ0nhuyOge3=j_9fDvnyuHLzE8TLtCNFHdg@mail.gmail.com>
On 05/10/2012 06:58 PM, Konrad Rzeszutek Wilk wrote:
>>> Ironically, the code in init-arch used to look like:
>>>
>>>
>>> if (__cpu_features.cpuid[COMMON_CPUID_INDEX_1].ecx& bit_AVX)
>>> {
>>>
>>> /* Reset the AVX bit in case OSXSAVE is disabled. */
>>> if ((__cpu_features.cpuid[COMMON_CPUID_INDEX_1].ecx& bit_OSXSAVE) ==
>>> 0
>>> || ({ unsigned int xcrlow;
>>> unsigned int xcrhigh;
>>> asm ("xgetbv"
>>>
>>> : "=a" (xcrlow), "=d" (xcrhigh) : "c" (0));
>>> (xcrlow& 6) != 6; }))
>>>
>>> __cpu_features.cpuid[COMMON_CPUID_INDEX_1].ecx&= ~bit_AVX;
>>> }
>>>
>>>
>>> Which I think would have done the right thing. Uli changed it to the
>>> form you quoted just 2 hours after installing the version I quoted.
>>
>> Sadly no as it would have executed the xgetv instruction. Since the first
>> part of the boolean logic returns false.
>
> <sigh> And that is what I get from typing this while stopping at
> lights and being in a hurry and doing this on a cellphone.
> Please ignore what I said above - the earlier version would have worked correct.
No worries :-)
Had you not gotten involved, I never would have seen the xen-devel
thread which then referred me to the appropriate Intel doc to confirm
that your patch should fix the problem. Your input on this issue has
been greatly appreciated.
jeff
next prev parent reply other threads:[~2012-05-11 2:27 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-30 19:37 xsave=0 workaround needed on 3.2 kernels with Xen 4.1 or Xen-unstable Konrad Rzeszutek Wilk
2012-05-02 9:00 ` Jan Beulich
2012-05-02 18:42 ` AP
2012-05-03 9:15 ` Jan Beulich
2012-05-03 18:09 ` AP
2012-05-04 19:30 ` AP
2012-05-07 7:15 ` Jan Beulich
2012-05-07 16:07 ` Konrad Rzeszutek Wilk
2012-05-07 22:55 ` Jeremy Fitzhardinge
2012-05-07 23:57 ` AP
2012-05-08 0:08 ` Konrad Rzeszutek Wilk
2012-05-08 0:41 ` AP
2012-05-08 16:39 ` Konrad Rzeszutek Wilk
2012-05-08 17:02 ` Matt Wilson
2012-05-09 0:35 ` Konrad Rzeszutek Wilk
2012-05-09 13:11 ` Konrad Rzeszutek Wilk
2012-05-09 13:30 ` Ian Campbell
2012-05-09 13:34 ` Jan Beulich
2012-05-09 17:38 ` Konrad Rzeszutek Wilk
2012-05-10 19:39 ` Jeff Law
2012-05-10 20:57 ` Konrad Rzeszutek Wilk
2012-05-11 0:58 ` Konrad Rzeszutek Wilk
2012-05-11 2:27 ` Jeff Law [this message]
2012-05-11 8:23 ` Jan Beulich
2012-05-10 20:15 ` Jeff Law
2012-05-08 6:25 ` 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=4FAC7902.6050701@redhat.com \
--to=law@redhat.com \
--cc=JBeulich@suse.com \
--cc=Tim.Deegan@citrix.com \
--cc=haitao.shan@intel.com \
--cc=jeremy@goop.org \
--cc=konrad.wilk@oracle.com \
--cc=konrad@darnok.org \
--cc=stefan.bader@canonical.com \
--cc=weidong.han@intel.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 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).