]>
Commit | Line | Data |
---|---|---|
1 | From 0a193b148d6d0ed05ea82f466b6d7eac50b87ac5 Mon Sep 17 00:00:00 2001 | |
2 | From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | |
3 | Date: Wed, 19 Sep 2012 08:30:55 -0400 | |
4 | Subject: xen/boot: Disable BIOS SMP MP table search. | |
5 | ||
6 | From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | |
7 | ||
8 | commit bd49940a35ec7d488ae63bd625639893b3385b97 upstream. | |
9 | ||
10 | As the initial domain we are able to search/map certain regions | |
11 | of memory to harvest configuration data. For all low-level we | |
12 | use ACPI tables - for interrupts we use exclusively ACPI _PRT | |
13 | (so DSDT) and MADT for INT_SRC_OVR. | |
14 | ||
15 | The SMP MP table is not used at all. As a matter of fact we do | |
16 | not even support machines that only have SMP MP but no ACPI tables. | |
17 | ||
18 | Lets follow how Moorestown does it and just disable searching | |
19 | for BIOS SMP tables. | |
20 | ||
21 | This also fixes an issue on HP Proliant BL680c G5 and DL380 G6: | |
22 | ||
23 | 9f->100 for 1:1 PTE | |
24 | Freeing 9f-100 pfn range: 97 pages freed | |
25 | 1-1 mapping on 9f->100 | |
26 | .. snip.. | |
27 | e820: BIOS-provided physical RAM map: | |
28 | Xen: [mem 0x0000000000000000-0x000000000009efff] usable | |
29 | Xen: [mem 0x000000000009f400-0x00000000000fffff] reserved | |
30 | Xen: [mem 0x0000000000100000-0x00000000cfd1dfff] usable | |
31 | .. snip.. | |
32 | Scan for SMP in [mem 0x00000000-0x000003ff] | |
33 | Scan for SMP in [mem 0x0009fc00-0x0009ffff] | |
34 | Scan for SMP in [mem 0x000f0000-0x000fffff] | |
35 | found SMP MP-table at [mem 0x000f4fa0-0x000f4faf] mapped at [ffff8800000f4fa0] | |
36 | (XEN) mm.c:908:d0 Error getting mfn 100 (pfn 5555555555555555) from L1 entry 0000000000100461 for l1e_owner=0, pg_owner=0 | |
37 | (XEN) mm.c:4995:d0 ptwr_emulate: could not get_page_from_l1e() | |
38 | BUG: unable to handle kernel NULL pointer dereference at (null) | |
39 | IP: [<ffffffff81ac07e2>] xen_set_pte_init+0x66/0x71 | |
40 | . snip.. | |
41 | Pid: 0, comm: swapper Not tainted 3.6.0-rc6upstream-00188-gb6fb969-dirty #2 HP ProLiant BL680c G5 | |
42 | .. snip.. | |
43 | Call Trace: | |
44 | [<ffffffff81ad31c6>] __early_ioremap+0x18a/0x248 | |
45 | [<ffffffff81624731>] ? printk+0x48/0x4a | |
46 | [<ffffffff81ad32ac>] early_ioremap+0x13/0x15 | |
47 | [<ffffffff81acc140>] get_mpc_size+0x2f/0x67 | |
48 | [<ffffffff81acc284>] smp_scan_config+0x10c/0x136 | |
49 | [<ffffffff81acc2e4>] default_find_smp_config+0x36/0x5a | |
50 | [<ffffffff81ac3085>] setup_arch+0x5b3/0xb5b | |
51 | [<ffffffff81624731>] ? printk+0x48/0x4a | |
52 | [<ffffffff81abca7f>] start_kernel+0x90/0x390 | |
53 | [<ffffffff81abc356>] x86_64_start_reservations+0x131/0x136 | |
54 | [<ffffffff81abfa83>] xen_start_kernel+0x65f/0x661 | |
55 | (XEN) Domain 0 crashed: 'noreboot' set - not rebooting. | |
56 | ||
57 | which is that ioremap would end up mapping 0xff using _PAGE_IOMAP | |
58 | (which is what early_ioremap sticks as a flag) - which meant | |
59 | we would get MFN 0xFF (pte ff461, which is OK), and then it would | |
60 | also map 0x100 (b/c ioremap tries to get page aligned request, and | |
61 | it was trying to map 0xf4fa0 + PAGE_SIZE - so it mapped the next page) | |
62 | as _PAGE_IOMAP. Since 0x100 is actually a RAM page, and the _PAGE_IOMAP | |
63 | bypasses the P2M lookup we would happily set the PTE to 1000461. | |
64 | Xen would deny the request since we do not have access to the | |
65 | Machine Frame Number (MFN) of 0x100. The P2M[0x100] is for example | |
66 | 0x80140. | |
67 | ||
68 | Fixes-Oracle-Bugzilla: https://bugzilla.oracle.com/bugzilla/show_bug.cgi?id=13665 | |
69 | Acked-by: Jan Beulich <jbeulich@suse.com> | |
70 | Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | |
71 | [bwh: Backported to 3.2: adjust context] | |
72 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | |
73 | Cc: Yijing Wang <wangyijing@huawei.com> | |
74 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
75 | ||
76 | --- | |
77 | arch/x86/xen/enlighten.c | 4 ++++ | |
78 | 1 file changed, 4 insertions(+) | |
79 | ||
80 | --- a/arch/x86/xen/enlighten.c | |
81 | +++ b/arch/x86/xen/enlighten.c | |
82 | @@ -1448,6 +1448,10 @@ asmlinkage void __init xen_start_kernel( | |
83 | ||
84 | /* Make sure ACS will be enabled */ | |
85 | pci_request_acs(); | |
86 | + | |
87 | + /* Avoid searching for BIOS MP tables */ | |
88 | + x86_init.mpparse.find_smp_config = x86_init_noop; | |
89 | + x86_init.mpparse.get_smp_config = x86_init_uint_noop; | |
90 | } | |
91 | #ifdef CONFIG_PCI | |
92 | /* PCI BIOS service won't work from a PV guest. */ |