From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Matt Wilson <msw@amazon.com>,
jforbes@redhat.com, kernel-maint@redhat.com
Cc: "Justin M. Forbes" <jmforbes@linuxtx.org>,
Jan Beulich <JBeulich@suse.com>,
Stefan Bader <stefan.bader@canonical.com>,
xen-devel@lists.xen.org,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [Xen-devel] [PATCH/RFC] Fix xsave bug on older Xen hypervisors
Date: Tue, 11 Sep 2012 07:37:15 -0400 [thread overview]
Message-ID: <20120911113715.GA28221@phenom.dumpdata.com> (raw)
In-Reply-To: <20120911024047.GA7620@u002268147cd4502c336d.ant.amazon.com>
On Mon, Sep 10, 2012 at 07:40:47PM -0700, Matt Wilson wrote:
> On Fri, Sep 07, 2012 at 11:00:22AM -0500, Justin M. Forbes wrote:
> > On Fri, 2012-09-07 at 16:44 +0100, Jan Beulich wrote:
> > >
> > > All of this still doesn't provide evidence that a plain upstream
> > > kernel is actually having any problems in the first place. Further,
> > > if you say EC2 has a crippled hypervisor patch - is that patch
> > > available for looking at somewhere?
> >
> > Yes, I can verify that a plain upstream kernel has problems in the first
> > place, which is why we are carrying a patch to simply disable xsave all
> > together in the pv guest.
> > EC2 is not carrying a patch to cripple the hypervisor, there was an old
> > xen bug that makes all this fail. The correct fix for that bug is to
> > patch the hypervisor, but they have not done so. Upstream xen has had
> > the fix for quite some time, but that doesn't change the fact that a lot
> > of xen guest usage these days is on EC2. This is no different than
> > putting in a quirk to work around a firmware bug in common use.
>
> I've done some testing and have results that indicate otherwise. The
> out-of-tree xen_write_cr4() patch is not needed as of 2.6.39. I tested
> 3.2.21 on a machine that has XSAVE capabilities:
>
> [ec2-user@ip-10-160-18-80 ~]$ cpuid -1 -i | grep -i xsave/xstor
> XSAVE/XSTOR states = true
> OS-enabled XSAVE/XSTOR = false
>
> on an older hypervisor build:
>
> [ec2-user@ip-10-160-18-80 ~]$ cat /sys/hypervisor/version/major
> 3
> [ec2-user@ip-10-160-18-80 ~]$ cat /sys/hypervisor/version/minor
> 0
>
> and it boots without a problem. This patch correctly detects that the
> hypervisor supports XSAVE by testing for OSXSAVE:
>
> commit 947ccf9c3c30307b774af3666ee74fcd9f47f646
> Author: Shan Haitao <haitao.shan@intel.com>
> AuthorDate: Tue Nov 9 11:43:36 2010 -0800
> Commit: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> CommitDate: Wed Apr 6 08:31:13 2011 -0400
>
> xen: Allow PV-OPS kernel to detect whether XSAVE is supported
>
> Xen fails to mask XSAVE from the cpuid feature, despite not historically
> supporting guest use of XSAVE. However, now that XSAVE support has been
> added to Xen, we need to reliably detect its presence.
>
> The most reliable way to do this is to look at the OSXSAVE feature in
> cpuid which is set iff the OS (Xen, in this case), has set
> CR4.OSXSAVE.
>
> Matt
Hey Matt,
Thank you for testing. CC-ing some of the Fedora folks so they are aware that they
can ditch the: fix_xen_guest_on_old_EC2.patch
next prev parent reply other threads:[~2012-09-11 11:48 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-07 11:40 [PATCH/RFC] Fix xsave bug on older Xen hypervisors Stefan Bader
2012-09-07 12:33 ` Jan Beulich
2012-09-07 12:33 ` [Xen-devel] " Jan Beulich
2012-09-07 13:21 ` Stefan Bader
2012-09-07 13:21 ` [Xen-devel] " Stefan Bader
2012-09-07 14:02 ` Jan Beulich
2012-09-07 14:22 ` Justin M. Forbes
2012-09-07 14:54 ` Konrad Rzeszutek Wilk
2012-09-07 15:43 ` Stefan Bader
2012-09-08 10:18 ` [Xen-devel] " Paolo Bonzini
2012-09-08 10:18 ` Paolo Bonzini
2012-09-10 22:36 ` Matt Wilson
2012-09-10 22:36 ` [Xen-devel] " Matt Wilson
2012-09-07 14:54 ` Konrad Rzeszutek Wilk
2012-09-07 15:44 ` [Xen-devel] " Jan Beulich
2012-09-07 15:47 ` Stefan Bader
2012-09-07 15:52 ` Jan Beulich
2012-09-07 15:48 ` Konrad Rzeszutek Wilk
2012-09-07 15:48 ` Konrad Rzeszutek Wilk
2012-09-07 16:13 ` [Xen-devel] " Stefan Bader
2012-09-08 10:28 ` Paolo Bonzini
2012-09-08 10:28 ` [Xen-devel] " Paolo Bonzini
2012-09-07 16:13 ` Stefan Bader
2012-09-07 15:52 ` Jan Beulich
2012-09-07 15:54 ` [Xen-devel] " Ian Campbell
2012-09-07 15:54 ` Ian Campbell
2012-09-08 10:20 ` Paolo Bonzini
2012-09-08 10:20 ` [Xen-devel] " Paolo Bonzini
2012-09-07 15:47 ` Stefan Bader
2012-09-07 16:00 ` [Xen-devel] " Justin M. Forbes
2012-09-11 2:40 ` Matt Wilson
2012-09-11 11:37 ` Konrad Rzeszutek Wilk [this message]
2012-09-11 13:06 ` Josh Boyer
2012-09-11 13:06 ` Josh Boyer
2012-09-11 11:37 ` Konrad Rzeszutek Wilk
2012-09-11 2:40 ` Matt Wilson
2012-09-07 16:00 ` Justin M. Forbes
2012-09-07 15:44 ` Jan Beulich
2012-09-07 14:22 ` Justin M. Forbes
2012-09-07 14:02 ` Jan Beulich
2012-09-07 13:47 ` Konrad Rzeszutek Wilk
2012-09-07 13:47 ` Konrad Rzeszutek Wilk
2012-09-11 1:17 ` Matt Wilson
2012-09-11 1:17 ` Matt Wilson
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=20120911113715.GA28221@phenom.dumpdata.com \
--to=konrad.wilk@oracle.com \
--cc=JBeulich@suse.com \
--cc=jforbes@redhat.com \
--cc=jmforbes@linuxtx.org \
--cc=kernel-maint@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=msw@amazon.com \
--cc=stefan.bader@canonical.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.