e46082b3ea
530b27fd-x86-MCE-Fix-race-condition-in-mctelem_reserve.patch 530b2880-Nested-VMX-update-nested-paging-mode-on-vmexit.patch 530b28c5-x86-MSI-don-t-risk-division-by-zero.patch 530c54c3-x86-mce-Reduce-boot-time-logspam.patch 5310bac3-mm-ensure-useful-progress-in-decrease_reservation.patch 5315a254-IOMMU-generalize-and-correct-softirq-processing.patch 5315a3bb-x86-don-t-propagate-acpi_skip_timer_override-do-Dom0.patch 5315a43a-x86-ACPI-also-print-address-space-for-PM1x-fields.patch 531d8db1-x86-hvm-refine-the-judgment-on-IDENT_PT-for-EMT.patch 531d8e09-x86-HVM-fix-memory-type-merging-in-epte_get_entry_emt.patch 531d8e34-x86-HVM-consolidate-passthrough-handling-in-epte_get_entry_emt.patch 531d8fd0-kexec-identify-which-cpu-the-kexec-image-is-being-executed-on.patch 531dc0e2-xmalloc-handle-correctly-page-allocation-when-align-size.patch - Add conversion tool for migrating xend/xm managed VMs to libvirt xen2libvirt.py (Jim Fehlig) OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=304
30 lines
1.0 KiB
Diff
30 lines
1.0 KiB
Diff
# Commit ac2cba2901779f66bbfab298faa15c956e91393a
|
|
# Date 2014-03-10 14:40:50 +0100
|
|
# Author Julien Grall <julien.grall@linaro.org>
|
|
# Committer Jan Beulich <jbeulich@suse.com>
|
|
xmalloc: handle correctly page allocation when align > size
|
|
|
|
When align is superior to size, we need to retrieve the order from
|
|
align during multiple page allocation. I guess it was the goal of the commit
|
|
fb034f42 "xmalloc: make close-to-PAGE_SIZE allocations more efficient".
|
|
|
|
Signed-off-by: Julien Grall <julien.grall@linaro.org>
|
|
Acked-by: Keir Fraser <keir@xen.org>
|
|
|
|
--- a/xen/common/xmalloc_tlsf.c
|
|
+++ b/xen/common/xmalloc_tlsf.c
|
|
@@ -527,11 +527,10 @@ static void xmalloc_pool_put(void *p)
|
|
|
|
static void *xmalloc_whole_pages(unsigned long size, unsigned long align)
|
|
{
|
|
- unsigned int i, order = get_order_from_bytes(size);
|
|
+ unsigned int i, order;
|
|
void *res, *p;
|
|
|
|
- if ( align > size )
|
|
- get_order_from_bytes(align);
|
|
+ order = get_order_from_bytes(max(align, size));
|
|
|
|
res = alloc_xenheap_pages(order, 0);
|
|
if ( res == NULL )
|