Could someone guide me in the right direction with the topic of assigning
contiguous memory to a domain.
I have an issue with a PV domain that is assigned a PCI device. Sometimes, the
driver fails to load
Sep 13 10:36:43 localhost kernel: [ 103.651858] iwlagn 0000:00:01.0:
firmware: requesting iwlwifi-4965-2.ucode
Sep 13 10:36:43 localhost kernel: [ 103.669105] iwlagn 0000:00:01.0: loaded
firmware version 184.108.40.206
Sep 13 10:36:43 localhost kernel: [ 103.669263] iwlagn 0000:00:01.0: failed
to allocate pci memory
The reason seems to be that the domain does not have enough contiguous
memory, in mfn terms.
Increasing the memory for the domain does not seem to help, unless one
assigns a significant fraction of all system RAM.
I am aware of xen-swiotlb
however these patches do not apply to the kernel being used
(http://qubes-os.org/gitweb/?p=joanna/kernel-dom0.git;a=summary), so I am
looking for something else.
Is it correct that Xen 3.4.3 makes no effort to assign contiguous memory to
a domain ? The arch_setup_meminit function (is it the one responsible for
initial memory allocation ?) does
715 /* allocate guest memory */
716 for ( i = rc = allocsz = 0; (i < dom->total_pages) && !rc; i += allocsz
718 allocsz = dom->total_pages - i;
719 if ( allocsz > 1024*1024 )
720 allocsz = 1024*1024;
721 rc = xc_domain_memory_populate_physmap(
722 dom->guest_xc, dom->guest_domid, allocsz, 0, 0,
so, it calls xc_domain_memory_populate_physmap with the fourth parameter
(extent order) being 0, so potentially, there can be literally no contiguous
mfns in the domain ?
In practice, is it safe to assume that the following scenario:
1) boot dom0 with 4G of RAM
2) balolon dom0 down to 1.5G
3) create a PV driver domain (netvm) with, say, 200MB of RAM
will result in netvm having sufficiently contiguous memory ? It seems to
work for me.
Otherwise, does it make sense to add contiguous memory to a domain (via
calling xc_domain_memory_populate_physmap with larger extent_order) just
after domain creation (create the domain paused, and call it before
unpausing it) ? Is there anything else that needs to be done after
calling this function so that the guest is able to use this additional
Xen-devel mailing list