[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [RFC] Linux save_fl PVOP for Xen



On 16/04/15 19:40, Andrew Cooper wrote:
> Having recently got some Broadwell hardware, our automatic test system
> discovered that 32bit PV guests would reliably blow up while attempting
> to boot.
> 
> It turns out that the save_fl PVOP is at fault.  The comment is false,
> as setup_smap() uses it to check that the Alignment Check flag is clear.
> 
> As the Xen PVOP leaves everything other than %ah worth of eflags
> uninitialised, the BUG_ON(eflags & X86_EFLAGS_AC) in setup_smap() is
> unconditional undefined behaviour on all versions of Linux since SMAP
> support was introduced.

I'm somewhat surprised this ever worked...

> I had developed a patch (see below) and was writing up the commit
> message, but it would appear that this PVOP is also used by PVHVM
> domains, which invalidates an assumption underlying the fix (insofar
> that 'pushf' would unconditionally have IF set).

PVHVM uses native save/restore flags.

> 2) Change setup_smap() to use something like native_safe_fl().  Unlikely
> to get traction upstream, and fragile to similar changes in the future.

This one liner seems preferred to me.  Can you try it and see if the x86
maintainers agree?

David


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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.