From: Piotras <piotras@gmail.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] loadvm not working
Date: Thu, 25 Sep 2008 21:07:24 +0100 [thread overview]
Message-ID: <da6318370809251307g301de870q2180840762953e2f@mail.gmail.com> (raw)
Hi,
I discovered a bug that prevents loadvm from working correctly
in current repository version (related to warning "qemu: warning:
instance 0 of device '' not present in current VM").
The implementation of functions qemu_get_be16 and qemu_get_be32
(in file vl.c) relies on implicit conversion of signed byte
(int8_t) values returned by qemu_get_byte to multi-byte integer
types. When value to be converted is negative, the result is
incorrect.
There are two fixes possible:
1) change return type of qemu_get_byte to unsigned (uint8_t)
2) add explicit casts in qemu_get_be16 and qemu_get_be32
For consistency with qemu_get_be16 and qemu_get_be32, first
solution looks better. However I didn't examine all other calls
to qemu_get_byte for possible problems.
Hope this helps,
Piotr
next reply other threads:[~2008-09-25 20:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-25 20:07 Piotras [this message]
2008-09-25 20:20 ` [Qemu-devel] loadvm not working Anthony Liguori
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=da6318370809251307g301de870q2180840762953e2f@mail.gmail.com \
--to=piotras@gmail.com \
--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).