[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Dom0 PAE panic when starting xend
On Tuesday 03 March 2009 22:45:33 Jean-Yves Migeon wrote:
> Manuel Bouyer wrote:
> > I guess it's a side effect of the malloc implementation; but I don't
> > think we can rely on it either. Better use uvm_km_alloc() for this; which
> > take an explicit alignement parameter.
> Well, the man page of malloc(9) does state that the return value is
> suitably aligned. I thought the same about kmem_alloc(), but looks like
> my supposition is wrong.
> >> Who is at fault here? Should NetBSD add some checks against invalid
> >> mappings (when hypercall returns EINVAL for a foreign domain), or should
> >> xentools check the validity (against a poison for example) and abort the
> >> operation if it triggers?
> > If the hypercall returns a proper error code, it should be used and
> > handled appropriately, I'd say.
> In fact, we end up like this:
> - first, we try the mapping inside the IOCTL_PRIVCMD_MMAP(BATCH); when
> it fails (pmap_enter_ma returns an error), we flag the address as
> invalid inside the privcmd_object/uobj.
> - second, when privpgop_fault is called. However, we never fall back to
> pmap_enter_ma (which will return the same error as before): we check
> against INVALID_PAGE, and if positive, issue a continue. Since error is
> set to 0 by default, we end up in a loop with privpgop_fault.
> IMHO, in case of an INVALID_PAGE, we should return EFAULT, just to
> indicate that the thing is indeed wrong, like in . The caller is free
> to find through the ioctl which element in the array is faulty.
>  http://www.netbsd.org/~jym/privcmd.diff
I just tested your fix and xenstored still fails as before:
(XEN) mm.c:712:d0 Error getting mfn 55555 (pfn 55555555) from L1 entry
0000000055555067 for dom0
xpq_flush_queue: 1 entries
panic: HYPERVISOR_mmu_update failed
fatal breakpoint trap in supervisor mode
trap type 1 code 0 eip c02125f4 cs 9 eflags 246 cr2 bb6c1800 ilevel 6
Stopped in pid 369.1 (xenstored) at netbsd:breakpoint+0x4: popl %ebp
b6bce0) at netbsd:xpq_update_foreign
trap() at netbsd:trap+0x6e0
--- trap (number 6) ---
db> x l3_p2m_page
db> x l2_p2m_page
db> x l2_p2m_page_size
hmm... does the Dom0 use p2m at all ?
Main Index |
Thread Index |