diff options
author | Marcel Apfelbaum <marcel@redhat.com> | 2015-01-06 15:29:12 +0200 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2015-01-07 16:16:28 +0100 |
commit | c760dbb9dc4dfceeb5d4ae07876b10da58d4c630 (patch) | |
tree | 8a33322d82a8fc6242993ba44a6dacbeae48ba3c /hw/ppc/spapr.c | |
parent | 2f285bdd54bb2ff25a213b3b77e9bf46f4306320 (diff) | |
download | qemu-c760dbb9dc4dfceeb5d4ae07876b10da58d4c630.tar.gz qemu-c760dbb9dc4dfceeb5d4ae07876b10da58d4c630.tar.bz2 qemu-c760dbb9dc4dfceeb5d4ae07876b10da58d4c630.zip |
hw/ppc: modified the condition for usb controllers to be created for some ppc machines
Some ppc machines create a default usb controller based on a 'machine condition'.
Until now the logic was: create the usb controller if:
- the usb option was supplied in cli and value is true or
- the usb option was absent and both set_defaults and the machine
condition were true.
Modified the logic to:
Create the usb controller if:
- the machine condition is true and defaults are enabled or
- the usb option is supplied and true.
The main for this is to simplify the usb_enabled method.
Signed-off-by: Marcel Apfelbaum <marcel@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'hw/ppc/spapr.c')
-rw-r--r-- | hw/ppc/spapr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 2850624942..2b2cc0cfc7 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -1530,7 +1530,7 @@ static void ppc_spapr_init(MachineState *machine) spapr->has_graphics = true; } - if (usb_enabled(spapr->has_graphics)) { + if ((spapr->has_graphics && defaults_enabled()) || usb_enabled(false)) { pci_create_simple(phb->bus, -1, "pci-ohci"); if (spapr->has_graphics) { usbdevice_create("keyboard"); |