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.