Skip to contentSkip to conversation

Moving Guest RAM address to other location than 0x80000000

XenARM Eric Trudeau 2 participants 4 messages Oct 9, 2013

lore
Share & tools
lore
#0 lore raw

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
[email protected]
http://lists.xen.org/xen-devel

#1 lore raw

On 10/09/2013 04:57 PM, Eric Trudeau wrote:

Hi,

Quoted 10 lines

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,

Signature · 1 line
Julien Grall
#2 lore raw
Quoted 17 lines

-----Original Message-----
From: Julien Grall [mailto:[email protected]]
Sent: Wednesday, October 09, 2013 12:20 PM
To: Eric Trudeau
Cc: xen-devel ([email protected])
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,

Quoted 5 lines

Can I move the Guest RAM address to something other than 0x80000000? I would like to move the Guest RAM to 0 if possible.

Quoted 9 lines
Quoted 5 lines

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

Quoted 4 lines

Cheers,

--
Julien Grall

#3 lore raw
Quoted 21 lines · Eric Trudeau
Quoted 21 lines

-----Original Message-----
From: Julien Grall [mailto:[email protected]]
Sent: Wednesday, October 09, 2013 12:20 PM
To: Eric Trudeau
Cc: xen-devel ([email protected])
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,

Quoted 7 lines

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:

Quoted 8 lines
Quoted 5 lines
Quoted 1 line

#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)?

Quoted 1 line

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).

Quoted 3 lines

-------------------------------------------------------------------------------
dom0 # xl create -c dom1.cfg

Can you paste the log of the following command?
xl -vvv create -c dom1.cfg

Quoted 7 lines

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.

Quoted 5 lines

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)?

Signature · 1 line
Julien Grall