On Thu, Mar 8, 2018 at 8:14 AM, Adam Lackorzynski <adam@os.inf.tu-dresden.de> wrote:

On Wed Mar 07, 2018 at 15:50:24 +0800, Zeyu Mi wrote:
> Sorry for bothering you again...
>
> I have changed to snapshot-17.09 and the "s" command works normally.
>
> I also disabled the VCPU thread model in the L4Linux config and it can be
> compiled
> without any error :)
>
> However, the L4Linux keeps reporting the following error message if running
> in QEMU.
>
> Non-resolvable page fault at b300b308, ip 6454e6.
> Page fault (non-resolved): pfa=b300b308 pc=6454e6
> Non-resolvable page fault at b300b308, ip 6454e6.
> Die message: Trap: 14
> Non-resolvable page fault at b300b308, ip 205390.
> Page fault (non-resolved): pfa=b300b308 pc=205390
> Non-resolvable page fault at b300b308, ip 205390.
> Die message: Trap: 14
>
> If running on the real hardware (a Skylake machine), it keeps reporting the
> following message.
>
> L4x: Main thread running, waiting...
> Die message: Trap: 6
> Die message: Trap: 6
> Die message: Trap: 6
> Die message: Trap: 6
> Die message: Trap: 6
> Die message: Trap: 6

That's strange. What are you running inside L4Linux?
What's also interesting is that on QEMU there are page-faults and on
hardware trap6.
For my setups, all looks fine.
Hi Adam,

I switched to snapshot-17.12, and turned off the VCPU thread model.
While this version works normally on QEMU (with -cpu host option, Skylake machine), it triggers
a general protection (trap 13) on the Skylake machine. The instruction triggering such fault is "XRSTORS64".
It is quite strange to see such phenomenon since the QEMU uses the Skylake CPU to run the system, which is
the same as the real hardware.

Therefore, I dived into the source code and found that the system chose different paths in "copy_kernel_to_xregs_booting"
funtion. This function has the following code snippet.

if (state_cpu_has(X86_FEATURE_XSAVES))
    XSTATE_OP(XRSTORS, xstate, lmask, hmask, err);
else
    XSTATE_OP(XRSTOR, xstate, lmask, hmask, err);

If running in QEMU, the system chose the else branch. But it chose the if branch if running in hardware. 

Do you have any suggestion on fixing that?
 

> > BTW, is it possible to enable the previous thread model and SMP in the
> > L4Linux simultaneously?

Not really as this has some issues, it might work (with hickups).



Adam

_______________________________________________
l4-hackers mailing list
l4-hackers@os.inf.tu-dresden.de
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers



--
Best Regards

Zeyu Mi (糜泽羽)
Institute of Parallel and Distributed Systems (IPADS),
School of Software,
Shanghai Jiao Tong University