target-i386: Fix eflags.TF/#DB handling of syscall/sysret insns
commitc52ab08aee6f7d4717fc6b517174043126bd302f
authorDoug Evans <dje@google.com>
Tue, 6 Dec 2016 23:06:30 +0000 (6 23:06 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 22 Dec 2016 15:01:04 +0000 (22 16:01 +0100)
tree59715b2881805e60a3e12b49083c08faba7efaff
parent6053a86fe7bd3d5b07b49dae6c05f2cd0d44e687
target-i386: Fix eflags.TF/#DB handling of syscall/sysret insns

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 <dje@google.com>
Message-Id: <94eb2c0bfa1c6a9fec0543057483@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
target/i386/bpt_helper.c
target/i386/helper.h
target/i386/translate.c