From 60e13b489f488968301e739d6172d8eea0d77ed2 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Mon, 2 Sep 2013 13:26:16 +0200 Subject: [PATCH 083/212] rhel6 compat: usb serial numbers RH-Author: Gerd Hoffmann Message-id: <1378128376-25930-3-git-send-email-kraxel@redhat.com> Patchwork-id: 53987 O-Subject: [RHEL-7 qemu-kvm PATCH 2/2] rhel6 compat: usb serial numbers Bugzilla: 953304 RH-Acked-by: Markus Armbruster RH-Acked-by: Hans de Goede RH-Acked-by: Paolo Bonzini Add serial number compat properties to the rhel6 machine types, to match rhel6 behavior. Two things we have to watch out here: First the HID devices flipped serial from "1" to "42" to indicate remote wakeup capability, in RHEL-6.2. rhel6 commit 85ae0a096fdbc4a6f5a660bf60a74c092f9c0f7a Second devices get unique serial numbers, by appending host adapter pci address and port path, in RHEL-6.4, for usb-hub and usb-storage. Also usb-net + usb-serial + usb-wacom, but those are disabled in RHEL. rhel6 commit e91156bc452250291f72b82b43654540be7101be usb-ccid has a unique serial in RHEL-7 but not in RHEL-6, so we need a compat property for all RHEL-6.x machine types. bugzilla: 953304 Signed-off-by: Gerd Hoffmann --- hw/i386/pc_piix.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) Signed-off-by: Miroslav Rezanina --- hw/i386/pc_piix.c | 24 ++++++++++++++++++++++++ 1 files changed, 24 insertions(+), 0 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 1d06c76..950cfc2 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -1023,6 +1023,10 @@ static QEMUMachine pc_machine_rhel700 = { .driver = "486-" TYPE_X86_CPU,\ .property = "level",\ .value = stringify(0),\ + },{\ + .driver = "usb-ccid",\ + .property = "serial",\ + .value = "1",\ } static void pc_init_rhel650(MachineState *machine) @@ -1121,6 +1125,14 @@ static QEMUMachine pc_machine_rhel640 = { .driver = TYPE_X86_CPU,\ .property = "pmu",\ .value = "on",\ + },{\ + .driver = "usb-hub",\ + .property = "serial",\ + .value = "314159",\ + },{\ + .driver = "usb-storage",\ + .property = "serial",\ + .value = "1",\ } static void pc_init_rhel630(MachineState *machine) @@ -1203,6 +1215,18 @@ static QEMUMachine pc_machine_rhel620 = { .driver = "virtio-balloon-pci",\ .property = "event_idx",\ .value = "off",\ + },{\ + .driver = "usb-kbd",\ + .property = "serial",\ + .value = "1",\ + },{\ + .driver = "usb-mouse",\ + .property = "serial",\ + .value = "1",\ + },{\ + .driver = "usb-tablet",\ + .property = "serial",\ + .value = "1",\ } static void pc_init_rhel610(MachineState *machine) -- 1.7.1