From: Bas Wijnen <wijnen@debian.org>
To: qemu-devel@nongnu.org
Cc: 419369-forwarded@bugs.debian.org,
418036-forwarded@bugs.debian.org,
426781-forwarded@bugs.debian.org
Subject: [Qemu-devel] Bug report
Date: Mon, 17 Dec 2007 14:48:20 +0100 [thread overview]
Message-ID: <20071217134820.GA515@pcbcn10.phys.rug.nl> (raw)
[-- Attachment #1: Type: text/plain, Size: 2730 bytes --]
Hi,
While writing a kernel and testing it with qemu, I found some bugs in
qemu (and many in my kernel ;-) ). Here's a list of them. They are all
about x86 emulation on x86. Some are a bit old, and since my kernel is
now fixed I can't easily test if they still aren't fixed, though.
- When a protection level 0 process returns with iret to a pl3 process,
and the segment registers (other than cs and ss) are set to values
that shouldn't be usable by pl3, real hardware will hang (if there's
no gpf handler) when they are used. However qemu doesn't seem to have
a problem with it at all.
- Qemu initializes all its memory to 0. Real hardware doesn't seem to
do that. This means that usage of uninitialized memory is very hard
to debug (because 0 is often a good value, while [random] is not, so
the problem can only be seen on real hardware, which makes it hard to
debug).
- The timing of the ports are impossibly fast. When writing a byte to a
serial port and immediately asking if the send buffer is empty, it
says it is. This means that code which only runs when waiting for
data to be transmitted will never get tested in qemu, because it is
never "waiting". The same is at least true for the keyboard, I
suppose for other devices as well.
- The system timer (irq 0) runs on real-time, not on emulated time.
This means that the behaviour of programs may differ between machines,
and that sending a test case to someone else may not work.r
For example, if I write (too) much output to the serial port in the
irq0 handler, the cpu never exits the handler (that is, it reenters
when it's about to exit). However, when redirecting the serial port
output from screen into a file (it's going to stdout), the machine
suddenly does execute programs other than the irq handler.
That's all (so far). I can imagine that it is not always desirable to
emulate these things "right", for example with the timing: it's more
important that the emulated machine behaves properly, for example when
it plays music, than that it is reproducible. However, I think
reproducibility would be a nice feature as well. Perhaps it would be
better to add it via a commandline option.
Thanks,
Bas Wijnen
Ps: Please CC me, I'm not subscribed to the list.
--
I encourage people to send encrypted e-mail (see http://www.gnupg.org).
If you have problems reading my e-mail, use a better reader.
Please send the central message of e-mails as plain text
in the message body, not as HTML and definitely not as MS Word.
Please do not use the MS Word format for attachments either.
For more information, see http://pcbcn10.phys.rug.nl/e-mail.html
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next reply other threads:[~2007-12-17 13:48 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-17 13:48 Bas Wijnen [this message]
2007-12-18 16:52 ` [Qemu-devel] Bug report Paul Brook
2007-12-19 1:11 ` Bas Wijnen
-- strict thread matches above, loose matches on Subject: below --
2013-10-06 16:55 [Qemu-devel] bug report Peter Cheung
2009-01-11 12:07 Artem Kozarezov
2006-12-03 16:40 [Qemu-devel] Bug report Mike Smith
2005-11-01 23:48 Julien Lancien
2005-11-01 23:57 ` Mike Kronenberg
2005-11-02 0:00 ` Karl Magdsick
[not found] ` <e1843770511011607m1cda6256o37102cf17cc75fea@mail.gmail.com>
2005-11-02 0:08 ` Julien Lancien
2005-11-02 0:42 ` Jim C. Brown
2005-11-02 0:20 ` Philip Machanick
2005-11-02 7:03 ` Gwenole Beauchesne
2004-04-11 15:04 J. Mayer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071217134820.GA515@pcbcn10.phys.rug.nl \
--to=wijnen@debian.org \
--cc=418036-forwarded@bugs.debian.org \
--cc=419369-forwarded@bugs.debian.org \
--cc=426781-forwarded@bugs.debian.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).