9a05aa7fc4
22707-x2apic-preenabled-check.patch - bnc#641419 - L3: Xen: qemu-dm reports "xc_map_foreign_batch: mmap failed: Cannot allocate memory" 7434-qemu-rlimit-as.patch - Additional or upstream patches from Jan 22693-fam10-mmio-conf-base-protect.patch 22694-x86_64-no-weak.patch 22708-xenctx-misc.patch 21432-4.0-cpu-boot-failure.patch 22645-amd-flush-filter.patch qemu-fix-7433.patch - Maintain compatibility with the extid flag even though it is deprecated for both legacy and sxp config files. hv_extid_compatibility.patch - bnc#649209-improve suspend eventchn lock suspend_evtchn_lock.patch - Removed the hyper-v shim patches in favor of using the upstream version. - bnc#641419 - L3: Xen: qemu-dm reports "xc_map_foreign_batch: mmap failed: Cannot allocate memory" qemu-rlimit-as.patch - Upstream c/s 7433 to replace qemu_altgr_more.patch 7433-qemu-altgr.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=90
41 lines
1.4 KiB
Diff
41 lines
1.4 KiB
Diff
# HG changeset patch
|
|
# User Keir Fraser <keir@xen.org>
|
|
# Date 1292320450 0
|
|
# Node ID 618ba64260faf45e6ec391582099d7388f013e81
|
|
# Parent 72326371ae8106b91da0ca6b0436dd2b6478b7a7
|
|
x86/iommu: account for necessary allocations when calculating Dom0's initial allocation size
|
|
References: bnc#658163
|
|
|
|
As of c/s 21812:e382656e4dcc, IOMMU related allocations for Dom0
|
|
happen only after it got all of its memory allocated, and hence the
|
|
reserve (mainly for setting up its swiotlb) may get exhausted without
|
|
accounting for the necessary allocations up front.
|
|
|
|
While not precise, the estimate has been found to be within a couple
|
|
of pages for the systems it got tested on.
|
|
|
|
For the calculation to be reasonably correct, this depends on the
|
|
patch titled "x86/iommu: don't map RAM holes above 4G" sent out
|
|
yesterday.
|
|
|
|
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
|
|
|
--- a/xen/arch/x86/domain_build.c
|
|
+++ b/xen/arch/x86/domain_build.c
|
|
@@ -188,6 +188,15 @@ static unsigned long __init compute_dom0
|
|
if ( is_pv_32on64_domain(d) )
|
|
avail -= opt_dom0_max_vcpus - 1;
|
|
|
|
+ /* Reserve memory for iommu_dom0_init() (rough estimate). */
|
|
+ if ( iommu_enabled )
|
|
+ {
|
|
+ unsigned int s;
|
|
+
|
|
+ for ( s = 9; s < BITS_PER_LONG; s += 9 )
|
|
+ avail -= max_pdx >> s;
|
|
+ }
|
|
+
|
|
/*
|
|
* If domain 0 allocation isn't specified, reserve 1/16th of available
|
|
* memory for things like DMA buffers. This reservation is clamped to
|