On 22.07.19 09:19, von Wiarda, Jan wrote:
> Hi all,
> 
> we implemented support for Jailhouse 32 bit inmates running on 64-bit 
> Jailhouse on the i.MX 8M Mini and it works fine, GIC demo runs without 
> problems. Now I have one problem, that just 

Cool! Could you share patches already? Most - if not all - of that should be
board-independent and would add value to other setups.

> occurred. I'm trying to get the ivshmem demo running in 32 bit and it does 
> work until it comes to the line
> 
> asm volatile("wfi" : : : "memory");
> 
> When I give the inmate CPUs 1-3 in 32 bit mode and the inmate accesses this 
> line, the 64 bit inmate CPU 0 crashes. If I comment this line out
> 
> //asm volatile("wfi" : : : "memory");
> 
> both 64 bit root cell and 32 bit inmate run just fine. Now apparently the 64 
> bit Jailhouse Hypervisor has a problem with WFI beeing executed by a 32 bit 
> inmate, as with a 64 bit inmate there is no problem. Is there an explanation 
> for this behaviour? I guess I will now have to handle the WFI exception. How 
> do I know the inmate is exiting because of a WFI, all exits I see are these:
> 
> #define ESR_EC_SMC64                  0x17
> #define ESR_EC_SYS64                  0x18
> #define ESR_EC_DABT_LOW                       0x24
> 
> In the ARMv8 manual it says, ESR_EL2 has an EC == 0b000001, that traps WFI 
> and WFE and there is a define
> 
> #define  HSR_EC_WFI           0x01
> 
> but it's not used and it's for AArch32 only. Now I wonder, what's the best 
> way to handle this?

I'm not into the arch details by heart and would have to read them up first.
Maybe someone with more background is reading this and can jump in.

One thing that comes to my mind, though: Can you reproduce this issue in the
QEMU setup as well? That may give more insights into what the hardware is doing
here and what is considered problematic by it.

Jan

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux

-- 
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jailhouse-dev/c5030c63-c5d7-e64e-63cf-91ff69638f0e%40siemens.com.

Reply via email to