lkml.org 
[lkml]   [2014]   [Sep]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Xen-devel] [V2 PATCH 1/1] PVH: set EFER.NX and EFER.SCE
On Wed, 3 Sep 2014 14:58:04 +0100
David Vrabel <david.vrabel@citrix.com> wrote:

> On 03/09/14 02:19, Mukesh Rathor wrote:
> > This patch addresses two things for a pvh boot vcpu:
> >
> > - NX bug on intel: It was recenlty discovered that NX is not being
> > honored in PVH on intel since EFER.NX is not being set.
> >
> > - PVH boot hang on newer xen: Following c/s on xen
> >
> > c/s 7645640: x86/PVH: don't set EFER_SCE for pvh guest
> >
> > removes setting of EFER.SCE for PVH guests. As such, existing
> > intel pvh guest will no longer boot on xen after that c/s.
> >
> > Both above changes will be applicable to AMD also when xen support
> > of AMD pvh is added.
> >
> > Also, we create a new glue assembly entry point for secondary vcpus
> > because they come up on kernel page tables that have pte.NX
> > bits set. As such, before anything is touched in DS/SS, EFER.NX
> > must be set.
> [...]
> > --- a/arch/x86/xen/xen-head.S
> > +++ b/arch/x86/xen/xen-head.S
> > @@ -47,6 +47,35 @@ ENTRY(startup_xen)
> >
> > __FINIT
> >
> > +#ifdef CONFIG_XEN_PVH
> > +#ifdef CONFIG_X86_64
> > +.macro PVH_EARLY_SET_EFER
>
> I don't think a macro is the right way to do this. We can instead
> pass a parameter to say whether it is a boot or secondary CPU.
>
> Something like this (untested) patch?

That's fine too. But, since vcpu 0 is always primary vcpu, we can
just use that and not worry about passing another parameter.

-Mukesh



\
 
 \ /
  Last update: 2014-09-03 23:21    [W:0.050 / U:0.700 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site