1. 09 4月, 2013 2 次提交
  2. 04 4月, 2013 1 次提交
  3. 01 3月, 2013 1 次提交
    • P
      hw: include hw header files with full paths · 83c9f4ca
      Paolo Bonzini 提交于
      Done with this script:
      
      cd hw
      for i in `find . -name '*.h' | sed 's/^..//'`; do
        echo '\,^#.*include.*["<]'$i'[">], s,'$i',hw/&,'
      done | sed -i -f - `find . -type f`
      
      This is so that paths remain valid as files are moved.
      
      Instead, files in hw/dataplane are referenced with the relative path.
      We know they are not going to move to include/, and they are the only
      include files that are in subdirectories _and_ move.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      83c9f4ca
  4. 05 2月, 2013 1 次提交
    • M
      acpi_piix4: fix segfault migrating from 1.2 · ded67782
      Michael Roth 提交于
      b0b873a0 bumped the vmstate version and
      introduced an old-style load function to handle migration from prior
      (<= 1.2) versions.
      
      The load function passes the top-level PIIX4PMState pointer to
      vmstate_load_state() to handle nested structs for APMState and
      pci_status, which leads to corruption of the top-level PIIX4PMState,
      since pointers to the nested structs are expected.
      
      A segfault can be fairly reliably triggered by migrating from 1.2 and
      issuing a reset, which will trigger a number of QOM operations which
      rely on the now corrupted ObjectClass/Object members.
      
      Fix this by passing in the expected pointers for vmstate_load_state().
      
      Cc: qemu-stable@nongnu.org
      Signed-off-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      ded67782
  5. 16 1月, 2013 1 次提交
  6. 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
  7. 04 1月, 2013 1 次提交
  8. 19 12月, 2012 3 次提交
  9. 17 12月, 2012 1 次提交
  10. 04 12月, 2012 12 次提交
  11. 15 11月, 2012 1 次提交
  12. 26 9月, 2012 1 次提交
  13. 29 8月, 2012 1 次提交
  14. 24 8月, 2012 1 次提交
    • P
      qom: object_delete should unparent the object first · da5a44e8
      Paolo Bonzini 提交于
      object_deinit is only called when the reference count goes to zero,
      and yet tries to do an object_unparent.  Now, object_unparent
      either does nothing or it will decrease the reference count.
      Because we know the reference count is zero, the object_unparent
      call in object_deinit is useless.
      
      Instead, we need to disconnect the object from its parent just
      before we remove the last reference apart from the parent's.  This
      happens in object_delete.  Once we do this, all calls to
      object_unparent peppered through QEMU can go away.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      da5a44e8
  15. 20 6月, 2012 1 次提交
    • G
      Add PIIX4 properties to control PM system states. · 459ae5ea
      Gleb Natapov 提交于
      This patch adds two things. First it allows QEMU to distinguish between
      regular powerdown and S4 powerdown. Later separate QMP notification will
      be added for S4 powerdown. Second it allows S3/S4 states to be disabled
      from QEMU command line. Some guests known to be broken with regards to
      power management, but allow to use it anyway. Using new properties
      management will be able to disable S3/S4 for such guests.
      
      Supported system state are passed to a firmware using new fw_cfg file.
      The file contains  6 byte array. Each byte represents one system
      state. If byte at offset X has its MSB set it means that system state
      X is supported and to enter it guest should use the value from lowest 3
      bits.
      Signed-off-by: NGleb Natapov <gleb@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      459ae5ea
  16. 18 6月, 2012 1 次提交
  17. 30 5月, 2012 1 次提交
    • Amos_沧海桑田's avatar
      pci: call object_unparent() before free_qdev() · a6de8ed8
      Amos_沧海桑田 提交于
      Start VM with 8 multiple-function block devs, hot-removing
      those block devs by 'device_del ...' would cause qemu abort.
      
      | (qemu) device_del virti0-0-0
      | (qemu) **
      |ERROR:qom/object.c:389:object_delete: assertion failed: (obj->ref == 0)
      
      It's a regression introduced by commit 57c9fafe
      
      The whole PCI slot should be removed once. Currently only one func
      is cleaned in pci_unplug_device(), if you try to remove a single
      func by monitor cmd.
      
      free_qdev() are called for all functions in slot,
      but unparent_delete() is only called for one
      function.
      
      Signed-off-by: XXXX
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      a6de8ed8
  18. 15 4月, 2012 5 次提交
    • M
      acpi: explicitly account for >1 device per slot · 54bfa546
      Michael S. Tsirkin 提交于
      Slot present bit is cleared apparently for each device. Hotplug and non
      hotplug devices should not mix normally, and we only set the bit when we
      add a device so it should all work out, but it's more robust to
      explicitly account for more than one device per slot.
      Acked-by: NAlex Williamson <alex.williamson@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      54bfa546
    • A
      acpi_piix4: Re-define PCI hotplug eject register read · 9290f364
      Alex Williamson 提交于
      The PCI hotplug eject register has always returned 0, so let's redefine
      it as a hotplug feature register.  The existing model of using separate
      up & down read-only registers and an eject via write to this register
      becomes the base implementation.  As we make use of new interfaces we'll
      set bits here to allow the BIOS and AML implementation to optimize for
      the platform implementation.
      Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      9290f364
    • A
      acpi_piix4: Remove PCI_RMV_BASE write code · 31745aab
      Alex Williamson 提交于
      Clarify this register as read-only and remove write code.  No
      change in existing behavior.
      Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      31745aab
    • A
      acpi_piix4: Fix PCI hotplug race · 7faa8075
      Alex Williamson 提交于
      As Michael Tsirkin demonstrated, current PCI hotplug is vulnerable
      to a few races.  The first is a race with other hotplug operations
      because we clear the up & down registers at each event.  If a new
      event comes before the last is processed, up/down is cleared and
      the event is lost.
      
      To fix this for the down register, we create a life cycle for
      the event request that starts with the hot unplug request in
      piix4_device_hotplug() and ends when the device is ejected.
      This allows us to mask and clear individual bits, preserving them
      against races.  For the up register, we have no clear end point
      for when the event is finished.  We could modify the BIOS to
      acknowledge the bit and clear it, but this creates BIOS compatibiliy
      issues without offering a complete solution.  Instead we note that
      gratuitous ACPI device checks are not harmful, which allows us to
      issue a device check for every slot.  We know which slots are present
      and we know which slots are hotpluggable, so we can easily reduce
      this to a more manageable set for the guest.
      
      The other race Michael noted was that an unplug request followed
      by reset may also lose the eject notification, which may also
      result in the eject request being lost which a subsequent add
      or remove.  Once we're in reset, the device is unused and we can
      flush the queue of device removals ourselves.  Previously if a
      device_del was issued to a guest without ACPI PCI hotplug support,
      it was necessary to shutdown the guest to recover the device.
      With this, a guest reboot is sufficient.
      Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      7faa8075
    • A
      acpi_piix4: Disallow write to up/down PCI hotplug registers · ba737541
      Alex Williamson 提交于
      The write side of these registers is never used and actually can't be
      used as defined because any read/modify/write sequence from the guest
      potentially races with qemu.  Drop the write support and define these
      as read-only registers.
      Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      ba737541
  19. 25 2月, 2012 4 次提交