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

Re: [fedora-virt] f10 x86_64 xen VM guests fail to boot on f8 host (guest setting NX bit in L1 PTE?)



On Tue, 2009-01-20 at 10:27 +0000, Mark McLoughlin wrote:
>        if ( unlikely(l1e_get_flags(nl1e) & L1_DISALLOW_MASK) )
>         {
>             MEM_LOG("Bad L1 flags %x",
>                     l1e_get_flags(nl1e) & L1_DISALLOW_MASK);
>             return 0;
>         }
> ...
> }
> 
> the PTE flags are 800000 which corresponds to:
> 
> #define _PAGE_NX_BIT (1U<<23)

At least in xen-unstable (and I think for much longer) L1_DISALLOW_MASK
contains _PAGE_NX_BIT dynamically depending on the processor
capabilities.

        #define _PAGE_NX     (cpu_has_nx ? _PAGE_NX_BIT : 0)
        ...
        /*
         * Disallow unused flag bits plus PAT/PSE, PCD, PWT and GLOBAL.
         * Permit the NX bit if the hardware supports it.
         */
        #define BASE_DISALLOW_MASK (0xFFFFF198U & ~_PAGE_NX)
        
        #define L1_DISALLOW_MASK (BASE_DISALLOW_MASK | _PAGE_GNTTAB)

Does the hardware support NX? What does /proc/cpuinfo in dom0 think?

The guest kernel should be setting up __supported_pte_mask appropriately
to match the hardware and hence shouldn't be using NX if it isn't
available. There's a command line option to force NX, can you try
noexec=off on the guest command line.

My guess would be that the guest is getting a wrong EFER from
somewhere...

Ian.


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