qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] target-i386: Fix eflags.TF/#DB handling of sysc


From: Doug Evans
Subject: Re: [Qemu-devel] [PATCH] target-i386: Fix eflags.TF/#DB handling of syscall/sysret insns
Date: Mon, 12 Dec 2016 11:23:46 -0800

On Tue, Dec 6, 2016 at 3:06 PM, Doug Evans <address@hidden> wrote:
> Hi.
>
> While qemu's behaviour matches what one would expect from reading
> the docs, it does not match what I'm seeing on h/w.
> Can anyone else confirm what the correct behaviour is here?
>
> ---
>
> The syscall and sysret instructions behave a bit differently:
> TF is checked after the instruction completes.
> This allows the o/s to disable #DB at a syscall by adding TF to FMASK.
> And then when the sysret is executed the #DB is taken "as if" the
> syscall insn just completed.
>
> Signed-off-by: Doug Evans <address@hidden>

Ping.
Especially, can anyone confirm the correct behaviour here?

I can provide a testcase with Fuchsia if one likes.
https://fuchsia.googlesource.com/fuchsia/
It's not that hard to repro - we trip over it because we don't have a #DB IST
and since SYSCALL doesn't change SP we get a double fault on qemu
trying to establish the interrupt frame for the #DB (whereas the #DB shouldn't
happen in the first place - at least when run on the h/w I'm using).
The Intel/AMD docs are *really* unclear on this AFAICT.

patchwork reference: http://patchwork.ozlabs.org/patch/703373/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]