Port-xen archive

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

Re: NetBSD domU ksyms issue under xen and 4.2.3, not under 4.1.2

we have a similar problem (NetBSD 5.0 VM ).
we found out that the problem comes from the libxen.
in ../<xen>/tools/libxc/xc_dom0.h

Function (start abut line 291):
static inline void *xc_dom_vaddr_to_ptr(struct xc_dom_image *dom,
                                        xen_vaddr_t vaddr,
                                        size_t *safe_region_out)
    unsigned int page_size = XC_DOM_PAGE_SIZE(dom);
    xen_pfn_t page = (vaddr - dom->parms.virt_base) / page_size;
    unsigned int offset = (vaddr - dom->parms.virt_base) % page_size;
    xen_pfn_t safe_region_count;
    void *ptr;

    *safe_region_out = 0;
    ptr = xc_dom_pfn_to_ptr_retcount(dom, page, 0, &safe_region_count);
    if ( ptr == NULL )
        return ptr;
    *safe_region_out = (safe_region_count << XC_DOM_PAGE_SHIFT(dom)) -
/* RETURN VALUE XEN 4.1.2, libxen > 2.9 */
/*    return ptr; */
/* RETURN VALUE in 2.9 : */
    return (ptr + offset);

If you change ther return value back to ptr+offset all should work fine.
In our case it does.
I am not sure if this is a xen bug or a feature.
Can you test this for your case?


View this message in context: 
Sent from the port-xen mailing list archive at Nabble.com.

Home | Main Index | Thread Index | Old Index