Hi Jan, On 04/06/2018 02:09 PM, Jan Kiszka wrote: > On 2018-04-06 13:33, Nikhil Devshatwar wrote: >> Hi all, >> >> I am writing a baremetal Jailhouse loader[1] on QEMU platform. >> Right now SGIs are not working between CPU cores (possibly some GIC >> config missing). >> > > Means we are talking about bare-metal code running directly in QEMU, no > Jailhouse involved at that point, right? Yes, at this point, no Jailhouse involved.
The point is, my psci-demo works fine on ARMv7 with a GICv2 (Jailhouse and bare-metal), but doesn't run on ARMv8 bare-metal (be it GICv2 or v3) but they work perfectly fine as jailhouse inmates on any architecture. Nikhil tried to enable jailhouse from bare-metal, and hit the same issue. His (as well as my code) is able to power up the CPU via PSCI, but SGIs don't arrive. Even the gic-demo doesn't work on ARMv8 bare-metal. The timer seems to be armed, but interrupts won't arrive. Pretty sure this is something ARMv8 related, but i still don't see what we miss here. Thanks Ralf > >> Also, I picked up the psci series from Ralf[2] which has a psci-demo to >> send SGIs from inmate. >> With the CONFIG_BARE_METAL, I am able to build this as a baremetal >> application. >> >> Even with baremetal psci-demo application, I am facing the same issue >> where the SGIs sent from one core do not fire interrupts on the other core. >> Ralf confirmed that the same application works on real platforms, but >> fails on QEMU. >> >> Is there anything specific that I need to do to enable SGIs **specially >> on QEMU**? >> >> My QEMU cmdline is https://pastebin.ubuntu.com/p/BrvyCm88dS/ >> >> Also, as part of my debug, I enabled QEMU traces for GICv3 for Linux >> kernel[3] >> >> Even after reverse engineering[4] the traces and adding the >> generated GIC config code[5] in the psci-demo, still no luck in getting >> SGIs working. >> >> I don't know somehow kernel is able to use SGIs but the baremetal app is >> not. >> Any help on this will be much appreciated. > > How do the traces of the non-working bare-metal SGI transmission differ > from those issued by Linux guests? > > And then I would use gdb on qemu, stepping through the SGI transmission > code to see where it branches differently under bare-metal workload. > Usually, this reveals rather quickly why QEMU decides not to deliver > some interrupt because of bit X having the wrong value or state Y not > being reached. > > Jan > >> >> [1] >> https://gist.github.com/nikhildevshatwar/e17121c1355422a61fddaa52615fc7a9 >> [2] https://github.com/lfd/jailhouse/tree/arm-psci >> [3] https://pastebin.ubuntu.com/p/jQKsshVJSp/ >> [4] https://pastebin.ubuntu.com/p/q7y64645v2/ >> [5] https://pastebin.ubuntu.com/p/RMwySvW4bK/ >> >> Thanks & Regards, >> Nikhil Devshatwar > -- 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]. For more options, visit https://groups.google.com/d/optout.
