mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 01:03:55 -06:00
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:
parent
459ae5ea5a
commit
93bfef4c6e
19 changed files with 62 additions and 25 deletions
|
@ -57,7 +57,7 @@ enum {
|
|||
};
|
||||
|
||||
static const USBDescStrings desc_strings = {
|
||||
[STR_MANUFACTURER] = "QEMU " QEMU_VERSION,
|
||||
[STR_MANUFACTURER] = "QEMU",
|
||||
[STR_SERIALNUMBER] = "1",
|
||||
};
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@ enum {
|
|||
};
|
||||
|
||||
static const USBDescStrings desc_strings = {
|
||||
[STR_MANUFACTURER] = "QEMU " QEMU_VERSION,
|
||||
[STR_MANUFACTURER] = "QEMU",
|
||||
[STR_PRODUCT_MOUSE] = "QEMU USB Mouse",
|
||||
[STR_PRODUCT_TABLET] = "QEMU USB Tablet",
|
||||
[STR_PRODUCT_KEYBOARD] = "QEMU USB Keyboard",
|
||||
|
|
|
@ -90,7 +90,7 @@ enum {
|
|||
};
|
||||
|
||||
static const USBDescStrings desc_strings = {
|
||||
[STR_MANUFACTURER] = "QEMU " QEMU_VERSION,
|
||||
[STR_MANUFACTURER] = "QEMU",
|
||||
[STR_PRODUCT] = "QEMU USB Hub",
|
||||
[STR_SERIALNUMBER] = "314159",
|
||||
};
|
||||
|
|
|
@ -111,7 +111,7 @@ enum {
|
|||
};
|
||||
|
||||
static const USBDescStrings desc_strings = {
|
||||
[STR_MANUFACTURER] = "QEMU " QEMU_VERSION,
|
||||
[STR_MANUFACTURER] = "QEMU",
|
||||
[STR_PRODUCT_SERIAL] = "QEMU USB SERIAL",
|
||||
[STR_PRODUCT_BRAILLE] = "QEMU USB BRAILLE",
|
||||
[STR_SERIALNUMBER] = "1",
|
||||
|
|
|
@ -81,7 +81,7 @@ do { \
|
|||
#define CCID_CONTROL_GET_DATA_RATES 0x3
|
||||
|
||||
#define CCID_PRODUCT_DESCRIPTION "QEMU USB CCID"
|
||||
#define CCID_VENDOR_DESCRIPTION "QEMU " QEMU_VERSION
|
||||
#define CCID_VENDOR_DESCRIPTION "QEMU"
|
||||
#define CCID_INTERFACE_NAME "CCID Interface"
|
||||
#define CCID_SERIAL_NUMBER_STRING "1"
|
||||
/*
|
||||
|
@ -401,7 +401,7 @@ enum {
|
|||
};
|
||||
|
||||
static const USBDescStrings desc_strings = {
|
||||
[STR_MANUFACTURER] = "QEMU " QEMU_VERSION,
|
||||
[STR_MANUFACTURER] = "QEMU",
|
||||
[STR_PRODUCT] = "QEMU USB CCID",
|
||||
[STR_SERIALNUMBER] = "1",
|
||||
[STR_INTERFACE] = "CCID Interface",
|
||||
|
|
|
@ -81,7 +81,7 @@ enum {
|
|||
};
|
||||
|
||||
static const USBDescStrings desc_strings = {
|
||||
[STR_MANUFACTURER] = "QEMU " QEMU_VERSION,
|
||||
[STR_MANUFACTURER] = "QEMU",
|
||||
[STR_PRODUCT] = "QEMU USB HARDDRIVE",
|
||||
[STR_SERIALNUMBER] = "1",
|
||||
[STR_CONFIG_FULL] = "Full speed config (usb 1.1)",
|
||||
|
|
|
@ -62,7 +62,7 @@ enum {
|
|||
};
|
||||
|
||||
static const USBDescStrings desc_strings = {
|
||||
[STR_MANUFACTURER] = "QEMU " QEMU_VERSION,
|
||||
[STR_MANUFACTURER] = "QEMU",
|
||||
[STR_PRODUCT] = "Wacom PenPartner",
|
||||
[STR_SERIALNUMBER] = "1",
|
||||
};
|
||||
|
|
|
@ -143,8 +143,6 @@ static void usbredir_interrupt_packet(void *priv, uint32_t id,
|
|||
static int usbredir_handle_status(USBRedirDevice *dev,
|
||||
int status, int actual_len);
|
||||
|
||||
#define VERSION "qemu usb-redir guest " QEMU_VERSION
|
||||
|
||||
/*
|
||||
* Logging stuff
|
||||
*/
|
||||
|
@ -794,6 +792,10 @@ static void usbredir_open_close_bh(void *opaque)
|
|||
{
|
||||
USBRedirDevice *dev = opaque;
|
||||
uint32_t caps[USB_REDIR_CAPS_SIZE] = { 0, };
|
||||
char version[32];
|
||||
|
||||
strcpy(version, "qemu usb-redir guest ");
|
||||
pstrcat(version, sizeof(version), qemu_get_version());
|
||||
|
||||
usbredir_device_disconnect(dev);
|
||||
|
||||
|
@ -828,7 +830,7 @@ static void usbredir_open_close_bh(void *opaque)
|
|||
|
||||
usbredirparser_caps_set_cap(caps, usb_redir_cap_connect_device_version);
|
||||
usbredirparser_caps_set_cap(caps, usb_redir_cap_filter);
|
||||
usbredirparser_init(dev->parser, VERSION, caps, USB_REDIR_CAPS_SIZE, 0);
|
||||
usbredirparser_init(dev->parser, version, caps, USB_REDIR_CAPS_SIZE, 0);
|
||||
usbredirparser_do_write(dev->parser);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue