Eric Trudeau
2013-Oct-09 15:57 UTC
[XenARM] Moving Guest RAM address to other location than 0x80000000
Can I move the Guest RAM address to something other than 0x80000000? I would like to move the Guest RAM to 0 if possible. I get a crash while creating the domain when I just change the following in tools/libxc/xc_dom_armzimageloader.c: #define GUEST_RAM_BASE 0x00000000 /* was 0x80000000 */ Thanks, Eric Trudeau 200 Brickstone Square Suite 401 Andover, MA 01810 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Julien Grall
2013-Oct-09 16:19 UTC
Re: [XenARM] Moving Guest RAM address to other location than 0x80000000
On 10/09/2013 04:57 PM, Eric Trudeau wrote: Hi,> Can I move the Guest RAM address to something other than 0x80000000? > I would like to move the Guest RAM to 0 if possible. > > > > I get a crash while creating the domain when I just change the following > in tools/libxc/xc_dom_armzimageloader.c:> #define GUEST_RAM_BASE 0x00000000 /* was 0x80000000 */Did you modify the guest DTS? If not, you need to fix the "reg" property in memory node. Cheers, -- Julien Grall
Eric Trudeau
2013-Oct-09 16:34 UTC
Re: [XenARM] Moving Guest RAM address to other location than 0x80000000
> -----Original Message----- > From: Julien Grall [mailto:julien.grall@linaro.org] > Sent: Wednesday, October 09, 2013 12:20 PM > To: Eric Trudeau > Cc: xen-devel (xen-devel@lists.xen.org) > Subject: Re: [Xen-devel] [XenARM] Moving Guest RAM address to other location > than 0x80000000 > > On 10/09/2013 04:57 PM, Eric Trudeau wrote: > > Hi, > > > Can I move the Guest RAM address to something other than 0x80000000? > > I would like to move the Guest RAM to 0 if possible. > > > > > > > > I get a crash while creating the domain when I just change the following > > in tools/libxc/xc_dom_armzimageloader.c: > > > > #define GUEST_RAM_BASE 0x00000000 /* was 0x80000000 */ > > Did you modify the guest DTS? If not, you need to fix the "reg" property > in memory node. >Yes, I have a memory region of 0 in the DT. The crash is very early. Could there be another code dependency on RAM starting at 0x80000000 (e.g. guest mapping)? BTW: xl destroy dom1 hangs when trying to destroy this guest. ------------------------------------------------------------------------------- dom0 # xl create -c dom1.cfg Parsing config from dom1.cfg (XEN) physdev.c:57: dom1: gic_route_irq_to_guest mapped in IRQ 108 (XEN) memory_map:add: dom1 gfn=0 mfn=0 nr=80000 (XEN) memory_map:add: dom1 gfn=a0000 mfn=a0000 nr=20000 (XEN) memory_map:add: dom1 gfn=f0000 mfn=f0000 nr=1000 device vif1.0 entered promiscuous mode (XEN) Hypervisor Trap. HSR=0x80000006 EC=0x20 IL=0 Syndrome=6 Daemon running with PID 681(XEN) CPU3: Unexpected Trap: Hypervisor (XEN) ----[ Xen-4.4-unstable arm32 debug=y Tainted: C ]---- (XEN) CPU: 3 (XEN) PC: ff7f4014 (XEN) CPSR: 400001d7 MODE:32-bit Guest ABT (XEN) R0: 00000000 R1: 41007a2f R2: 00000067 R3: 00000000 (XEN) R4: 41007a18 R5: 00000000 R6: 00000000 R7: 00000000 (XEN) R8: 00000000 R9: 00000000 R10:00000000 R11:00000000 R12:00000000 (XEN) USR: SP: 00000000 LR: 00000000 (XEN) SVC: SP: 00000058 LR: 40008008 SPSR:00000000 (XEN) ABT: SP: 00000000 LR: 00000014 SPSR:400001f3 (XEN) UND: SP: 00000000 LR: 00000000 SPSR:00000000 (XEN) IRQ: SP: 00000000 LR: 00000000 SPSR:00000000 (XEN) FIQ: SP: 00000000 LR: c2c2c2c2 SPSR:00000000 (XEN) FIQ: R8: 00000000 R9: 00000000 R10:00000000 R11:00000000 R12:00000000 (XEN) (XEN) SCTLR: 00c50078 (XEN) TCR: 00000000 (XEN) TTBR0: 0000000000000000 (XEN) TTBR1: 0000000000000000 (XEN) IFAR: 00000000, IFSR: 00000000 (XEN) DFAR: 00000067, DFSR: 00000001 (XEN) (XEN) VTCR_EL2: 80002558 (XEN) VTTBR_EL2: 000200009fe6e000 (XEN) (XEN) SCTLR_EL2: 30cd187f (XEN) HCR_EL2: 0000000000282835 (XEN) TTBR0_EL2: 0000000096039000 (XEN) (XEN) ESR_EL2: 80000006 (XEN) HPFAR_EL2: 0000000000ff7f40 (XEN) HDFAR: c8800f00 (XEN) HIFAR: ff7f4014 (XEN) (XEN) No stack trace for 32-bit guest kernel-mode xenbr0: port 1(eth0) entered forwarding state dom0 # dom0 # dom0 # xl list Name ID Mem VCPUs State Time(s) Domain-0 0 122 4 r----- 5.0 dom1 1 96 1 r----- 16.9 dom0 # xl destroy dom1> Cheers, > > -- > Julien Grall
Julien Grall
2013-Oct-09 16:58 UTC
Re: [XenARM] Moving Guest RAM address to other location than 0x80000000
On 10/09/2013 05:34 PM, Eric Trudeau wrote:>> -----Original Message----- >> From: Julien Grall [mailto:julien.grall@linaro.org] >> Sent: Wednesday, October 09, 2013 12:20 PM >> To: Eric Trudeau >> Cc: xen-devel (xen-devel@lists.xen.org) >> Subject: Re: [Xen-devel] [XenARM] Moving Guest RAM address to other location >> than 0x80000000 >> >> On 10/09/2013 04:57 PM, Eric Trudeau wrote: >> >> Hi, >> >>> Can I move the Guest RAM address to something other than 0x80000000? >>> I would like to move the Guest RAM to 0 if possible. >>> >>> >>> >>> I get a crash while creating the domain when I just change the following >>> in tools/libxc/xc_dom_armzimageloader.c: >> >> >>> #define GUEST_RAM_BASE 0x00000000 /* was 0x80000000 */ >> >> Did you modify the guest DTS? If not, you need to fix the "reg" property >> in memory node. >> > Yes, I have a memory region of 0 in the DT. > > The crash is very early. Could there be another code dependency on RAM starting at 0x80000000 (e.g. guest mapping)?I don''t see other dependencies in the code. Did you check that the jump address is correct (dom->parms.virt_entry)?> BTW: xl destroy dom1 hangs when trying to destroy this guest.That''s normal, one of the CPU has received an non-handled hypervisor trap that is result to an infinite loop in hyp mode for this CPU. After few minutes you should see strange warning from the dom0 kernel. I think we should correctly handle EC=0x20 (ie prefetch abort).> > ------------------------------------------------------------------------------- > dom0 # xl create -c dom1.cfgCan you paste the log of the following command? xl -vvv create -c dom1.cfg> Parsing config from dom1.cfg > (XEN) physdev.c:57: dom1: gic_route_irq_to_guest mapped in IRQ 108 > (XEN) memory_map:add: dom1 gfn=0 mfn=0 nr=80000 > (XEN) memory_map:add: dom1 gfn=a0000 mfn=a0000 nr=20000 > (XEN) memory_map:add: dom1 gfn=f0000 mfn=f0000 nr=1000 > device vif1.0 entered promiscuous mode > (XEN) Hypervisor Trap. HSR=0x80000006 EC=0x20 IL=0 Syndrome=6It seems Xen received a prefetch abort, which means that the kernel is trying to fetch an instruction in a non mapped address.> Daemon running with PID 681(XEN) CPU3: Unexpected Trap: Hypervisor > > (XEN) ----[ Xen-4.4-unstable arm32 debug=y Tainted: C ]---- > (XEN) CPU: 3 > (XEN) PC: ff7f4014The PC address looks weird. Silly question, Did you try to boot the guest with the current GUEST_RAM_BASE (ie 0x80000000)? -- Julien Grall