1. 10 6月, 2015 1 次提交
  2. 25 3月, 2015 1 次提交
    • G
      fw_cfg: factor out initialization of FW_CFG_ID (rev. number) · 3a5c76ba
      Gabriel L. Somlo 提交于
      The fw_cfg documentation says this of the revision key (0x0001, FW_CFG_ID):
      
      > A 32-bit little-endian unsigned int, this item is used as an interface
      > revision number, and is currently set to 1 by all QEMU architectures
      > which expose a fw_cfg device.
      
      arm/virt doesn't.  It could be argued that that's an error in
      "hw/arm/virt.c"; on the other hand, all of the other fw_cfg providing
      boards set the interface version to 1 manually, despite the device
      coming from the same, shared implementation. Therefore, instead of
      adding
      
          fw_cfg_add_i32(fw_cfg, FW_CFG_ID, 1);
      
      to arm/virt, consolidate all such existing calls in the fw_cfg
      initialization code.
      Signed-off-by: NGabriel Somlo <somlo@cmu.edu>
      Message-Id: <1426789244-26318-1-git-send-email-somlo@cmu.edu>
      Reviewed-by: NLaszlo Ersek <lersek@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      3a5c76ba
  3. 10 3月, 2015 3 次提交
  4. 24 2月, 2015 2 次提交
  5. 13 2月, 2015 1 次提交
  6. 23 12月, 2014 1 次提交
  7. 22 12月, 2014 1 次提交
  8. 20 10月, 2014 1 次提交
    • M
      hw: Convert from BlockDriverState to BlockBackend, mostly · 4be74634
      Markus Armbruster 提交于
      Device models should access their block backends only through the
      block-backend.h API.  Convert them, and drop direct includes of
      inappropriate headers.
      
      Just four uses of BlockDriverState are left:
      
      * The Xen paravirtual block device backend (xen_disk.c) opens images
        itself when set up via xenbus, bypassing blockdev.c.  I figure it
        should go through qmp_blockdev_add() instead.
      
      * Device model "usb-storage" prompts for keys.  No other device model
        does, and this one probably shouldn't do it, either.
      
      * ide_issue_trim_cb() uses bdrv_aio_discard() instead of
        blk_aio_discard() because it fishes its backend out of a BlockAIOCB,
        which has only the BlockDriverState.
      
      * PC87312State has an unused BlockDriverState[] member.
      
      The next two commits take care of the latter two.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NMax Reitz <mreitz@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      4be74634
  9. 03 10月, 2014 1 次提交
    • J
      ide: Update ide_drive_get to be HBA agnostic · d8f94e1b
      John Snow 提交于
      Instead of duplicating the logic for the if_ide
      (bus,unit) mappings, rely on the blockdev layer
      for managing those mappings for us, and use the
      drive_get_by_index call instead.
      
      This allows ide_drive_get to work for AHCI HBAs
      as well, and can be used in the Q35 initialization.
      
      Lastly, change the nature of the argument to
      ide_drive_get so that represents the number of
      total drives we can support, and not the total
      number of buses. This will prevent array overflows
      if the units-per-default-bus property ever needs
      to be adjusted for compatibility reasons.
      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-5-git-send-email-jsnow@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      d8f94e1b
  10. 09 9月, 2014 1 次提交
  11. 17 8月, 2014 1 次提交
    • M
      sun4u: switch second PCI-ebus bridge BAR over to PCI IO space · a1cf8be5
      Mark Cave-Ayland 提交于
      The ebus is the sun4u equivalent of the old ISA bus which is already mapped at
      the beginning of PCI IO space within QEMU. NetBSD attempts to find the physical
      addresses of devices connected to the ebus by parsing the BARs of the PCI-ebus
      bridge and using the base address found by matching both the address space
      type and range for a particular ebus address.
      
      Since the second PCI-ebus bridge BAR is already aliased onto IO space, switch
      the BAR over to match and reduce the size to 0x1000 which is enough to cover
      all the legacy ioport devices whilst leaving the remaining IO space for other
      PCI devices. This allows NetBSD SPARC64 to correctly detect and access devices
      on the ebus.
      Signed-off-by: NMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
      a1cf8be5
  12. 28 5月, 2014 1 次提交
  13. 28 8月, 2013 1 次提交
    • M
      hw: Clean up bogus default boot order · c1654732
      Markus Armbruster 提交于
      We set default boot order "cad" in every single machine definition
      except "pseries" and "moxiesim", even though very few boards actually
      care for boot order, and "cad" makes sense for even fewer.
      
      Machines that care:
      
      * pc and its variants
      
        Accept up to three letters 'a', 'b' (undocumented alias for 'a'),
        'c', 'd' and 'n'.  Reject all others (fatal with -boot).
      
      * nseries (n800, n810)
      
        Check whether order starts with 'n'.  Silently ignored otherwise.
      
      * prep, g3beige, mac99
      
        Extract the first character the machine understands (subset of
        'a'..'f').  Silently ignored otherwise.
      
      * spapr
      
        Accept an arbitrary string (vl.c restricts it to contain only
        'a'..'p', no duplicates).
      
      * sun4[mdc]
      
        Use the first character.  Silently ignored otherwise.
      
      Strip characters these machines ignore from their default boot order.
      
      For all other machines, remove the unused default boot order
      alltogether.
      
      Note that my rename of QEMUMachine member boot_order to
      default_boot_order and QEMUMachineInitArgs member boot_device to
      boot_order has a welcome side effect: it makes every use of boot
      orders visible in this patch, for easy review.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NLaszlo Ersek <lersek@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      c1654732
  14. 23 8月, 2013 2 次提交
  15. 22 8月, 2013 1 次提交
  16. 30 7月, 2013 2 次提交
  17. 25 7月, 2013 1 次提交
  18. 08 7月, 2013 1 次提交
    • D
      pci: Add root bus parameter to pci_nic_init() · 29b358f9
      David Gibson 提交于
      At present, pci_nic_init() and pci_nic_init_nofail() assume that they will
      only create a NIC under the primary PCI root.  As we add support for
      multiple PCI roots, that may no longer be the case.  This patch adds a root
      bus parameter to pci_nic_init() (and updates callers accordingly) to allow
      the machine init code using it to specify the right PCI root for NICs
      created by old-style -net nic parameters.  NICs created new-style, with
      -device can of course be put anywhere.
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      29b358f9
  19. 04 7月, 2013 2 次提交
  20. 07 6月, 2013 1 次提交
  21. 02 6月, 2013 2 次提交
  22. 27 4月, 2013 1 次提交
  23. 09 4月, 2013 1 次提交
    • P
      hw: move headers to include/ · 0d09e41a
      Paolo Bonzini 提交于
      Many of these should be cleaned up with proper qdev-/QOM-ification.
      Right now there are many catch-all headers in include/hw/ARCH depending
      on cpu.h, and this makes it necessary to compile these files per-target.
      However, fixing this does not belong in these patches.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      0d09e41a
  24. 12 3月, 2013 3 次提交
  25. 01 3月, 2013 2 次提交
  26. 27 1月, 2013 1 次提交
  27. 22 1月, 2013 1 次提交
  28. 19 1月, 2013 1 次提交
  29. 16 1月, 2013 1 次提交
  30. 11 1月, 2013 1 次提交
    • A
      Make all static TypeInfos const · 8c43a6f0
      Andreas Färber 提交于
      Since 39bffca2 (qdev: register all
      types natively through QEMU Object Model), TypeInfo as used in
      the common, non-iterative pattern is no longer amended with information
      and should therefore be const.
      
      Fix the documented QOM examples:
      
       sed -i 's/static TypeInfo/static const TypeInfo/g' include/qom/object.h
      
      Since frequently the wrong examples are being copied by contributors of
      new devices, fix all types in the tree:
      
       sed -i 's/^static TypeInfo/static const TypeInfo/g' */*.c
       sed -i 's/^static TypeInfo/static const TypeInfo/g' */*/*.c
      
      This also avoids to piggy-back these changes onto real functional
      changes or other refactorings.
      Signed-off-by: NAndreas Färber <afaerber@suse.de>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      8c43a6f0