[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] Assigning contiguous memory to a driver domain
Hello, 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 228.61.2.24 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 (http://groups.google.com/group/linux.kernel/browse_thread/thread/2840cb59bec23594), 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 ) 717 { 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, &dom->p2m_host[i]); 723 } 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 memory ? Regards, Rafal Wojtczuk _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |