1. 02 11月, 2014 1 次提交
    • L
      well-defined listing order for machine types · 2709f263
      Laszlo Ersek 提交于
      Commit 261747f1 ("vl: Use MachineClass instead of global QEMUMachine
      list") broke the ordering of the machine types in the user-visible output
      of
      
        qemu-system-XXXX -M \?
      
      This occurred because registration was rebased from a manually maintained
      linked list to GLib hash tables:
      
        qemu_register_machine()
          type_register()
            type_register_internal()
              type_table_add()
                g_hash_table_insert()
      
      and because the listing was rebased accordingly, from the traversal of the
      list to the traversal of the hash table (rendered as an ad-hoc list):
      
        machine_parse()
          object_class_get_list(TYPE_MACHINE)
            object_class_foreach()
              g_hash_table_foreach()
      
      The current order is a "random" one, for practical purposes, which is
      annoying for users.
      
      Introduce new members QEMUMachine.family and MachineClass.family, allowing
      machine types to be "clustered". Introduce a comparator function that
      establishes a total ordering between machine types, ordering machine types
      in the same family next to each other. In machine_parse(), list the
      supported machine types sorted with the comparator function.
      
      The comparator function:
      - sorts whole families before standalone machine types,
      - sorts whole families between each other in alphabetically increasing
        order,
      - sorts machine types inside the same family in alphabetically decreasing
        order,
      - sorts standalone machine types between each other in alphabetically
        increasing order.
      
      After this patch, all machine types are considered standalone, and
      accordingly, the output is alphabetically ascending. This will be refined
      in the following patches.
      
      Effects on the x86_64 output:
      
      Before:
      
      > Supported machines are:
      > pc-0.13              Standard PC (i440FX + PIIX, 1996)
      > pc-i440fx-2.0        Standard PC (i440FX + PIIX, 1996)
      > pc-1.0               Standard PC (i440FX + PIIX, 1996)
      > pc-i440fx-2.1        Standard PC (i440FX + PIIX, 1996)
      > pc-q35-1.7           Standard PC (Q35 + ICH9, 2009)
      > pc-1.1               Standard PC (i440FX + PIIX, 1996)
      > pc-0.14              Standard PC (i440FX + PIIX, 1996)
      > pc-q35-2.0           Standard PC (Q35 + ICH9, 2009)
      > pc-i440fx-1.4        Standard PC (i440FX + PIIX, 1996)
      > pc-i440fx-1.5        Standard PC (i440FX + PIIX, 1996)
      > pc-0.15              Standard PC (i440FX + PIIX, 1996)
      > pc-q35-1.4           Standard PC (Q35 + ICH9, 2009)
      > isapc                ISA-only PC
      > pc                   Standard PC (i440FX + PIIX, 1996) (alias of pc-i440fx-2.2)
      > pc-i440fx-2.2        Standard PC (i440FX + PIIX, 1996) (default)
      > pc-1.2               Standard PC (i440FX + PIIX, 1996)
      > pc-0.10              Standard PC (i440FX + PIIX, 1996)
      > pc-0.11              Standard PC (i440FX + PIIX, 1996)
      > pc-q35-2.1           Standard PC (Q35 + ICH9, 2009)
      > q35                  Standard PC (Q35 + ICH9, 2009) (alias of pc-q35-2.2)
      > pc-q35-2.2           Standard PC (Q35 + ICH9, 2009)
      > pc-i440fx-1.6        Standard PC (i440FX + PIIX, 1996)
      > pc-i440fx-1.7        Standard PC (i440FX + PIIX, 1996)
      > none                 empty machine
      > pc-q35-1.5           Standard PC (Q35 + ICH9, 2009)
      > pc-q35-1.6           Standard PC (Q35 + ICH9, 2009)
      > pc-0.12              Standard PC (i440FX + PIIX, 1996)
      > pc-1.3               Standard PC (i440FX + PIIX, 1996)
      
      After:
      
      > Supported machines are:
      > isapc                ISA-only PC
      > none                 empty machine
      > pc-0.10              Standard PC (i440FX + PIIX, 1996)
      > pc-0.11              Standard PC (i440FX + PIIX, 1996)
      > pc-0.12              Standard PC (i440FX + PIIX, 1996)
      > pc-0.13              Standard PC (i440FX + PIIX, 1996)
      > pc-0.14              Standard PC (i440FX + PIIX, 1996)
      > pc-0.15              Standard PC (i440FX + PIIX, 1996)
      > pc-1.0               Standard PC (i440FX + PIIX, 1996)
      > pc-1.1               Standard PC (i440FX + PIIX, 1996)
      > pc-1.2               Standard PC (i440FX + PIIX, 1996)
      > pc-1.3               Standard PC (i440FX + PIIX, 1996)
      > pc-i440fx-1.4        Standard PC (i440FX + PIIX, 1996)
      > pc-i440fx-1.5        Standard PC (i440FX + PIIX, 1996)
      > pc-i440fx-1.6        Standard PC (i440FX + PIIX, 1996)
      > pc-i440fx-1.7        Standard PC (i440FX + PIIX, 1996)
      > pc-i440fx-2.0        Standard PC (i440FX + PIIX, 1996)
      > pc-i440fx-2.1        Standard PC (i440FX + PIIX, 1996)
      > pc                   Standard PC (i440FX + PIIX, 1996) (alias of pc-i440fx-2.2)
      > pc-i440fx-2.2        Standard PC (i440FX + PIIX, 1996) (default)
      > pc-q35-1.4           Standard PC (Q35 + ICH9, 2009)
      > pc-q35-1.5           Standard PC (Q35 + ICH9, 2009)
      > pc-q35-1.6           Standard PC (Q35 + ICH9, 2009)
      > pc-q35-1.7           Standard PC (Q35 + ICH9, 2009)
      > pc-q35-2.0           Standard PC (Q35 + ICH9, 2009)
      > pc-q35-2.1           Standard PC (Q35 + ICH9, 2009)
      > q35                  Standard PC (Q35 + ICH9, 2009) (alias of pc-q35-2.2)
      > pc-q35-2.2           Standard PC (Q35 + ICH9, 2009)
      
      Effects on the aarch64 output:
      
      Before:
      
      > Supported machines are:
      > lm3s811evb           Stellaris LM3S811EVB
      > canon-a1100          Canon PowerShot A1100 IS
      > vexpress-a15         ARM Versatile Express for Cortex-A15
      > vexpress-a9          ARM Versatile Express for Cortex-A9
      > xilinx-zynq-a9       Xilinx Zynq Platform Baseboard for Cortex-A9
      > connex               Gumstix Connex (PXA255)
      > n800                 Nokia N800 tablet aka. RX-34 (OMAP2420)
      > lm3s6965evb          Stellaris LM3S6965EVB
      > versatileab          ARM Versatile/AB (ARM926EJ-S)
      > borzoi               Borzoi PDA (PXA270)
      > tosa                 Tosa PDA (PXA255)
      > cheetah              Palm Tungsten|E aka. Cheetah PDA (OMAP310)
      > midway               Calxeda Midway (ECX-2000)
      > mainstone            Mainstone II (PXA27x)
      > n810                 Nokia N810 tablet aka. RX-44 (OMAP2420)
      > terrier              Terrier PDA (PXA270)
      > highbank             Calxeda Highbank (ECX-1000)
      > cubieboard           cubietech cubieboard
      > sx1-v1               Siemens SX1 (OMAP310) V1
      > sx1                  Siemens SX1 (OMAP310) V2
      > realview-eb-mpcore   ARM RealView Emulation Baseboard (ARM11MPCore)
      > kzm                  ARM KZM Emulation Baseboard (ARM1136)
      > akita                Akita PDA (PXA270)
      > z2                   Zipit Z2 (PXA27x)
      > musicpal             Marvell 88w8618 / MusicPal (ARM926EJ-S)
      > realview-pb-a8       ARM RealView Platform Baseboard for Cortex-A8
      > versatilepb          ARM Versatile/PB (ARM926EJ-S)
      > realview-eb          ARM RealView Emulation Baseboard (ARM926EJ-S)
      > realview-pbx-a9      ARM RealView Platform Baseboard Explore for Cortex-A9
      > spitz                Spitz PDA (PXA270)
      > none                 empty machine
      > virt                 ARM Virtual Machine
      > collie               Collie PDA (SA-1110)
      > smdkc210             Samsung SMDKC210 board (Exynos4210)
      > verdex               Gumstix Verdex (PXA270)
      > nuri                 Samsung NURI board (Exynos4210)
      > integratorcp         ARM Integrator/CP (ARM926EJ-S)
      
      After:
      
      > Supported machines are:
      > akita                Akita PDA (PXA270)
      > borzoi               Borzoi PDA (PXA270)
      > canon-a1100          Canon PowerShot A1100 IS
      > cheetah              Palm Tungsten|E aka. Cheetah PDA (OMAP310)
      > collie               Collie PDA (SA-1110)
      > connex               Gumstix Connex (PXA255)
      > cubieboard           cubietech cubieboard
      > highbank             Calxeda Highbank (ECX-1000)
      > integratorcp         ARM Integrator/CP (ARM926EJ-S)
      > kzm                  ARM KZM Emulation Baseboard (ARM1136)
      > lm3s6965evb          Stellaris LM3S6965EVB
      > lm3s811evb           Stellaris LM3S811EVB
      > mainstone            Mainstone II (PXA27x)
      > midway               Calxeda Midway (ECX-2000)
      > musicpal             Marvell 88w8618 / MusicPal (ARM926EJ-S)
      > n800                 Nokia N800 tablet aka. RX-34 (OMAP2420)
      > n810                 Nokia N810 tablet aka. RX-44 (OMAP2420)
      > none                 empty machine
      > nuri                 Samsung NURI board (Exynos4210)
      > realview-eb          ARM RealView Emulation Baseboard (ARM926EJ-S)
      > realview-eb-mpcore   ARM RealView Emulation Baseboard (ARM11MPCore)
      > realview-pb-a8       ARM RealView Platform Baseboard for Cortex-A8
      > realview-pbx-a9      ARM RealView Platform Baseboard Explore for Cortex-A9
      > smdkc210             Samsung SMDKC210 board (Exynos4210)
      > spitz                Spitz PDA (PXA270)
      > sx1                  Siemens SX1 (OMAP310) V2
      > sx1-v1               Siemens SX1 (OMAP310) V1
      > terrier              Terrier PDA (PXA270)
      > tosa                 Tosa PDA (PXA255)
      > verdex               Gumstix Verdex (PXA270)
      > versatileab          ARM Versatile/AB (ARM926EJ-S)
      > versatilepb          ARM Versatile/PB (ARM926EJ-S)
      > vexpress-a15         ARM Versatile Express for Cortex-A15
      > vexpress-a9          ARM Versatile Express for Cortex-A9
      > virt                 ARM Virtual Machine
      > xilinx-zynq-a9       Xilinx Zynq Platform Baseboard for Cortex-A9
      > z2                   Zipit Z2 (PXA27x)
      
      RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1145042Signed-off-by: NLaszlo Ersek <lersek@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com>
      Reviewed-by: NMarcel Apfelbaum <marcel.a@redhat.com>
      Acked-by: NDavid Gibson <david@gibson.dropbear.id.au>
      
      2709f263
  2. 27 10月, 2014 1 次提交
  3. 24 10月, 2014 1 次提交
  4. 15 10月, 2014 1 次提交
  5. 09 10月, 2014 1 次提交
  6. 04 10月, 2014 2 次提交
  7. 03 10月, 2014 2 次提交
    • J
      pc/vl: Add units-per-default-bus property · 16026518
      John Snow 提交于
      This patch adds the 'units_per_default_bus' property which
      allows individual boards to declare their desired
      index => (bus,unit) mapping for their default HBA, so that
      boards such as Q35 can specify that its default if_ide HBA,
      AHCI, only accepts one unit per bus.
      
      This property only overrides the mapping for drives matching
      the block_default_type interface.
      
      This patch also adds this property to *all* past and present
      Q35 machine types. This retroactive addition is justified
      because the previous erroneous index=>(bus,unit) mappings
      caused by lack of such a property were not utilized due to
      lack of initialization code in the Q35 init routine.
      
      Further, semantically, the Q35 board type has always had the
      property that its default HBA, AHCI, only accepts one unit per
      bus. The new code added to add devices to drives relies upon
      the accuracy of this mapping. Thus, the property is applied
      retroactively to reduce complexity of allowing IDE HBAs with
      different units per bus.
      
      Examples:
      
      Prior to this patch, all IDE HBAs were assumed to use 2 units
      per bus (Master, Slave). When using Q35 and AHCI, however, we
      only allow one unit per bus.
      
      -hdb foo.qcow2 would become index=1, or bus=0,unit=1.
      -hdd foo.qcow2 would become index=3, or bus=1,unit=1.
      -drive file=foo.qcow2,index=5 becomes bus=2,unit=1.
      
      These are invalid for AHCI. They now become, under Q35 only:
      
      -hdb foo.qcow2 --> index=1, bus=1, unit=0.
      -hdd foo.qcow2 --> index=3, bus=3, unit=0.
      -drive file=foo.qcow2,index=5 --> bus=5,unit=0.
      
      The mapping is adjusted based on the fact that the default IF
      for the Q35 machine type is IF_IDE, and units-per-default-bus
      overrides the IDE mapping from its default of 2 units per bus
      to just 1 unit per bus.
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Message-id: 1412187569-23452-4-git-send-email-jsnow@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      16026518
    • J
      blockdev: Orphaned drive search · a66c9dc7
      John Snow 提交于
      When users use command line options like -hda, -cdrom,
      or even -drive if=ide, it is up to the board initialization
      routines to pick up these drives and create backing
      devices for them.
      
      Some boards, like Q35, have not been doing this.
      However, there is no warning explaining why certain
      drive specifications are just silently ignored,
      so this function adds a check to print some warnings
      to assist users in debugging these sorts of issues
      in the future.
      
      This patch will not warn about drives added with if_none,
      for which it is not possible to tell in advance if
      the omission of a backing device is an issue.
      
      A warning in these cases is considered appropriate.
      Signed-off-by: NJohn Snow <jsnow@redhat.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      Message-id: 1412187569-23452-2-git-send-email-jsnow@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      a66c9dc7
  8. 30 9月, 2014 1 次提交
  9. 22 9月, 2014 1 次提交
    • C
      async: aio_context_new(): Handle event_notifier_init failure · 2f78e491
      Chrysostomos Nanakos 提交于
      On a system with a low limit of open files the initialization
      of the event notifier could fail and QEMU exits without printing any
      error information to the user.
      
      The problem can be easily reproduced by enforcing a low limit of open
      files and start QEMU with enough I/O threads to hit this limit.
      
      The same problem raises, without the creation of I/O threads, while
      QEMU initializes the main event loop by enforcing an even lower limit of
      open files.
      
      This commit adds an error message on failure:
      
       # qemu [...] -object iothread,id=iothread0 -object iothread,id=iothread1
       qemu: Failed to initialize event notifier: Too many open files in system
      Signed-off-by: NChrysostomos Nanakos <cnanakos@grnet.gr>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      2f78e491
  10. 20 9月, 2014 1 次提交
  11. 19 9月, 2014 1 次提交
  12. 11 9月, 2014 1 次提交
  13. 10 9月, 2014 1 次提交
  14. 04 9月, 2014 1 次提交
  15. 29 8月, 2014 1 次提交
  16. 26 8月, 2014 1 次提交
  17. 15 8月, 2014 2 次提交
  18. 06 8月, 2014 2 次提交
  19. 22 7月, 2014 1 次提交
  20. 18 7月, 2014 1 次提交
  21. 12 7月, 2014 1 次提交
  22. 01 7月, 2014 2 次提交
    • Y
      trace: add qemu_system_powerdown_request and qemu_system_shutdown_request trace events · bc78cff9
      Yang Zhiyong 提交于
      We have the experience that the guest doesn't stop successfully
      though it was instructed to shut down.
      
      The root cause may be not in QEMU mostly.  However, QEMU is often
      suspected at the beginning just because the issue occurred in
      virtualization environment.
      
      Therefore, we need to affirm that QEMU received the shutdown
      request and raised ACPI irq from "virsh shutdown" command,
      virt-manger or stopping QEMU process to the VM .
      So that we can affirm the problems was belonged to the Guset OS
      rather than the QEMU itself.
      
      When we stop guests by "virsh shutdown" command or virt-manger,
      or stopping QEMU process, qemu_system_powerdown_request() or
      qemu_system_shutdown_request() is called. Then the below functions
      in main_loop_should_exit() of Vl.c are called roughly in the
      following order.
      
      	if (qemu_powerdown_requested())
      		qemu_system_powerdown()
      			monitor_protocol_event(QEVENT_POWERDOWN, NULL)
      
      	OR
      
      	if(qemu_shutdown_requested()}
      		monitor_protocol_event(QEVENT_SHUTDOWN, NULL);
      
      The tracepoint of monitor_protocol_event() already exists, but no
      tracepoints are defined for qemu_system_powerdown_request() and
      qemu_system_shutdown_request(). So this patch adds two tracepoints for
      the two functions. We believe that it will become much easier to
      isolate the problem mentioned above by these tracepoints.
      Signed-off-by: NYang Zhiyong <yangzy.fnst@cn.fujitsu.com>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      bc78cff9
    • P
      memory: MemoryRegion: use /machine as default owner · b5c2c3d0
      Paolo Bonzini 提交于
      This will be added (after QOMification) as the QOM parent.
      Reviewed-by: NPeter Crosthwaite <peter.crosthwaite@xilinx.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      b5c2c3d0
  23. 29 6月, 2014 1 次提交
  24. 24 6月, 2014 1 次提交
  25. 23 6月, 2014 11 次提交