From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Trudeau" Subject: [XenARM] Moving Guest RAM address to other location than 0x80000000 Date: Wed, 9 Oct 2013 15:57:52 +0000 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1497217091349198229==" Return-path: Content-Language: en-US List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: "xen-devel (xen-devel@lists.xen.org)" List-Id: xen-devel@lists.xenproject.org --===============1497217091349198229== Content-Language: en-US Content-Type: multipart/alternative; boundary=_000_FF3E5629F9FF6745ADE4EE690CEC81AD2AD648AESJEXCHMB09corpa_ --_000_FF3E5629F9FF6745ADE4EE690CEC81AD2AD648AESJEXCHMB09corpa_ Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable 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 --_000_FF3E5629F9FF6745ADE4EE690CEC81AD2AD648AESJEXCHMB09corpa_ Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: quoted-printable

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

 

--_000_FF3E5629F9FF6745ADE4EE690CEC81AD2AD648AESJEXCHMB09corpa_-- --===============1497217091349198229== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --===============1497217091349198229==-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [XenARM] Moving Guest RAM address to other location than 0x80000000 Date: Wed, 09 Oct 2013 17:19:57 +0100 Message-ID: <5255822D.5070603@linaro.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Eric Trudeau Cc: "xen-devel (xen-devel@lists.xen.org)" List-Id: xen-devel@lists.xenproject.org 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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Trudeau" Subject: Re: [XenARM] Moving Guest RAM address to other location than 0x80000000 Date: Wed, 9 Oct 2013 16:34:01 +0000 Message-ID: References: <5255822D.5070603@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <5255822D.5070603@linaro.org> Content-Language: en-US List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Julien Grall Cc: "xen-devel (xen-devel@lists.xen.org)" List-Id: xen-devel@lists.xenproject.org > -----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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [XenARM] Moving Guest RAM address to other location than 0x80000000 Date: Wed, 09 Oct 2013 17:58:24 +0100 Message-ID: <52558B30.70302@linaro.org> References: <5255822D.5070603@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Eric Trudeau Cc: "xen-devel (xen-devel@lists.xen.org)" List-Id: xen-devel@lists.xenproject.org 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.cfg Can 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=6 It 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: ff7f4014 The PC address looks weird. Silly question, Did you try to boot the guest with the current GUEST_RAM_BASE (ie 0x80000000)? -- Julien Grall