Allow machines to configure the QEMU_VERSION that's exposed via hardware

QEMU exposes its version to the guest's hardware and in some cases that is wrong
(e.g. Windows prints messages about driver updates when you switch
the QEMU version).
There is a new field now on the struct QEmuMachine, hw_version, which may
contain the version that the specific machine should report. If that field is
set, then that machine will report that version to the guest.

Signed-off-by: Crístian Viana <vianac@linux.vnet.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
Crístian Viana 2012-05-30 00:35:51 -03:00 committed by Anthony Liguori
parent 459ae5ea5a
commit 93bfef4c6e
19 changed files with 62 additions and 25 deletions

11
osdep.c
View file

@ -48,6 +48,8 @@ extern int madvise(caddr_t, size_t, int);
#include "trace.h"
#include "qemu_socket.h"
static const char *qemu_version = QEMU_VERSION;
int socket_set_cork(int fd, int v)
{
#if defined(SOL_TCP) && defined(TCP_CORK)
@ -242,3 +244,12 @@ ssize_t qemu_recv_full(int fd, void *buf, size_t count, int flags)
return total;
}
void qemu_set_version(const char *version)
{
qemu_version = version;
}
const char *qemu_get_version(void)
{
return qemu_version;
}