1. 02 11月, 2014 5 次提交
  2. 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
  3. 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
  4. 25 8月, 2014 1 次提交
  5. 14 8月, 2014 2 次提交
  6. 01 8月, 2014 1 次提交
  7. 29 7月, 2014 2 次提交
    • M
      piix: set legacy table size for 1.7 · f47337cb
      Michael S. Tsirkin 提交于
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      f47337cb
    • P
      pc: hack for migration compatibility from QEMU 2.0 · 07fb6176
      Paolo Bonzini 提交于
      Changing the ACPI table size causes migration to break, and the memory
      hotplug work opened our eyes on how horribly we were breaking things in
      2.0 already.
      
      The ACPI table size is rounded to the next 4k, which one would think
      gives some headroom.  In practice this is not the case, because the user
      can control the ACPI table size (each CPU adds 97 bytes to the SSDT and
      8 to the MADT) and so some "-smp" values will break the 4k boundary and
      fail to migrate.  Similarly, PCI bridges add ~1870 bytes to the SSDT.
      
      This patch concerns itself with fixing migration from QEMU 2.0.  It
      computes the payload size of QEMU 2.0 and always uses that one.
      The previous patch shrunk the ACPI tables enough that the QEMU 2.0 size
      should always be enough; non-AML tables can change depending on the
      configuration (especially MADT, SRAT, HPET) but they remain the same
      between QEMU 2.0 and 2.1, so we only compute our padding based on the
      sizes of the SSDT and DSDT.
      
      Migration from QEMU 1.7 should work for guests that have a number of CPUs
      other than 12, 13, 14, 54, 55, 56, 97, 98, 139, 140.  It was already
      broken from QEMU 1.7 to QEMU 2.0 in the same way, though.
      
      Even with this patch, QEMU 1.7 and 2.0 have two different ideas of
      "-M pc-i440fx-2.0" when there are PCI bridges.  Igor sent a patch to
      adopt the QEMU 1.7 definition.  I think distributions should apply
      it if they move directly from QEMU 1.7 to 2.1+ without ever packaging
      version 2.0.
      Reviewed-by: NLaszlo Ersek <lersek@redhat.com>
      Tested-by: NIgor Mammedov <imammedo@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      07fb6176
  8. 18 7月, 2014 1 次提交
  9. 12 7月, 2014 1 次提交
  10. 29 6月, 2014 1 次提交
  11. 23 6月, 2014 2 次提交
  12. 19 6月, 2014 4 次提交
  13. 28 5月, 2014 1 次提交
  14. 07 5月, 2014 1 次提交
  15. 05 5月, 2014 3 次提交
  16. 14 3月, 2014 2 次提交
  17. 11 3月, 2014 1 次提交
    • M
      pc: avoid duplicate names for ROM MRs · ac41881b
      Michael S. Tsirkin 提交于
      Since
      commit 04920fc0
          loader: store FW CFG ROM files in RAM
      RAM MRs including ROM files in FW CFGs are created
      and named using the file basename.
      
      This becomes problematic if these names are
      supplied by user, since the basename might not
      be unique.
      
      There are two cases we care about:
      - option-rom flag.
      - option ROM for devices. This triggers e.g. when
        using rombar=0.
      
      At the moment we get an assert. E.g
      qemu -option-rom /usr/share/ipxe/8086100e.rom -option-rom
      /usr/share/ipxe.efi/8086100e.rom
      RAMBlock "/rom@genroms/8086100e.rom" already registered, abort!
      
      This is a regression from 1.6.
      
      For now let's keep it simple and just avoid creating the
      MRs in case of option ROMs.
      
      when using 1.7 machine types, enable
      option ROMs in RAM to match that version.
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      ac41881b
  18. 10 3月, 2014 1 次提交
  19. 05 3月, 2014 1 次提交
    • A
      qdev: Keep global allocation counter per bus · 61de3676
      Alexander Graf 提交于
      When we have 2 separate qdev devices that both create a qbus of the
      same type without specifying a bus name or device name, we end up
      with two buses of the same name, such as ide.0 on the Mac machines:
      
        dev: macio-ide, id ""
          bus: ide.0
            type IDE
        dev: macio-ide, id ""
          bus: ide.0
            type IDE
      
      If we now spawn a device that connects to a ide.0 the last created
      bus gets the device, with the first created bus inaccessible to the
      command line.
      
      After some discussion on IRC we concluded that the best quick fix way
      forward for this is to make automated bus-class type based allocation
      count a global counter. That's what this patch implements. With this
      we instead get
      
        dev: macio-ide, id ""
          bus: ide.1
            type IDE
        dev: macio-ide, id ""
          bus: ide.0
            type IDE
      
      on the example mentioned above.
      
      This also means that if you did -device ...,bus=ide.0 you got a device
      on the first bus (the last created one) before this patch and get that
      device on the second one (the first created one) now.  Breaks
      migration unless you change bus=ide.0 to bus=ide.1 on the destination.
      
      This is intended and makes the bus enumeration work as expected.
      
      As per review request follows a list of otherwise affected boards and
      the reasoning for the conclusion that they are ok:
      
         target      machine         bus id              times
         ------      -------         ------              -----
      
         aarch64     n800            i2c-bus.0           2
         aarch64     n810            i2c-bus.0           2
         arm         n800            i2c-bus.0           2
         arm         n810            i2c-bus.0           2
      
      -> Devices are only created explicitly on one of the two buses, using
         s->mpu->i2c[0], so no change to the guest.
      
         aarch64     vexpress-a15    virtio-mmio-bus.0   4
         aarch64     vexpress-a9     virtio-mmio-bus.0   4
         aarch64     virt            virtio-mmio-bus.0   32
         arm         vexpress-a15    virtio-mmio-bus.0   4
         arm         vexpress-a9     virtio-mmio-bus.0   4
         arm         virt            virtio-mmio-bus.0   32
      
      -> Makes -device bus= work for all virtio-mmio buses.  Breaks
         migration.  Workaround for migration from old to new: specify
         virtio-mmio-bus.4 or .32 respectively rather than .0 on the
         destination.
      
         aarch64     xilinx-zynq-a9  usb-bus.0           2
         arm         xilinx-zynq-a9  usb-bus.0           2
         mips64el    fulong2e        usb-bus.0           2
      
      -> Normal USB operation not affected. Migration driver needs command
         line to use the other bus.
      
         i386        isapc           ide.0               2
         x86_64      isapc           ide.0               2
         mips        mips            ide.0               2
         mips64      mips            ide.0               2
         mips64el    mips            ide.0               2
         mipsel      mips            ide.0               2
         ppc         g3beige         ide.0               2
         ppc         mac99           ide.0               2
         ppc         prep            ide.0               2
         ppc64       g3beige         ide.0               2
         ppc64       mac99           ide.0               2
         ppc64       prep            ide.0               2
      
      -> Makes -device bus= work for all IDE buses.  Breaks migration.
         Workaround for migration from old to new: specify ide.1 rather than
         ide.0 on the destination.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NAndreas Faerber <afaerber@suse.de>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      61de3676
  20. 14 2月, 2014 1 次提交
  21. 05 2月, 2014 1 次提交
  22. 16 1月, 2014 1 次提交
    • G
      usb: add support for microsoft os descriptors · 5319dc7b
      Gerd Hoffmann 提交于
      This patch adds support for special usb descriptors used by microsoft
      windows.  They allow more fine-grained control over driver binding and
      adding entries to the registry for configuration.
      
      As this is a guest-visible change the "msos-desc" compat property
      has been added to turn this off for 1.7 + older
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      5319dc7b
  23. 24 12月, 2013 1 次提交
  24. 23 12月, 2013 2 次提交
  25. 12 12月, 2013 1 次提交
  26. 10 12月, 2013 1 次提交