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

[Xen-devel] arm: Boot allocator fails with multi node memory



Hi,

    With ACPI numa support, I came across this panic from init_node_heap() when
initializing for node1 which is called from end_boot_allocator().

(XEN) Walking Hypervisor VA 0x847ffffffffe on CPU0 via TTBR 0x00000000ffcf8000
(XEN) 0TH[0x108] = 0x0000000000000000
(XEN) PAR: 0000000000000809: Translation fault stage 1 (level invalid)
(XEN)
(XEN) ****************************************
(XEN) Panic on CPU 0:
(XEN) Error during Hypervisor-to-physical address translation
(XEN) ****************************************

After looking at closely, I see this translation fault is coming from
below code.
When there is call (virt_to_mfn(eva - 1) where eva is  DIRECTMAP_VIRT_END.
This virt_to_mfn(eva-1) is not called for first node initialization.
In case of multinode it fails when init_node_heap() is called for
second node.

I observed that virt_to_mfn(eva-1) always fails if we call from any part of the
code, meaning dump_hyp_walk(eva) always prints as below, which indicates
this VA is not mapped.

Question: Why this address is not mapped?. If mapped where this va is mapped?.

(XEN) Walking Hypervisor VA 0x847fffffffff on CPU0 via TTBR 0x00000000ffcf8000
(XEN) 0TH[0x108] = 0x0000000000000000


static unsigned long init_node_heap(int node, unsigned long mfn,
                                    unsigned long nr, bool_t *use_tail, int d)
{
#ifdef DIRECTMAP_VIRT_END
    unsigned long eva = min(DIRECTMAP_VIRT_END, HYPERVISOR_VIRT_END);
#endif


....

    else if ( nr >= needed &&
              (mfn + needed) <= (virt_to_mfn(eva - 1) + 1) &&  // <===
FAILS here
              (!xenheap_bits ||
               !((mfn + needed - 1) >> (xenheap_bits - PAGE_SHIFT))) )
    {
        _heap[node] = mfn_to_virt(mfn);
        avail[node] = mfn_to_virt(mfn + needed - 1) +
                      PAGE_SIZE - sizeof(**avail) * NR_ZONES;
        *use_tail = 0;
    }

...
}

Regards
Vijay

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

 


Rackspace

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