All of lore.kernel.org
 help / color / mirror / Atom feed
* 32-bit ARM guest on 64-bit ARM Xen
@ 2015-04-28 19:14 Robert VanVossen
  2015-04-28 20:14 ` Julien Grall
  2015-04-28 23:50 ` Edgar E. Iglesias
  0 siblings, 2 replies; 7+ messages in thread
From: Robert VanVossen @ 2015-04-28 19:14 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Campbell

Hello,

I was wondering, what is the current state of running a 32-bit ARM guest running
on a 64-bit Xen for ARM. I was working on getting the minios from
https://github.com/talex5/xen/commits/next built and running as a guest on an
emulated Cortex-A53. I have gotten Xen and 64-bit Linux guests running in the
emulated environment, but I ran into some issues with the 32-bit guests.

When I tried to run them, I got the following:

Parsing config from /etc/xen/mini.cfg
(XEN) Hypervisor Trap. HSR=0x2000000 EC=0x0 IL=1 Syndrome=0x0
(XEN) CPU0: Unexpected Trap: Hypervisor
(XEN) ----[ Xen-4.6-unstable  arm64  debug=y  Not tainted ]----
(XEN) CPU:    0
(XEN) PC:     00000000002413c8 schedule_tail+0x248/0x2dc
(XEN) LR:     0000000000241300
(XEN) SP:     000080003ef5fe80
(XEN) CPSR:   600003c9 MODE:64-bit EL2h (Hypervisor, handler)
(XEN)      X0: 0000000000000000  X1: 0000000000000000  X2: 0000000000000000
(XEN)      X3: 0000000000000000  X4: 0000000000000000  X5: 0000000000000008
(XEN)      X6: 0000000040011100  X7: 0000000000000000  X8: 000080003ef632e0
(XEN)      X9: 000080003ef5feb0 X10: 0000000100000000 X11: aea06b1800000000
(XEN)     X12: 000000000000007f X13: 2f3b52d000000000 X14: 0000000100000000
(XEN)     X15: 0000007fae98c598 X16: 0000000000000024 X17: 0000007fae908b50
(XEN)     X18: 0000007ffb53e170 X19: 000080003efdb000 X20: 000080003ef63000
(XEN)     X21: 0000000000000000 X22: 0000000000000000 X23: 0000000000000000
(XEN)     X24: 0000000000000000 X25: 0000000000000000 X26: 0000000000000000
(XEN)     X27: 0000000000000000 X28: 0000000000000000  FP: 000080003ef5fe80
(XEN)
(XEN)   VTCR_EL2: 80023558
(XEN)  VTTBR_EL2: 000200003ef66000
(XEN)
(XEN)  SCTLR_EL2: 30cd187d
(XEN)    HCR_EL2: 000000000038643f
(XEN)  TTBR0_EL2: 000000003eef4000
(XEN)
(XEN)    ESR_EL2: 02000000
(XEN)  HPFAR_EL2: 0000000000f90100
(XEN)    FAR_EL2: ffffff8000000f00
(XEN)
(XEN) Xen stack trace from sp=000080003ef5fe80:
(XEN)    000080003ef5fea0 0000000000241468 0000000000000000 0000000000000000
(XEN)    0000000000000000 000000000024145c 0000000000000000 00000000ffffffff
(XEN)    0000000047fff000 0000000000000000 0000000000000000 0000000000000000
(XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000000
(XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000000
(XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000000
(XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000000
(XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000000
(XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000000
(XEN)    0000000000000000 0000000000000000 0000000040008000 00000000000001d3
(XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000000
(XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000000
(XEN) Xen call trace:
(XEN)    [<00000000002413c8>] schedule_tail+0x248/0x2dc (PC)
(XEN)    [<0000000000241300>] schedule_tail+0x180/0x2dc (LR)
(XEN)    [<0000000000241468>] continue_new_vcpu+0xc/0xa4
(XEN)    [<000000000024145c>] continue_new_vcpu+0/0xa4
(XEN)
(XEN)
(XEN) ****************************************
(XEN) Panic on CPU 0:
(XEN) CPU0: Unexpected Trap: Hypervisor
(XEN)
(XEN) ****************************************
(XEN)
(XEN) Reboot in five seconds...

I was trying to figure out if it had to do with issues with mini-os in general,
or if it had to do with the fact that mini-os can currently only be built with
32-bit support. So I took a 32-bit linux kernel that had xen guest support
enabled. I tried to boot that guest, and I got the exact same error. I tried to
do some searching on the wiki and on the mailing list and I couldn't find any
references to this issue. Is this a known bug and are there any plans to fix this?

Thanks,
Robbie VanVossen
DornerWorks

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: 32-bit ARM guest on 64-bit ARM Xen
  2015-04-28 19:14 32-bit ARM guest on 64-bit ARM Xen Robert VanVossen
@ 2015-04-28 20:14 ` Julien Grall
  2015-04-29 16:21   ` Robert VanVossen
  2015-04-28 23:50 ` Edgar E. Iglesias
  1 sibling, 1 reply; 7+ messages in thread
From: Julien Grall @ 2015-04-28 20:14 UTC (permalink / raw)
  To: Robert VanVossen, xen-devel; +Cc: Ian Campbell


On 28/04/2015 20:14, Robert VanVossen wrote:
> Hello,

Hi Robert,

> I was wondering, what is the current state of running a 32-bit ARM guest running
> on a 64-bit Xen for ARM. I was working on getting the minios from
> https://github.com/talex5/xen/commits/next built and running as a guest on an
> emulated Cortex-A53. I have gotten Xen and 64-bit Linux guests running in the
> emulated environment, but I ran into some issues with the 32-bit guests.

I used 32-bit kernel on 64-bit hardware recently without no issue. 
AFAICT, 32-bit guest as always worked on Xen. Which version on Xen are 
you running?

Also, silly question, does your hardware supports 32-bit instructions? 
I.e were you able to run Linux 32-bit on baremetal?

> When I tried to run them, I got the following:
>
> Parsing config from /etc/xen/mini.cfg
> (XEN) Hypervisor Trap. HSR=0x2000000 EC=0x0 IL=1 Syndrome=0x0

This looks like an issue with Xen running on your hardware. EC = 0x0 
means "Exception with an Unkwnown reasons".

> (XEN) CPU0: Unexpected Trap: Hypervisor
> (XEN) ----[ Xen-4.6-unstable  arm64  debug=y  Not tainted ]----
> (XEN) CPU:    0
> (XEN) PC:     00000000002413c8 schedule_tail+0x248/0x2dc

schedule_tail contains the code to context switch from one domain to 
another one.

Can you run addr2line on the xen-syms with the address in PC and give 
the result?

Regards,

-- 
Julien Grall

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: 32-bit ARM guest on 64-bit ARM Xen
  2015-04-28 19:14 32-bit ARM guest on 64-bit ARM Xen Robert VanVossen
  2015-04-28 20:14 ` Julien Grall
@ 2015-04-28 23:50 ` Edgar E. Iglesias
  1 sibling, 0 replies; 7+ messages in thread
From: Edgar E. Iglesias @ 2015-04-28 23:50 UTC (permalink / raw)
  To: Robert VanVossen; +Cc: xen-devel, Ian Campbell

On Tue, Apr 28, 2015 at 03:14:51PM -0400, Robert VanVossen wrote:
> Hello,
> 
> I was wondering, what is the current state of running a 32-bit ARM guest running
> on a 64-bit Xen for ARM. I was working on getting the minios from
> https://github.com/talex5/xen/commits/next built and running as a guest on an
> emulated Cortex-A53. I have gotten Xen and 64-bit Linux guests running in the
> emulated environment, but I ran into some issues with the 32-bit guests.

Hi Robert,

If this is with the QEMU models for Xilinx ZynqMP it's not unexpected.
We don't really support 32-bit guests at the moment.

If you can provide some more details on where it is failing I can have a
look at it.

Cheers,
Edgar


> 
> When I tried to run them, I got the following:
> 
> Parsing config from /etc/xen/mini.cfg
> (XEN) Hypervisor Trap. HSR=0x2000000 EC=0x0 IL=1 Syndrome=0x0
> (XEN) CPU0: Unexpected Trap: Hypervisor
> (XEN) ----[ Xen-4.6-unstable  arm64  debug=y  Not tainted ]----
> (XEN) CPU:    0
> (XEN) PC:     00000000002413c8 schedule_tail+0x248/0x2dc
> (XEN) LR:     0000000000241300
> (XEN) SP:     000080003ef5fe80
> (XEN) CPSR:   600003c9 MODE:64-bit EL2h (Hypervisor, handler)
> (XEN)      X0: 0000000000000000  X1: 0000000000000000  X2: 0000000000000000
> (XEN)      X3: 0000000000000000  X4: 0000000000000000  X5: 0000000000000008
> (XEN)      X6: 0000000040011100  X7: 0000000000000000  X8: 000080003ef632e0
> (XEN)      X9: 000080003ef5feb0 X10: 0000000100000000 X11: aea06b1800000000
> (XEN)     X12: 000000000000007f X13: 2f3b52d000000000 X14: 0000000100000000
> (XEN)     X15: 0000007fae98c598 X16: 0000000000000024 X17: 0000007fae908b50
> (XEN)     X18: 0000007ffb53e170 X19: 000080003efdb000 X20: 000080003ef63000
> (XEN)     X21: 0000000000000000 X22: 0000000000000000 X23: 0000000000000000
> (XEN)     X24: 0000000000000000 X25: 0000000000000000 X26: 0000000000000000
> (XEN)     X27: 0000000000000000 X28: 0000000000000000  FP: 000080003ef5fe80
> (XEN)
> (XEN)   VTCR_EL2: 80023558
> (XEN)  VTTBR_EL2: 000200003ef66000
> (XEN)
> (XEN)  SCTLR_EL2: 30cd187d
> (XEN)    HCR_EL2: 000000000038643f
> (XEN)  TTBR0_EL2: 000000003eef4000
> (XEN)
> (XEN)    ESR_EL2: 02000000
> (XEN)  HPFAR_EL2: 0000000000f90100
> (XEN)    FAR_EL2: ffffff8000000f00
> (XEN)
> (XEN) Xen stack trace from sp=000080003ef5fe80:
> (XEN)    000080003ef5fea0 0000000000241468 0000000000000000 0000000000000000
> (XEN)    0000000000000000 000000000024145c 0000000000000000 00000000ffffffff
> (XEN)    0000000047fff000 0000000000000000 0000000000000000 0000000000000000
> (XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000000
> (XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000000
> (XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000000
> (XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000000
> (XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000000
> (XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000000
> (XEN)    0000000000000000 0000000000000000 0000000040008000 00000000000001d3
> (XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000000
> (XEN)    0000000000000000 0000000000000000 0000000000000000 0000000000000000
> (XEN) Xen call trace:
> (XEN)    [<00000000002413c8>] schedule_tail+0x248/0x2dc (PC)
> (XEN)    [<0000000000241300>] schedule_tail+0x180/0x2dc (LR)
> (XEN)    [<0000000000241468>] continue_new_vcpu+0xc/0xa4
> (XEN)    [<000000000024145c>] continue_new_vcpu+0/0xa4
> (XEN)
> (XEN)
> (XEN) ****************************************
> (XEN) Panic on CPU 0:
> (XEN) CPU0: Unexpected Trap: Hypervisor
> (XEN)
> (XEN) ****************************************
> (XEN)
> (XEN) Reboot in five seconds...
> 
> I was trying to figure out if it had to do with issues with mini-os in general,
> or if it had to do with the fact that mini-os can currently only be built with
> 32-bit support. So I took a 32-bit linux kernel that had xen guest support
> enabled. I tried to boot that guest, and I got the exact same error. I tried to
> do some searching on the wiki and on the mailing list and I couldn't find any
> references to this issue. Is this a known bug and are there any plans to fix this?
> 
> Thanks,
> Robbie VanVossen
> DornerWorks
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: 32-bit ARM guest on 64-bit ARM Xen
  2015-04-28 20:14 ` Julien Grall
@ 2015-04-29 16:21   ` Robert VanVossen
  2015-05-01 12:48     ` Ian Campbell
  0 siblings, 1 reply; 7+ messages in thread
From: Robert VanVossen @ 2015-04-29 16:21 UTC (permalink / raw)
  To: Julien Grall, xen-devel; +Cc: Ian Campbell



On 4/28/2015 4:14 PM, Julien Grall wrote:
> 
> On 28/04/2015 20:14, Robert VanVossen wrote:
>> Hello,
> 
> Hi Robert,
> 
>> I was wondering, what is the current state of running a 32-bit ARM guest running
>> on a 64-bit Xen for ARM. I was working on getting the minios from
>> https://github.com/talex5/xen/commits/next built and running as a guest on an
>> emulated Cortex-A53. I have gotten Xen and 64-bit Linux guests running in the
>> emulated environment, but I ran into some issues with the 32-bit guests.
> 
> I used 32-bit kernel on 64-bit hardware recently without no issue. 
> AFAICT, 32-bit guest as always worked on Xen. Which version on Xen are 
> you running?
> 
I thought that should be the case, but I couldn't find confirmation anywhere
online.

I am building from master, more specifically commit 123c7793...

> Also, silly question, does your hardware supports 32-bit instructions? 
> I.e were you able to run Linux 32-bit on baremetal?
> 

I had assumed that all cortex-A53 implementations had to support 32-bit
instructions, but that might not be the case. At least, the emulated model might
not. I will have to look more into that.

>> When I tried to run them, I got the following:
>>
>> Parsing config from /etc/xen/mini.cfg
>> (XEN) Hypervisor Trap. HSR=0x2000000 EC=0x0 IL=1 Syndrome=0x0
> 
> This looks like an issue with Xen running on your hardware. EC = 0x0 
> means "Exception with an Unkwnown reasons".
> 
>> (XEN) CPU0: Unexpected Trap: Hypervisor
>> (XEN) ----[ Xen-4.6-unstable  arm64  debug=y  Not tainted ]----
>> (XEN) CPU:    0
>> (XEN) PC:     00000000002413c8 schedule_tail+0x248/0x2dc
> 
> schedule_tail contains the code to context switch from one domain to 
> another one.
> 
> Can you run addr2line on the xen-syms with the address in PC and give 
> the result?
> 
This yields xen/xen/arch/arm/domain.c:208 which has the following line:

WRITE_SYSREG32(n->arch.teecr, TEECR32_EL1);

Thanks,
Robbie VanVossen

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: 32-bit ARM guest on 64-bit ARM Xen
  2015-04-29 16:21   ` Robert VanVossen
@ 2015-05-01 12:48     ` Ian Campbell
  2015-05-01 12:55       ` Julien Grall
  0 siblings, 1 reply; 7+ messages in thread
From: Ian Campbell @ 2015-05-01 12:48 UTC (permalink / raw)
  To: Robert VanVossen; +Cc: Julien Grall, xen-devel

On Wed, 2015-04-29 at 12:21 -0400, Robert VanVossen wrote:
> This yields xen/xen/arch/arm/domain.c:208 which has the following line:
> 
> WRITE_SYSREG32(n->arch.teecr, TEECR32_EL1);

This is in a "if ( is_32bit_domain(p->domain) && cpu_has_thumbee )"
condition, so if it isn't a 32-bit model issue it might be a ThumbEE
one?

Ian.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: 32-bit ARM guest on 64-bit ARM Xen
  2015-05-01 12:48     ` Ian Campbell
@ 2015-05-01 12:55       ` Julien Grall
  2015-05-01 12:56         ` Robert VanVossen
  0 siblings, 1 reply; 7+ messages in thread
From: Julien Grall @ 2015-05-01 12:55 UTC (permalink / raw)
  To: Ian Campbell, Robert VanVossen; +Cc: Julien Grall, xen-devel

Hi,

On 01/05/15 13:48, Ian Campbell wrote:
> On Wed, 2015-04-29 at 12:21 -0400, Robert VanVossen wrote:
>> This yields xen/xen/arch/arm/domain.c:208 which has the following line:
>>
>> WRITE_SYSREG32(n->arch.teecr, TEECR32_EL1);
> 
> This is in a "if ( is_32bit_domain(p->domain) && cpu_has_thumbee )"
> condition, so if it isn't a 32-bit model issue it might be a ThumbEE
> one?

Robert, can you confirm that you aren't using the QEMU models for Xilinx
ZynqMP? If not, based on Edgar's mail [1] I think it's not a bug in Xen.

Regards,

[1] http://lists.xen.org/archives/html/xen-devel/2015-04/msg03033.html

-- 
Julien Grall

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: 32-bit ARM guest on 64-bit ARM Xen
  2015-05-01 12:55       ` Julien Grall
@ 2015-05-01 12:56         ` Robert VanVossen
  0 siblings, 0 replies; 7+ messages in thread
From: Robert VanVossen @ 2015-05-01 12:56 UTC (permalink / raw)
  To: Julien Grall, Ian Campbell; +Cc: xen-devel

Hello,

On 5/1/2015 8:55 AM, Julien Grall wrote:
> Hi,
> 
> On 01/05/15 13:48, Ian Campbell wrote:
>> On Wed, 2015-04-29 at 12:21 -0400, Robert VanVossen wrote:
>>> This yields xen/xen/arch/arm/domain.c:208 which has the following line:
>>>
>>> WRITE_SYSREG32(n->arch.teecr, TEECR32_EL1);
>>
>> This is in a "if ( is_32bit_domain(p->domain) && cpu_has_thumbee )"
>> condition, so if it isn't a 32-bit model issue it might be a ThumbEE
>> one?
> 
> Robert, can you confirm that you aren't using the QEMU models for Xilinx
> ZynqMP? If not, based on Edgar's mail [1] I think it's not a bug in Xen.
> 

Yes, I am using the QEMU model for the Xilinx ZynqMP, so it does not appear to
be a bug in Xen.

Thank you for the help.

-Robbie VanVossen

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-05-01 12:58 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-28 19:14 32-bit ARM guest on 64-bit ARM Xen Robert VanVossen
2015-04-28 20:14 ` Julien Grall
2015-04-29 16:21   ` Robert VanVossen
2015-05-01 12:48     ` Ian Campbell
2015-05-01 12:55       ` Julien Grall
2015-05-01 12:56         ` Robert VanVossen
2015-04-28 23:50 ` Edgar E. Iglesias

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.