21317-xend-blkif-util-tap2.patch suse-disable-tap2-default.patch - Match upstreams cpu pools switch from domctl to sysctl - Upstream replacements for two of our custom patches (to ease applying further backports) - Fixed dump-exec-state.patch (could previously hang the system, as could - with lower probability - the un-patched implementation) - bnc#593536 - xen hypervisor takes very long to initialize Dom0 on 128 CPUs and 256Gb 21272-x86-dom0-alloc-performance.patch 21266-vmx-disabled-check.patch 21271-x86-cache-flush-global.patch - bnc#558815 - using multiple npiv luns with same wwpn/wwnn broken - bnc#601104 - Xen /etc/xen/scripts/block-npiv script fails when accessing multiple disks using NPIV block-npiv - bnc#595124 - VT-d can not be enabled on 32PAE Xen on Nehalem-EX platform 21234-x86-bad-srat-clear-pxm2node.patch bnc#585371 - kdump fails to load with xen: locate_hole failed 21235-crashkernel-advanced.patch - bnc#588918 - Attaching a U-disk to domain's failed by "xm usb-attach" init.xend OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=44
78 lines
2.6 KiB
Diff
78 lines
2.6 KiB
Diff
References: bnc#600794
|
|
|
|
# HG changeset patch
|
|
# User Keir Fraser <keir.fraser@citrix.com>
|
|
# Date 1271954636 -3600
|
|
# Node ID 2b97855a629f1d79e1d075a6d2a8b569018b2094
|
|
# Parent a7947fd90328287dd097294b241753063c858597
|
|
console: Make initial static console buffer __initdata.
|
|
|
|
The previous scheme --- freeing an area of BSS --- did not interact
|
|
nicely with device passthrough as IOMMU will not have any Xen BSS area
|
|
in guest device pagetables. Hence if the freed BSS space gets
|
|
allocated to a guest, DMAs to guest's own memory can fail.
|
|
|
|
The simple solution here is to always free the static buffer at end of
|
|
boot (initmem is specially handled for IOMMUs) and require a
|
|
dynamically-allocated buffer always to be created.
|
|
|
|
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
|
|
|
|
--- a/xen/drivers/char/console.c
|
|
+++ b/xen/drivers/char/console.c
|
|
@@ -65,11 +65,7 @@ size_param("conring_size", opt_conring_s
|
|
|
|
#define _CONRING_SIZE 16384
|
|
#define CONRING_IDX_MASK(i) ((i)&(conring_size-1))
|
|
-static char
|
|
-#if _CONRING_SIZE >= PAGE_SIZE
|
|
- __attribute__((__section__(".bss.page_aligned"), __aligned__(PAGE_SIZE)))
|
|
-#endif
|
|
- _conring[_CONRING_SIZE];
|
|
+static char __initdata _conring[_CONRING_SIZE];
|
|
static char *__read_mostly conring = _conring;
|
|
static uint32_t __read_mostly conring_size = _CONRING_SIZE;
|
|
static uint32_t conringc, conringp;
|
|
@@ -596,25 +592,20 @@ void __init console_init_preirq(void)
|
|
void __init console_init_postirq(void)
|
|
{
|
|
char *ring;
|
|
- unsigned int i;
|
|
+ unsigned int i, order;
|
|
|
|
serial_init_postirq();
|
|
|
|
if ( !opt_conring_size )
|
|
opt_conring_size = num_present_cpus() << (9 + xenlog_lower_thresh);
|
|
- /* Round size down to a power of two. */
|
|
- while ( opt_conring_size & (opt_conring_size - 1) )
|
|
- opt_conring_size &= opt_conring_size - 1;
|
|
- if ( opt_conring_size < conring_size )
|
|
- return;
|
|
-
|
|
- ring = alloc_xenheap_pages(get_order_from_bytes(opt_conring_size), 0);
|
|
- if ( ring == NULL )
|
|
+
|
|
+ order = get_order_from_bytes(max(opt_conring_size, conring_size));
|
|
+ while ( (ring = alloc_xenheap_pages(order, 0)) == NULL )
|
|
{
|
|
- printk("Unable to allocate console ring of %u bytes.\n",
|
|
- opt_conring_size);
|
|
- return;
|
|
+ BUG_ON(order == 0);
|
|
+ order--;
|
|
}
|
|
+ opt_conring_size = PAGE_SIZE << order;
|
|
|
|
spin_lock_irq(&console_lock);
|
|
for ( i = conringc ; i != conringp; i++ )
|
|
@@ -625,8 +616,6 @@ void __init console_init_postirq(void)
|
|
spin_unlock_irq(&console_lock);
|
|
|
|
printk("Allocated console ring of %u KiB.\n", opt_conring_size >> 10);
|
|
-
|
|
- init_xenheap_pages(__pa(_conring), __pa(_conring + _CONRING_SIZE));
|
|
}
|
|
|
|
void __init console_endboot(void)
|