Bug#621072: linux-image-2.6.32-5-amd64: 2.6.32-33 failes to boot as PV domU on Xen
On Tue, 2011-04-12 at 16:59 +0200, Florian Wagner wrote: On Wed, Apr 06, 2011 at 11:48:07AM +0200, Florian Wagner wrote: But this kernel doesn't boot as a PV domU neither on my Citrix XenServer 5.6 FP1 nor on a Debian system with Xen 3.4.3 at all. It doesn't even get so far as to provide a hvc console but crashes with a page fault on domain creation: It needs a backport of 67e87f0a1c5cbc750f81ebf6a128e8ff6f4376cc to not zero parts of the memory. I've checked out svn://svn.debian.org/kernel/dists/squeeze/linux-2.6 at revision 17202 and applied the commit you mentioned. (Had to redo the patch since the context didn't fit anymore) and the VM boots! (It still doesn' live mirate reliably, but that's for another bug report.) I've attached the output of svn diff. Thanks, unless I hear any objection I'll add this to svn shortly. Cheers, Ian. -- Ian Campbell Current Noise: Ludicra - A Larger Silence Out of register space (ugh) -- vi -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#621072: linux-image-2.6.32-5-amd64: 2.6.32-33 failes to boot as PV domU on Xen
On Wed, Apr 13, 2011 at 01:37:50PM +0100, Ian Campbell wrote: Thanks, unless I hear any objection I'll add this to svn shortly. Already on it. Bastian -- Immortality consists largely of boredom. -- Zefrem Cochrane, Metamorphosis, stardate 3219.8 -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#621072: linux-image-2.6.32-5-amd64: 2.6.32-33 failes to boot as PV domU on Xen
On Wed, Apr 06, 2011 at 11:48:07AM +0200, Florian Wagner wrote: But this kernel doesn't boot as a PV domU neither on my Citrix XenServer 5.6 FP1 nor on a Debian system with Xen 3.4.3 at all. It doesn't even get so far as to provide a hvc console but crashes with a page fault on domain creation: It needs a backport of 67e87f0a1c5cbc750f81ebf6a128e8ff6f4376cc to not zero parts of the memory. Bastian -- Change is the essential process of all existence. -- Spock, Let That Be Your Last Battlefield, stardate 5730.2 -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#621072: linux-image-2.6.32-5-amd64: 2.6.32-33 failes to boot as PV domU on Xen
Hi, I can also reproduce the issue with 2.6.32-33: overlord3:~$ sudo xm dmesg (XEN) Xen version 4.0.1 (Debian 4.0.1-2) (wa...@debian.org) (gcc version 4.4.5 (Debian 4.4.5-10) ) Wed Jan 12 14:04:06 UTC 2011 (XEN) Bootloader: GRUB 1.98+20100804-14 (XEN) Command line: placeholder (XEN) Video information: (XEN) VGA is text mode 80x25, font 8x16 (XEN) Disc information: (XEN) Found 4 MBR signatures (XEN) Found 4 EDD information structures (XEN) Xen-e820 RAM map: (XEN) - 0009ac00 (usable) (XEN) 0009ac00 - 000a (reserved) (XEN) 000e4000 - 0010 (reserved) (XEN) 0010 - dfe9 (usable) (XEN) dfe9 - dfea8000 (ACPI data) (XEN) dfea8000 - dfed (ACPI NVS) (XEN) dfed - dff0 (reserved) (XEN) ffe0 - 0001 (reserved) (XEN) 0001 - 00042000 (usable) (XEN) ACPI: RSDP 000FBED0, 0024 (r2 ACPIAM) (XEN) ACPI: XSDT DFE90100, 005C (r1 082410 XSDT1804 20100824 MSFT 97) (XEN) ACPI: FACP DFE90290, 00F4 (r3 082410 FACP1804 20100824 MSFT 97) (XEN) ACPI: DSDT DFE90460, F42B (r1 A1595 A15950000 INTL 20060113) (XEN) ACPI: FACS DFEA8000, 0040 (XEN) ACPI: APIC DFE90390, 0088 (r1 082410 APIC1804 20100824 MSFT 97) (XEN) ACPI: MCFG DFE90420, 003C (r1 082410 OEMMCFG 20100824 MSFT 97) (XEN) ACPI: OEMB DFEA8040, 0072 (r1 082410 OEMB1804 20100824 MSFT 97) (XEN) ACPI: SRAT DFE9F8B0, 0108 (r1 AMDFAM_F_102 AMD 1) (XEN) ACPI: HPET DFE9F9C0, 0038 (r1 082410 OEMHPET 20100824 MSFT 97) (XEN) ACPI: SSDT DFE9FA00, 0156 (r1 A M I POWERNOW1 AMD 1) (XEN) System RAM: 16382MB (16775336kB) (XEN) Domain heap initialised (XEN) Processor #0 0:10 APIC version 16 (XEN) Processor #1 0:10 APIC version 16 (XEN) Processor #2 0:10 APIC version 16 (XEN) Processor #3 0:10 APIC version 16 (XEN) Processor #4 0:10 APIC version 16 (XEN) Processor #5 0:10 APIC version 16 (XEN) IOAPIC[0]: apic_id 6, version 33, address 0xfec0, GSI 0-23 (XEN) IOAPIC[1]: apic_id 7, version 33, address 0xfec2, GSI 24-55 (XEN) Enabling APIC mode: Flat. Using 2 I/O APICs (XEN) Using scheduler: SMP Credit Scheduler (credit) (XEN) Detected 3210.862 MHz processor. (XEN) Initing memory sharing. (XEN) HVM: ASIDs enabled. (XEN) HVM: SVM enabled (XEN) HVM: Hardware Assisted Paging detected. (XEN) AMD-Vi: IOMMU not found! (XEN) I/O virtualisation disabled (XEN) Total of 6 processors activated. (XEN) ENABLING IO-APIC IRQs (XEN) - Using new ACK method (XEN) TSC is reliable, synchronization unnecessary (XEN) Platform timer appears to have unexpectedly wrapped 10 or more times. (XEN) Platform timer is 14.318MHz HPET (XEN) Allocated console ring of 16 KiB. (XEN) Brought up 6 CPUs (XEN) *** LOADING DOMAIN 0 *** (XEN) Xen kernel: 64-bit, lsb, compat32 (XEN) Dom0 kernel: 64-bit, PAE, lsb, paddr 0x100 - 0x16b8000 (XEN) PHYSICAL MEMORY ARRANGEMENT: (XEN) Dom0 alloc.: 00040800-00041000 (4081161 pages to be allocated) (XEN) VIRTUAL MEMORY ARRANGEMENT: (XEN) Loaded kernel: 8100-816b8000 (XEN) Init. ramdisk: 816b8000-83104a00 (XEN) Phys-Mach map: 83105000-85068048 (XEN) Start info:85069000-850694b4 (XEN) Page tables: 8506a000-85097000 (XEN) Boot stack:85097000-85098000 (XEN) TOTAL: 8000-8540 (XEN) ENTRY ADDRESS: 81508200 (XEN) Dom0 has maximum 6 VCPUs (XEN) Scrubbing Free RAM: .done. (XEN) Xen trace buffers: disabled (XEN) Std. Loglevel: Errors and warnings (XEN) Guest Loglevel: Nothing (Rate-limited: Errors and warnings) (XEN) Xen is relinquishing VGA console. (XEN) *** Serial input - DOM0 (type 'CTRL-a' three times to switch input to Xen) (XEN) Freed 176kB init memory. (XEN) traps.c:2308:d0 Domain attempted WRMSR c0010004 from 6412:d4175407 to :. (XEN) traps.c:2308:d0 Domain attempted WRMSR c001 from 0107:6e90187f to :00430076. (XEN) save.c:72:d0 Domain 2 expects freq 3210MHz but host's freq is 3210MHz: trap and emulate rdtsc (XEN) d64:v0: unhandled page fault (ec=) (XEN) Pagetable walk from 8305a000: (XEN) L4[0x1ff] = 00038e68a067 1003 (XEN) L3[0x1fe] = 00038ef4e067 1007 (XEN) L2[0x018] = (XEN) domain_crash_sync called from entry.S (XEN) Domain 64 (vcpu#0) crashed on cpu#4: (XEN) [ Xen-4.0.1 x86_64 debug=n Not tainted ] (XEN) CPU:4 (XEN) RIP:e033:[8100c2af] (XEN) RFLAGS: 0216 EM: 1 CONTEXT: pv guest (XEN) rax: 8305a000 rbx: 8063 rcx: 8163 (XEN) rdx: 2000 rsi: rdi: (XEN) rbp: rsp: 8142db90 r8: 01ff (XEN) r9: 0003 r10:
Bug#621072: linux-image-2.6.32-5-amd64: 2.6.32-33 failes to boot as PV domU on Xen
On Tue, 2011-04-12 at 09:19 +0200, Bastian Blank wrote: On Wed, Apr 06, 2011 at 11:48:07AM +0200, Florian Wagner wrote: But this kernel doesn't boot as a PV domU neither on my Citrix XenServer 5.6 FP1 nor on a Debian system with Xen 3.4.3 at all. It doesn't even get so far as to provide a hvc console but crashes with a page fault on domain creation: It needs a backport of 67e87f0a1c5cbc750f81ebf6a128e8ff6f4376cc to not zero parts of the memory. I spoke to Stefano (who has been tracking these issues upstream) and he agrees and says that his patch 14988a4d350ce3b41ecad4f63c4f44c56f5ae34d has no effect without it. However, 2.6.32.37 will contain a revert of x86: Cleanup highmap after brk is concluded which also fixes this issue so probably we should just wait for 2.6.32.37 or take that revert early. It's in the longterm queue git repo already (attached), bugfix/x86/Save-cr4-to-mmu_cr4_features-at-boot-time.patch should go at the same time. Ian. -- Ian Campbell Current Noise: Rotting Christ - Eon Aenaos You're at the end of the road again. From 5988b32500933add4877201667ce7b1725254072 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman gre...@suse.de Date: Mon, 11 Apr 2011 16:04:59 -0700 Subject: [PATCH] Revert x86: Cleanup highmap after brk is concluded This reverts upstream commit e5f15b45ddf3afa210c7ea34fb32b6de0a0e It caused problems in the stable tree and should not have been there. Cc: Yinghai Lu ying...@kernel.org Cc: Stefano Stabellini stefano.stabell...@eu.citrix.com Cc: H. Peter Anvin h...@zytor.com Cc: Ingo Molnar mi...@elte.hu Signed-off-by: Greg Kroah-Hartman gre...@suse.de --- arch/x86/kernel/head64.c |3 +++ arch/x86/kernel/setup.c |5 - arch/x86/mm/init.c | 19 +++ arch/x86/mm/init_64.c| 11 +-- 4 files changed, 27 insertions(+), 11 deletions(-) --- a/arch/x86/kernel/head64.c +++ b/arch/x86/kernel/head64.c @@ -76,6 +76,9 @@ void __init x86_64_start_kernel(char * r /* Make NULL pointers segfault */ zap_identity_mappings(); + /* Cleanup the over mapped high alias */ + cleanup_highmap(); + for (i = 0; i NUM_EXCEPTION_VECTORS; i++) { #ifdef CONFIG_EARLY_PRINTK set_intr_gate(i, early_idt_handlers[i]); --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c @@ -294,9 +294,6 @@ static void __init init_gbpages(void) static inline void init_gbpages(void) { } -static void __init cleanup_highmap(void) -{ -} #endif static void __init reserve_brk(void) @@ -924,8 +921,6 @@ void __init setup_arch(char **cmdline_p) reserve_brk(); - cleanup_highmap(); - init_gbpages(); /* max_pfn_mapped is updated here */ --- a/arch/x86/mm/init.c +++ b/arch/x86/mm/init.c @@ -287,6 +287,25 @@ unsigned long __init_refok init_memory_m load_cr3(swapper_pg_dir); #endif +#ifdef CONFIG_X86_64 + if (!after_bootmem !start) { + pud_t *pud; + pmd_t *pmd; + + mmu_cr4_features = read_cr4(); + + /* + * _brk_end cannot change anymore, but it and _end may be + * located on different 2M pages. cleanup_highmap(), however, + * can only consider _end when it runs, so destroy any + * mappings beyond _brk_end here. + */ + pud = pud_offset(pgd_offset_k(_brk_end), _brk_end); + pmd = pmd_offset(pud, _brk_end - 1); + while (++pmd = pmd_offset(pud, (unsigned long)_end - 1)) + pmd_clear(pmd); + } +#endif __flush_tlb_all(); if (!after_bootmem e820_table_end e820_table_start) --- a/arch/x86/mm/init_64.c +++ b/arch/x86/mm/init_64.c @@ -49,7 +49,6 @@ #include asm/numa.h #include asm/cacheflush.h #include asm/init.h -#include asm/setup.h #include linux/bootmem.h static unsigned long dma_reserve __initdata; @@ -258,18 +257,18 @@ void __init init_extra_mapping_uc(unsign * to the compile time generated pmds. This results in invalid pmds up * to the point where we hit the physaddr 0 mapping. * - * We limit the mappings to the region from _text to _brk_end. _brk_end - * is rounded up to the 2MB boundary. This catches the invalid pmds as + * We limit the mappings to the region from _text to _end. _end is + * rounded up to the 2MB boundary. This catches the invalid pmds as * well, as they are located before _text: */ void __init cleanup_highmap(void) { unsigned long vaddr = __START_KERNEL_map; - unsigned long vaddr_end = __START_KERNEL_map + (max_pfn_mapped PAGE_SHIFT); - unsigned long end = roundup((unsigned long)_brk_end, PMD_SIZE) - 1; + unsigned long end = roundup((unsigned long)_end, PMD_SIZE) - 1; pmd_t *pmd = level2_kernel_pgt; + pmd_t *last_pmd = pmd + PTRS_PER_PMD; - for (; vaddr + PMD_SIZE - 1 vaddr_end; pmd++, vaddr += PMD_SIZE) { + for (; pmd last_pmd; pmd++, vaddr += PMD_SIZE) { if (pmd_none(*pmd)) continue; if (vaddr (unsigned long) _text || vaddr end)
Bug#621072: linux-image-2.6.32-5-amd64: 2.6.32-33 failes to boot as PV domU on Xen
On Wed, Apr 06, 2011 at 11:48:07AM +0200, Florian Wagner wrote: But this kernel doesn't boot as a PV domU neither on my Citrix XenServer 5.6 FP1 nor on a Debian system with Xen 3.4.3 at all. It doesn't even get so far as to provide a hvc console but crashes with a page fault on domain creation: It needs a backport of 67e87f0a1c5cbc750f81ebf6a128e8ff6f4376cc to not zero parts of the memory. I've checked out svn://svn.debian.org/kernel/dists/squeeze/linux-2.6 at revision 17202 and applied the commit you mentioned. (Had to redo the patch since the context didn't fit anymore) and the VM boots! (It still doesn' live mirate reliably, but that's for another bug report.) I've attached the output of svn diff. Thanks and regards Florian Wagner Index: debian/patches/bugfix/x86/only-set-max_pfn_mapped-to-512-MiB-if-we-enter-via-head_64.S.patch === --- debian/patches/bugfix/x86/only-set-max_pfn_mapped-to-512-MiB-if-we-enter-via-head_64.S.patch (revision 0) +++ debian/patches/bugfix/x86/only-set-max_pfn_mapped-to-512-MiB-if-we-enter-via-head_64.S.patch (revision 0) @@ -0,0 +1,23 @@ +diff -Naur source/arch/x86/kernel/head64.c source.patched/arch/x86/kernel/head64.c +--- source/arch/x86/kernel/head64.c 2011-04-12 10:01:03.103299697 + source.patched/arch/x86/kernel/head64.c 2011-04-12 10:00:32.848195748 + +@@ -76,6 +76,8 @@ + /* Make NULL pointers segfault */ + zap_identity_mappings(); + ++ max_pfn_mapped = KERNEL_IMAGE_SIZE PAGE_SHIFT; ++ + for (i = 0; i NUM_EXCEPTION_VECTORS; i++) { + #ifdef CONFIG_EARLY_PRINTK + set_intr_gate(i, early_idt_handlers[i]); +diff -Naur source/arch/x86/kernel/setup.c source.patched/arch/x86/kernel/setup.c +--- source/arch/x86/kernel/setup.c 2011-04-12 10:01:03.103299697 + source.patched/arch/x86/kernel/setup.c 2011-04-12 10:00:32.848195748 + +@@ -913,7 +913,6 @@ + max_low_pfn = max_pfn; + + high_memory = (void *)__va(max_pfn * PAGE_SIZE - 1) + 1; +- max_pfn_mapped = KERNEL_IMAGE_SIZE PAGE_SHIFT; + mmu_cr4_features = read_cr4(); + #endif + Index: debian/patches/series/34 === --- debian/patches/series/34 (revision 17218) +++ debian/patches/series/34 (working copy) @@ -1,2 +1,3 @@ + bugfix/all/ALSA-usb-audio-reduce-MIDI-packet-size-to-work-aroun.patch + bugfix/all/ALSA-usb-audio-define-another-USB-ID-for-a-buggy-USB.patch ++ bugfix/x86/only-set-max_pfn_mapped-to-512-MiB-if-we-enter-via-head_64.S.patch signature.asc Description: PGP signature
Bug#621072: linux-image-2.6.32-5-amd64: 2.6.32-33 failes to boot as PV domU on Xen
On Fri, 8 Apr 2011 14:15:39 +0200 Lars Maes lars.m...@gmail.com wrote: I am also experiencing this issue with my XenServer 5.6 FP1 hosts when upgrading to the -33 kernel. Alas i can not give you any dumps, since I get no console from XenCenter and i do not know how to get this elsewhere. I'm getting those using xe host-dmesg host=HOSTNAME on the host console. On Fri, 08 Apr 2011 14:55:21 +0100 Ben Hutchings b...@decadent.org.uk wrote: On Wed, 2011-04-06 at 11:48 +0200, Florian Wagner wrote: Package: linux-2.6 Version: 2.6.32-33 Severity: critical Justification: breaks the whole system I'm currently investigation why my Debian squeeze systems don't live migrate on an XenSever pool. By chance I stumbled upon the (as it seems to me) soon to be released 2.6.32-33 kernel version and as my live migration issues are kernel related I decided to try that kernel. But this kernel doesn't boot as a PV domU neither on my Citrix XenServer 5.6 FP1 nor on a Debian system with Xen 3.4.3 at all. It doesn't even get so far as to provide a hvc console but crashes with a page fault on domain creation: [...] Which was the last version that worked for you? See the end of my message below the dump: 2.6.32-31 boots. 2.6.32-32 not anymore. Regards Florian Wagner signature.asc Description: PGP signature
Bug#621072: linux-image-2.6.32-5-amd64: 2.6.32-33 failes to boot as PV domU on Xen
On Wed, 2011-04-06 at 11:48 +0200, Florian Wagner wrote: Package: linux-2.6 Version: 2.6.32-33 Severity: critical Justification: breaks the whole system I'm currently investigation why my Debian squeeze systems don't live migrate on an XenSever pool. By chance I stumbled upon the (as it seems to me) soon to be released 2.6.32-33 kernel version and as my live migration issues are kernel related I decided to try that kernel. But this kernel doesn't boot as a PV domU neither on my Citrix XenServer 5.6 FP1 nor on a Debian system with Xen 3.4.3 at all. It doesn't even get so far as to provide a hvc console but crashes with a page fault on domain creation: [...] Which was the last version that worked for you? Ben. -- Ben Hutchings Once a job is fouled up, anything done to improve it makes it worse. signature.asc Description: This is a digitally signed message part
Bug#621072: linux-image-2.6.32-5-amd64: 2.6.32-33 failes to boot as PV domU on Xen
Package: linux-2.6 Version: 2.6.32-33 Severity: critical Justification: breaks the whole system I'm currently investigation why my Debian squeeze systems don't live migrate on an XenSever pool. By chance I stumbled upon the (as it seems to me) soon to be released 2.6.32-33 kernel version and as my live migration issues are kernel related I decided to try that kernel. But this kernel doesn't boot as a PV domU neither on my Citrix XenServer 5.6 FP1 nor on a Debian system with Xen 3.4.3 at all. It doesn't even get so far as to provide a hvc console but crashes with a page fault on domain creation: (XEN) d16:v0: unhandled page fault (ec=) (XEN) Pagetable walk from 82df2000: (XEN) L4[0x1ff] = 00023dd49067 1003 (XEN) L3[0x1fe] = 00023dd45067 1007 (XEN) L2[0x016] = (XEN) domain_crash_sync called from entry.S (XEN) Domain 16 (vcpu#0) crashed on cpu#1: (XEN) [ Xen-3.4.3 x86_64 debug=n Not tainted ] (XEN) CPU:1 (XEN) RIP:e033:[8100c2af] (XEN) RFLAGS: 0216 EM: 1 CONTEXT: pv guest (XEN) rax: 82df2000 rbx: 8063 rcx: 8163 (XEN) rdx: 4000 rsi: rdi: (XEN) rbp: rsp: 8142db90 r8: 01ff (XEN) r9: 0003 r10: 00302000 r11: 0010 (XEN) r12: 8163 r13: r14: 4000 (XEN) r15: 4000 cr0: 8005003b cr4: 06f0 (XEN) cr3: 00023dd4b000 cr2: 82df2000 (XEN) ds: es: fs: gs: ss: e02b cs: e033 (XEN) Guest stack trace from rsp=8142db90: (XEN)8163 0010 8100c2af (XEN)0001e030 00010016 8142dbd8 e02b (XEN) 8100c2c2 8100c33c 03c0 (XEN)8100c3da 8100c1c9 0010 00302000 (XEN)0003 01ff 83c00063 (XEN)4000 8163 812f8981 ff40 (XEN)000100302000 ff40 0001049d 0010 (XEN)0001 8100dbe3 0010 8800010060f0 (XEN)8142dd38 03c0 ff40 8800010060f0 (XEN)8163 03c0 4000 (XEN)812f8bc7 00370009 00010008 81e3 (XEN) 2020205b 4000 880001006000 (XEN)8100dbe3 8142decc 8163 001e (XEN)0010 0010 4000 880001002000 (XEN) 8163 4000 (XEN)812f8d8f 00300020 (XEN)4000 880001002000 (XEN)0010 00302000 4000 81001880 (XEN) 8800 4000 88004000 (XEN)812f8feb ff40 88004000 Apart from addresses this is the same with domU kernel 2.6.32-32 and 2.6.32-33 as well as with either the hypervisor from XenServer or vanilla Xen. The current release 2.6.32-31 does boot without problems. System Information below is from a Debian lenny, where I tested this kernel (I don't have any other VM to hand for quick testing currently) but as this is a kernel problem this shouldn't matter. Regards Florian Wagner -- System Information: Debian Release: 5.0.8 APT prefers oldstable APT policy: (500, 'oldstable') Architecture: amd64 (x86_64) Kernel: Linux 2.6.26-2-xen-amd64 (SMP w/1 CPU core) Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_US.UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages linux-image-2.6.32-5-amd64 depends on: ii debconf [debconf-2.0] 1.5.24 Debian configuration management sy ii initramfs-tools [linux-initra 0.92o tools for generating an initramfs ii linux-base2.6.32-33 Linux image base package ii module-init-tools 3.4-1 tools for managing Linux kernel mo Versions of packages linux-image-2.6.32-5-amd64 recommends: pn firmware-linux-free none (no description available) Versions of packages linux-image-2.6.32-5-amd64 suggests: ii grub 0.97-47lenny2syscomp1 GRand Unified Bootloader (Legacy v pn linux-doc-2.6.32 none(no description available) Versions of packages linux-image-2.6.32-5-amd64 is related to: pn firmware-bnx2 none (no description available) pn firmware-bnx2xnone (no description available) pn firmware-ipw2x00 none (no