[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Xen-devel][IPF][RFC] Error (12, 'Cannot allocate memory') when creating domain
When I create domain, XEN may complain Error (12, 'Cannot allocate memory')
even though there are plenty of memory available.
I think kangkang had reported this bug.
After investigation, I found this is caused by copy_to_guest.
Dom0 calls increase_reservation hypercall to allocate memory for domain.
At the end of this function, it will copy all mfns to guest address space.
/* Inform the domain of the new page's machine address. */
if ( !guest_handle_is_null(extent_list) )
mfn = page_to_mfn(page);
if ( unlikely(__copy_to_guest_offset(extent_list, i, &mfn, 1)) )
But __copy_to_guest_offset may fail in ia64 side, due to XEN may not record
tlb. Yes, increase_reservation function implements 'retry mechanism', it hopes
dom0 will call it again from the failure point. But dom0 didn't use this
mechanism', dom0 thought this hypercall fail, and dom0 reported mistakenly
Error (12, 'Cannot allocate memory')
Xen-devel mailing list