Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'stable/for-linus-fixes-3.2' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen

* 'stable/for-linus-fixes-3.2' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
xen/swiotlb: Use page alignment for early buffer allocation.
xen: only limit memory map to maximum reservation for domain 0.

+17 -5
+15 -3
arch/x86/xen/setup.c
··· 173 173 domid_t domid = DOMID_SELF; 174 174 int ret; 175 175 176 - ret = HYPERVISOR_memory_op(XENMEM_maximum_reservation, &domid); 177 - if (ret > 0) 178 - max_pages = ret; 176 + /* 177 + * For the initial domain we use the maximum reservation as 178 + * the maximum page. 179 + * 180 + * For guest domains the current maximum reservation reflects 181 + * the current maximum rather than the static maximum. In this 182 + * case the e820 map provided to us will cover the static 183 + * maximum region. 184 + */ 185 + if (xen_initial_domain()) { 186 + ret = HYPERVISOR_memory_op(XENMEM_maximum_reservation, &domid); 187 + if (ret > 0) 188 + max_pages = ret; 189 + } 190 + 179 191 return min(max_pages, MAX_DOMAIN_PAGES); 180 192 } 181 193
+2 -2
drivers/xen/swiotlb-xen.c
··· 166 166 /* 167 167 * Get IO TLB memory from any location. 168 168 */ 169 - xen_io_tlb_start = alloc_bootmem(bytes); 169 + xen_io_tlb_start = alloc_bootmem_pages(PAGE_ALIGN(bytes)); 170 170 if (!xen_io_tlb_start) { 171 171 m = "Cannot allocate Xen-SWIOTLB buffer!\n"; 172 172 goto error; ··· 179 179 bytes, 180 180 xen_io_tlb_nslabs); 181 181 if (rc) { 182 - free_bootmem(__pa(xen_io_tlb_start), bytes); 182 + free_bootmem(__pa(xen_io_tlb_start), PAGE_ALIGN(bytes)); 183 183 m = "Failed to get contiguous memory for DMA from Xen!\n"\ 184 184 "You either: don't have the permissions, do not have"\ 185 185 " enough free memory under 4GB, or the hypervisor memory"\