qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Resume Flag support on i386/x86_64?
@ 2009-02-17  8:27 Alex Smith
  2009-02-17  9:18 ` [Qemu-devel] " Jan Kiszka
  0 siblings, 1 reply; 3+ messages in thread
From: Alex Smith @ 2009-02-17  8:27 UTC (permalink / raw)
  To: qemu-devel

Hi,

Recently support for hardware breakpoint support on i386/x86_64 was
added (revision 5747 -
http://lists.gnu.org/archive/html/qemu-devel/2008-11/msg01025.html).
I've been using hardware breakpoints while writing a debugger for my
hobby OS kernel, however I've discovered that despite support being
added for them in QEMU, the Resume Flag (bit 16 in EFLAGS) is not
supported. When this flag is set on return from an interrupt, the CPU
should ignore instruction breakpoints for the next instruction, and
then clear the flag after checking for breakpoints (there's a
description on page 18-10 of the Intel Software Developer's Manual
Volume 3B).

Would it be possible to implement support for this?

Thanks,
Alex

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Qemu-devel] Re: Resume Flag support on i386/x86_64?
  2009-02-17  8:27 [Qemu-devel] Resume Flag support on i386/x86_64? Alex Smith
@ 2009-02-17  9:18 ` Jan Kiszka
  2009-02-17  9:39   ` Alex Smith
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Kiszka @ 2009-02-17  9:18 UTC (permalink / raw)
  To: qemu-devel

Alex Smith wrote:
> Hi,
> 
> Recently support for hardware breakpoint support on i386/x86_64 was
> added (revision 5747 -
> http://lists.gnu.org/archive/html/qemu-devel/2008-11/msg01025.html).
> I've been using hardware breakpoints while writing a debugger for my
> hobby OS kernel, however I've discovered that despite support being
> added for them in QEMU, the Resume Flag (bit 16 in EFLAGS) is not
> supported. When this flag is set on return from an interrupt, the CPU
> should ignore instruction breakpoints for the next instruction, and
> then clear the flag after checking for breakpoints (there's a
> description on page 18-10 of the Intel Software Developer's Manual
> Volume 3B).

Mmh, guess I missed this...

> 
> Would it be possible to implement support for this?

I think so. Will take some fiddling within the code generator, will see
what I can do, but you have to be patient (long to-do list...) -- or
look into this on your own. ;)

Well, in the meantime you may also find a correct behavior by running
qemu in kvm mode because then the real hardware is used, and that should
already work as expected.

Jan

-- 
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] Re: Resume Flag support on i386/x86_64?
  2009-02-17  9:18 ` [Qemu-devel] " Jan Kiszka
@ 2009-02-17  9:39   ` Alex Smith
  0 siblings, 0 replies; 3+ messages in thread
From: Alex Smith @ 2009-02-17  9:39 UTC (permalink / raw)
  To: qemu-devel

2009/2/17 Jan Kiszka <jan.kiszka@siemens.com>:
> I think so. Will take some fiddling within the code generator, will see
> what I can do, but you have to be patient (long to-do list...) -- or
> look into this on your own. ;)
>
> Well, in the meantime you may also find a correct behavior by running
> qemu in kvm mode because then the real hardware is used, and that should
> already work as expected.

Ok, I'll look into that. Waiting is OK - For now I've done a quick
hack in my debugger that emulates the resume flag behaviour using
single-stepping (disable breakpoint, step one instruction, reenable
and continue).

Thanks,
Alex

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-02-17  9:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-17  8:27 [Qemu-devel] Resume Flag support on i386/x86_64? Alex Smith
2009-02-17  9:18 ` [Qemu-devel] " Jan Kiszka
2009-02-17  9:39   ` Alex Smith

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).