Re: [PATCH] compilation fix of ia64 hypervisor.c, utils.c (was Re: [Xen-ia64-devel] latest tree building fail.)
On Wed, 2006-05-17 at 13:13 +0900, Isaku Yamahata wrote: On Wed, May 10, 2006 at 02:58:20PM -0600, Alex Williamson wrote: I think we need some error checking in that path. The domain should probably panic if such fundamental hypercalls are unavailable. The patch is attached. Applied. -- Alex Williamson HP Linux Open Source Lab ___ Xen-ia64-devel mailing list Xen-ia64-devel@lists.xensource.com http://lists.xensource.com/xen-ia64-devel
Re: [PATCH] compilation fix of ia64 hypervisor.c, utils.c (was Re: [Xen-ia64-devel] latest tree building fail.)
On Wed, May 10, 2006 at 02:58:20PM -0600, Alex Williamson wrote: Quick update. Still some user error on my part here. I was trying to boot a p2m/vp kernel w/ a non-p2m/vp xen. The failure was because the ioremap was returning -ENOSYS, which we happily tried to use as the ioremapped address. I think we need some error checking in that path. The domain should probably panic if such fundamental hypercalls are unavailable. Unfortunately when I enable p2m/vp in xen, I don't even get to the point of starting to boot dom0. I seem to be taking an MCA from some stray reference to 0xA around the calls to dom_fw_dom0_passthrough(). I haven't yet narrowed down exactly where that's coming from. Thanks, The patch is attached. -- yamahata # HG changeset patch # User [EMAIL PROTECTED] # Node ID 4e5c513b77a2930655a40f33f81b5ee4e5ec7ba5 # Parent 53143620c0fd95db98126ea3c8a30c0470439420 panic when ioremap hypercall fails. This can occur when dom0 vp model xenlinux is used on P=M model xen/ia64. PATCHNAME: panic_when_ioremap_hypercall_failed diff -r 53143620c0fd -r 4e5c513b77a2 linux-2.6-xen-sparse/include/asm-ia64/hypercall.h --- a/linux-2.6-xen-sparse/include/asm-ia64/hypercall.h Tue May 16 19:06:46 2006 +0900 +++ b/linux-2.6-xen-sparse/include/asm-ia64/hypercall.h Wed May 17 13:10:58 2006 +0900 @@ -318,6 +318,7 @@ static inline void exit_idle(void) {} #define do_IRQ(irq, regs) __do_IRQ((irq), (regs)) #ifdef CONFIG_XEN_IA64_DOM0_VP +#include linux/err.h #include asm/xen/privop.h #define _hypercall_imm1(type, name, imm, a1) \ @@ -419,6 +420,10 @@ HYPERVISOR_ioremap(unsigned long ioaddr, unsigned long ret = ioaddr; if (running_on_xen) { ret = __HYPERVISOR_ioremap(ioaddr, size); + if (IS_ERR_VALUE(ret)) + panic(hypercall %s failed with %ld. + Please check Xen and Linux config mismatch\n, + __func__, -ret); } return ret; } ___ Xen-ia64-devel mailing list Xen-ia64-devel@lists.xensource.com http://lists.xensource.com/xen-ia64-devel
RE: [PATCH] compilation fix of ia64 hypervisor.c, utils.c (was Re:[Xen-ia64-devel] latest tree building fail.)
Hi, Kevin I'm sorry. I tried again. I can boot up with VP off. I have a mistake(I used old kernel(2.6.16-xen)). My auto build scripts was stupid... Best Regards, Akio Takebe Hi, Akio, I just tried the tip (9992) and succeed with creating dom0/domU. Do you make a fresh compile upon the tip? Your problem seems similar to the one with VP model enabled, though the error indicator seems to be incorrect GSI number... Thanks Kevin ___ Xen-ia64-devel mailing list Xen-ia64-devel@lists.xensource.com http://lists.xensource.com/xen-ia64-devel
RE: [PATCH] compilation fix of ia64 hypervisor.c, utils.c (was Re:[Xen-ia64-devel] latest tree building fail.)
From: Alex Williamson Sent: 2006年5月11日 0:23 - Does xen reboot after the above messages or just be silent? It seems that something occurs somewhere in acpi_boot_init() of linux/arch/ia64/kernel/acpi.c. Could you track it down more? It MCAs at this point. The error record indicates a bus error w/ target ID 0x001804108804. The chipset reports a response timeout with this same address. The bad memory reference seems to have come from iosapic_guest_write(), but as indicated by the bad lapic address above, the problem appears to have started earlier. I'll investigate further. Thanks, Alex I met a similar error when debugging patch for moving iosapic previously: ACPI: Error parsing MADT - no IOSAPIC entries The reason at that time was because xen and xenlinux had different NR_IOSAPICS definition. Xenlinux defaulted to 256 while xen limited to 4. On my tiger4 box, there's 6 IOSAPICS however. Then xen only initialized 4 IOSAPIC related structures, while xenlinux saw all 6 IOSAPICs. Finally when xenlinux operated 5th IOSAPIC, MCA happens. However the difference is, MCA occurred to me at MPT SCSI controller initialization, instead of immediately after above ACPI error message. Since above error has been solved, yours should be a bit different which may relate to bogus mapping. How can people reproduce your error? Or maybe debug can be postponed if current dom0 on VP is not full ready? Thanks, Kevin ___ Xen-ia64-devel mailing list Xen-ia64-devel@lists.xensource.com http://lists.xensource.com/xen-ia64-devel
RE: [PATCH] compilation fix of ia64 hypervisor.c,utils.c (was Re:[Xen-ia64-devel] latest tree building fail.)
On Thu, 2006-05-11 at 10:52 +0800, Tian, Kevin wrote: Have to say it's bad news. When I turned on xen_ia64_dom0_virtual_physical in xen, it halts even before starting dom0. Based on tip (Rev 9992). Maybe we should try this feature later when all patch sets are checked in. :-( Hi Kevin, This looks exactly like what I'm seeing except mine is an MCA. It's in the same area of xen bootup and the XIP of the MCA log is also pointing at assign_domain_page called from dom_fw_dom0_passthrough. Looks like Tetsu's patch provides a nice stack dump for helping to debug this now. Thanks, Alex (XEN) assign_domain_page: mpaddr 7ff8 already mapped! (XEN) assign_domain_page: mpaddr 7ff84000 already mapped! (XEN) ia64_fault, vector=0x0004, ifa=f3d0, iip=f404b580, ipsr=101008622030, isr=0802 (XEN) Alt ITLB. (XEN) d 0xf7ff8018 domid 32767 (XEN) vcpu 0xf40c4000 vcpu 0 (XEN) (XEN) CPU 0 (XEN) psr : 101008622030 ifs : 8308 ip : [f404b580] (XEN) ip is at assign_domain_page+0xd0/0x120 (XEN) unat: pfs : 0309 rsc : 0003 (XEN) rnat: e100 bsps: fffe pr : 10a0808800c51a9b (XEN) ldrs: ccv : fpsr: 0009804c8a70433f (XEN) csd : 09300009 ssd : 09300009 (XEN) b0 : f404bb40 b6 : f4044010 b7 : f0007fb1c7a0 (XEN) f6 : 0fffaf000 f7 : 0ffdde000 (XEN) f8 : 10001e000 f9 : 100038000 (XEN) f10 : 0fffdd200 f11 : 1003e (XEN) r1 : f4302a90 r2 : 7ffb8000 r3 : f4164000 (XEN) r8 : r9 : f4164020 r10 : f4164030 (XEN) r11 : f4164040 r12 : f40cbcb0 r13 : f40c4000 (XEN) r14 : f3d0 r15 : 00107ffb4761 r16 : (XEN) r17 : 0001ffed r18 : e551 r19 : f4104f10 (XEN) r20 : 0001 r21 : f410bf10 r22 : c01f (XEN) r23 : 0053 r24 : 0053 r25 : 0054 (XEN) r26 : 005f r27 : r28 : (XEN) r29 : r30 : r31 : f4113aa0 (XEN) (XEN) Call Trace: (XEN) [f408a100] show_stack+0x80/0xa0 (XEN) sp=f40cb860 bsp=f40c51e0 (XEN) [f4060f70] ia64_fault+0x290/0x680 (XEN) sp=f40cba30 bsp=f40c51a8 (XEN) [f4088da0] ia64_leave_kernel+0x0/0x310 (XEN) sp=f40cbab0 bsp=f40c51a8 (XEN) [f404b580] assign_domain_page+0xd0/0x120 (XEN) sp=f40cbcb0 bsp=f40c5168 (XEN) [f404bb40] assign_domain_same_page+0x60/0xa0 (XEN) sp=f40cbcb0 bsp=f40c5138 (XEN) [f404bc00] assign_domain_mach_page+0x30/0x50 (XEN) sp=f40cbcc0 bsp=f40c5108 (XEN) [f4051e70] dom_fw_dom0_passthrough+0x2b0/0x2c0 (XEN) sp=f40cbcc0 bsp=f40c50c8 (XEN) [f4087ba0] efi_memmap_walk_type+0xc0/0xf0 (XEN) sp=f40cbcc0 bsp=f40c5080 (XEN) [f4054080] dom_fw_setup+0x21c0/0x2ae0 (XEN) sp=f40cbcc0 bsp=f40c4ec0 (XEN) [f404a8f0] new_thread+0x2e0/0x4a0 (XEN) sp=f40cbd00 bsp=f40c4e70 (XEN) [f404df40] construct_dom0+0x8a0/0x1000 (XEN) sp=f40cbd00 bsp=f40c4d80 (XEN) [f406d2d0] start_kernel+0xf10/0x1180 (XEN) sp=f40cbde0 bsp=f40c4d28 (XEN) [f401a0a0] _start+0x340/0x360 (XEN) sp=f40cbe00 bsp=f40c4cc0 (XEN) (XEN) (XEN) Panic o -- Alex Williamson HP Linux Open Source Lab ___ Xen-ia64-devel mailing list Xen-ia64-devel@lists.xensource.com http://lists.xensource.com/xen-ia64-devel
RE: [PATCH] compilation fix of ia64 hypervisor.c, utils.c (was Re:[Xen-ia64-devel] latest tree building fail.)
Hi, I have the following error with default config. Does everyone have the same? cset #9992. SAL 0.1: Xen/ia64 Xen/ia64 version 0.0 SAL: AP wakeup using external interrupt vector 0xf3 xen_pal_emulator: UNIMPLEMENTED PAL CALL 42 (XEN) No logical to physical processor mapping available vcpu_set_itc: Setting ar.itc is currently disabled (XEN) (this message is only displayed one) (XEN) ACPI: Local APIC address ffda ACPI: [APIC:0x07] ignored 12 entries of 16 found register_intr: No IOSAPIC for GSI 4294967295 (XEN) ia64_fault, vector=0x001e, ifa=, iip=f409b260, ipsr=121008222018, isr=0a02 (XEN) Unaligned Reference. (XEN) d 0xf4136280 domid 0 (XEN) vcpu 0xf7fa vcpu 0 (XEN) (XEN) CPU 0 (XEN) psr : 121008222018 ifs : 8998 ip : [f409b261] (XEN) ip is at iosapic_guest_write+0x591/0x670 (XEN) unat: pfs : 0998 rsc : 0003 (XEN) rnat: bsps: pr : aaa9 (XEN) ldrs: ccv : fpsr: 0009804c8a70033f (XEN) csd : ssd : (XEN) b0 : f409b210 b6 : f4043b70 b7 : ec100800 (XEN) f6 : 0fffbc8c0 f7 : 0ffdba200 (XEN) f8 : 100018000 f9 : 10002a000 (XEN) f10 : 0fffdc8c0 f11 : 1003e (XEN) r1 : f42f2900 r2 : 4137 r3 : a00100c0fe29 (XEN) r8 : ffed r9 : r10 : (XEN) r11 : 0ae9 r12 : f7fa78d0 r13 : f7fa (XEN) r14 : f4106670 r15 : r16 : c318 (XEN) r17 : f01804108838 r18 : 0011 r19 : f4106e44 (XEN) r20 : f4106e48 r21 : 0010 r22 : a00100c7f198 (XEN) r23 : 3fda r24 : 0001012f0010 r25 : 0001012f0010 (XEN) r26 : r27 : r28 : (XEN) r29 : r30 : r31 : f4103900 (XEN) (XEN) Call Trace: (XEN) [f40888e0] show_stack+0x80/0xa0 (XEN) sp=f7fa7480 bsp=f7fa10b8 (XEN) [f405f770] ia64_fault+0x290/0x680 (XEN) sp=f7fa7650 bsp=f7fa1080 (XEN) [f4087580] ia64_leave_kernel+0x0/0x310 (XEN) sp=f7fa76d0 bsp=f7fa1080 (XEN) [f409b260] iosapic_guest_write+0x590/0x670 (XEN) sp=f7fa78d0 bsp=f7fa0fb8 (XEN) [f4054ce0] do_physdev_op+0x500/0x640 (XEN) sp=f7fa78d0 bsp=f7fa0f88 (XEN) [f4054ed0] do_physdev_op_compat+0xb0/0xd0 (XEN) sp=f7fa7920 bsp=f7fa0f68 (XEN) [f4053e90] ia64_hypercall+0x390/0xce0 (XEN) sp=f7fa7940 bsp=f7fa0f08 (XEN) [f40603a0] ia64_handle_break+0x1b0/0x2d0 (XEN) sp=f7fa7e00 bsp=f7fa0eb8 (XEN) [f4087580] ia64_leave_kernel+0x0/0x310 (XEN) sp=f7fa7e00 bsp=f7fa0eb8 (XEN) [a00100057010] ??? (XEN) sp=f7fa8000 bsp=f7fa0e38 (XEN) [a00100056f10] ??? (XEN) sp=f7fa8000 bsp=f7fa0dc8 (XEN) [a00100056f10] ??? (XEN) sp=f7fa8000 bsp=f7fa0d60 (XEN) [a00100056f10] ??? (XEN) sp=f7fa8000 bsp=f7fa0cf8 (XEN) (XEN) (XEN) Panic on CPU 0: (XEN) Fault in Xen. (XEN) (XEN) (XEN) Reboot in five seconds... (XEN) machine_restart called: spinning ___ Xen-ia64-devel mailing list Xen-ia64-devel@lists.xensource.com http://lists.xensource.com/xen-ia64-devel
Re: [PATCH] compilation fix of ia64 hypervisor.c, utils.c (was Re: [Xen-ia64-devel] latest tree building fail.)
On Tue, 2006-05-09 at 12:41 +0900, Isaku Yamahata wrote: Here is the patch. Isaku, I only applied the first 2 chunks of this patch. The rest seems to be patching code that doesn't yet exist. This fixes the build problem, but I can't boot with a XEN_IA64_DOM0_VP=y xenlinux kernel. It fails booting dom0 here: (XEN) Linux version 2.6.16.13-xen ([EMAIL PROTECTED]) (gcc version 3.4.6 20060122 (prerelease) (Debian 3.4.5-2)) #1 SMP Tue May 9 13:01:02 MDT 2006 EFI v1.00 by Xen/ia64: SALsystab=0xc000178 ACPI 2.0=0x3fdd6000 SMBIOS=0x3e52a000 HCDP=0x3fdd4000 warning: unable to switch EFI into virtual mode (status=9223372036854775811) PCDP: v3 at 0x3fdd4000 Explicit console=; ignoring PCDP Initial ramdisk at: 0xe0002bc0 (0 bytes) SAL 0.1: Xen/ia64 Xen/ia64 version 0.0 SAL: AP wakeup using external interrupt vector 0xf3 xen_pal_emulator: UNIMPLEMENTED PAL CALL 42 (XEN) No logical to physical processor mapping available vcpu_set_itc: Setting ar.itc is currently disabled (XEN) (this message is only displayed one) (XEN) ACPI: Local APIC address ffda ACPI: [APIC:0x07] ignored 4 entries of 8 found ACPI: Error parsing MADT - no IOSAPIC entries I don't know if this matters at this point since the recommendation is currently XEN_IA64_DOM0_VP=n. With that, everything builds and works with no obvious regressions. Thanks, Alex -- Alex Williamson HP Linux Open Source Lab ___ Xen-ia64-devel mailing list Xen-ia64-devel@lists.xensource.com http://lists.xensource.com/xen-ia64-devel
Re: [PATCH] compilation fix of ia64 hypervisor.c, utils.c (was Re: [Xen-ia64-devel] latest tree building fail.)
On Tue, May 09, 2006 at 03:11:09PM -0600, Alex Williamson wrote: I only applied the first 2 chunks of this patch. The rest seems to be patching code that doesn't yet exist. This fixes the build problem, but I can't boot with a XEN_IA64_DOM0_VP=y xenlinux kernel. It fails booting dom0 here: (XEN) Linux version 2.6.16.13-xen ([EMAIL PROTECTED]) (gcc version 3.4.6 20060122 (prerelease) (Debian 3.4.5-2)) #1 SMP Tue May 9 13:01:02 MDT 2006 EFI v1.00 by Xen/ia64: SALsystab=0xc000178 ACPI 2.0=0x3fdd6000 SMBIOS=0x3e52a000 HCDP=0x3fdd4000 warning: unable to switch EFI into virtual mode (status=9223372036854775811) PCDP: v3 at 0x3fdd4000 Explicit console=; ignoring PCDP Initial ramdisk at: 0xe0002bc0 (0 bytes) SAL 0.1: Xen/ia64 Xen/ia64 version 0.0 SAL: AP wakeup using external interrupt vector 0xf3 xen_pal_emulator: UNIMPLEMENTED PAL CALL 42 (XEN) No logical to physical processor mapping available vcpu_set_itc: Setting ar.itc is currently disabled (XEN) (this message is only displayed one) (XEN) ACPI: Local APIC address ffda ACPI: [APIC:0x07] ignored 4 entries of 8 found ACPI: Error parsing MADT - no IOSAPIC entries I don't know if this matters at this point since the recommendation is currently XEN_IA64_DOM0_VP=n. With that, everything builds and works with no obvious regressions. Thanks, It matters. Dom0 should boot with XEN_IA64_DOM0_VP=y at least. I tried the changeset 9984:e2fba6729281 of xen-ia64-unstable.hg with with XEN_IA64_DOM0_VP=y. I could boot dom0 and 1 domU. (Multiple domU might have problems. I'm debugging it now) - Did you pass nosmp boot parameter to xen? - Does xen reboot after the above messages or just be silent? It seems that something occurs somewhere in acpi_boot_init() of linux/arch/ia64/kernel/acpi.c. Could you track it down more? -- yamahata ___ Xen-ia64-devel mailing list Xen-ia64-devel@lists.xensource.com http://lists.xensource.com/xen-ia64-devel
RE: [PATCH] compilation fix of ia64 hypervisor.c, utils.c (was Re: [Xen-ia64-devel] latest tree building fail.)
Hi, Isaku, Should people disable CONFIG_XEN_IA64_DOM0_VP when compiling xenlinux now? Does it still work without applying your rest patch set? Thanks, Kevin -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Isaku Yamahata Sent: 2006年5月9日 11:42 To: You, Yongkang Cc: xen-ia64-devel@lists.xensource.com Subject: [PATCH] compilation fix of ia64 hypervisor.c,utils.c (was Re: [Xen-ia64-devel] latest tree building fail.) Here is the patch. On Tue, May 09, 2006 at 08:31:24AM +0800, You, Yongkang wrote: Hi all, The latest Cset 9968 has problem to build out xen. :( The log is: arch/ia64/xen/hypervisor.c: In function `balloon_alloc_empty_page_range': arch/ia64/xen/hypervisor.c:217: error: `mem_map' undeclared (first use in this function) arch/ia64/xen/hypervisor.c:217: error: (Each undeclared identifier is reported only once arch/ia64/xen/hypervisor.c:217: error: for each function it appears in.) make[5]: *** [arch/ia64/xen/hypervisor.o] Error 1 make[4]: *** [arch/ia64/xen] Error 2 make[4]: Leaving directory `/home/build/nightly/builds_xen_unstable/xen-3.0-hg-xen_ia64_unstable -9968-20060509/linux-2.6.16.13-xen' make[3]: *** [build] Error 2 make[3]: Leaving directory `/home/build/nightly/builds_xen_unstable/xen-3.0-hg-xen_ia64_unstable -9968-20060509' make[2]: *** [linux-2.6-xen-install] Error 2 make[2]: Leaving directory `/home/build/nightly/builds_xen_unstable/xen-3.0-hg-xen_ia64_unstable -9968-20060509' make[1]: *** [install-kernels] Error 1 make[1]: Leaving directory `/home/build/nightly/builds_xen_unstable/xen-3.0-hg-xen_ia64_unstable -9968-20060509' make: *** [world] Error 2 Best Regards, Yongkang (Kangkang) 永康 ___ Xen-ia64-devel mailing list Xen-ia64-devel@lists.xensource.com http://lists.xensource.com/xen-ia64-devel -- yamahata ___ Xen-ia64-devel mailing list Xen-ia64-devel@lists.xensource.com http://lists.xensource.com/xen-ia64-devel
RE: [PATCH] compilation fix of ia64 hypervisor.c, utils.c (was Re: [Xen-ia64-devel] latest tree building fail.)
On Tue, 2006-05-09 at 11:53 +0800, Tian, Kevin wrote: Hi, Isaku, Should people disable CONFIG_XEN_IA64_DOM0_VP when compiling xenlinux now? Does it still work without applying your rest patch set? FWIW, I was testing with CONFIG_XEN_IA64_DOM0_VP=n, so didn't see this problem. Alex -- Alex Williamson HP Linux Open Source Lab ___ Xen-ia64-devel mailing list Xen-ia64-devel@lists.xensource.com http://lists.xensource.com/xen-ia64-devel
Re: [PATCH] compilation fix of ia64 hypervisor.c, utils.c (was Re: [Xen-ia64-devel] latest tree building fail.)
On Tue, May 09, 2006 at 11:53:40AM +0800, Tian, Kevin wrote: Should people disable CONFIG_XEN_IA64_DOM0_VP when compiling xenlinux now? Yes. Does it still work without applying your rest patch set? Yes. I tested compilation and dom0/domU boot with CONFIG_XEN_IA64_DOM0_VP=y. However there is no advantage to do so since vnif isn't available without the rest patch set. -- yamahata ___ Xen-ia64-devel mailing list Xen-ia64-devel@lists.xensource.com http://lists.xensource.com/xen-ia64-devel