1. 20 12月, 2018 2 次提交
    • A
      pcie: Create enums for link speed and width · d96a0ac7
      Alex Williamson 提交于
      In preparation for reporting higher virtual link speeds and widths,
      create enums and macros to help us manage them.
      
      Cc: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
      Tested-by: NGeoffrey McRae <geoff@hostfission.com>
      Reviewed-by: NPhilippe Mathieu-Daudé <philmd@redhat.com>
      Reviewed-by: NEric Auger <eric.auger@redhat.com>
      Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      d96a0ac7
    • Z
      pcie: set link state inactive/active after hot unplug/plug · 2f2b18f6
      Zheng Xiang 提交于
      When VM boots from the latest version of linux kernel, after
      hot-unpluging virtio-blk disks which are hotplugged into
      pcie-root-port, the VM's dmesg log shows:
      
      [  151.046242] pciehp 0000:00:05.0:pcie004: pending interrupts 0x0001 from Slot Status
      [  151.046365] pciehp 0000:00:05.0:pcie004: Slot(0-3): Attention button pressed
      [  151.046369] pciehp 0000:00:05.0:pcie004: Slot(0-3): Powering off due to button press
      [  151.046420] pciehp 0000:00:05.0:pcie004: pending interrupts 0x0010 from Slot Status
      [  151.046425] pciehp 0000:00:05.0:pcie004: pciehp_green_led_blink: SLOTCTRL a8 write cmd 200
      [  151.046464] pciehp 0000:00:05.0:pcie004: pending interrupts 0x0010 from Slot Status
      [  151.046468] pciehp 0000:00:05.0:pcie004: pciehp_set_attention_status: SLOTCTRL a8 write cmd c0
      [  156.163421] pciehp 0000:00:05.0:pcie004: pciehp_get_power_status: SLOTCTRL a8 value read 2f1
      [  156.163427] pciehp 0000:00:05.0:pcie004: pciehp_unconfigure_device: domain:bus:dev = 0000:06:00
      [  156.198736] pciehp 0000:00:05.0:pcie004: pending interrupts 0x0010 from Slot Status
      [  156.198772] pciehp 0000:00:05.0:pcie004: pciehp_power_off_slot: SLOTCTRL a8 write cmd 400
      [  157.224124] pciehp 0000:00:05.0:pcie004: pending interrupts 0x0018 from Slot Status
      [  157.224194] pciehp 0000:00:05.0:pcie004: pciehp_green_led_off: SLOTCTRL a8 write cmd 300
      [  157.224220] pciehp 0000:00:05.0:pcie004: pciehp_check_link_active: lnk_status = 2011
      [  157.224223] pciehp 0000:00:05.0:pcie004: Slot(0-3): Link Up
      [  157.224233] pciehp 0000:00:05.0:pcie004: pciehp_get_power_status: SLOTCTRL a8 value read 7f1
      [  157.224281] pciehp 0000:00:05.0:pcie004: pending interrupts 0x0010 from Slot Status
      [  157.224285] pciehp 0000:00:05.0:pcie004: pciehp_power_on_slot: SLOTCTRL a8 write cmd 0
      [  157.224300] pciehp 0000:00:05.0:pcie004: __pciehp_link_set: lnk_ctrl = 0
      [  157.224336] pciehp 0000:00:05.0:pcie004: pending interrupts 0x0010 from Slot Status
      [  157.224339] pciehp 0000:00:05.0:pcie004: pciehp_green_led_blink: SLOTCTRL a8 write cmd 200
      [  159.739294] pci 0000:06:00.0 id reading try 50 times with interval 20 ms to get ffffffff
      [  159.739315] pciehp 0000:00:05.0:pcie004: pciehp_check_link_status: lnk_status = 2011
      [  159.739318] pciehp 0000:00:05.0:pcie004: Failed to check link status
      [  159.739371] pciehp 0000:00:05.0:pcie004: pending interrupts 0x0010 from Slot Status
      [  159.739394] pciehp 0000:00:05.0:pcie004: pciehp_power_off_slot: SLOTCTRL a8 write cmd 400
      [  160.771426] pciehp 0000:00:05.0:pcie004: pending interrupts 0x0010 from Slot Status
      [  160.771452] pciehp 0000:00:05.0:pcie004: pciehp_green_led_off: SLOTCTRL a8 write cmd 300
      [  160.771495] pciehp 0000:00:05.0:pcie004: pending interrupts 0x0010 from Slot Status
      [  160.771499] pciehp 0000:00:05.0:pcie004: pciehp_set_attention_status: SLOTCTRL a8 write cmd 40
      [  160.771535] pciehp 0000:00:05.0:pcie004: pending interrupts 0x0010 from Slot Status
      [  160.771539] pciehp 0000:00:05.0:pcie004: pciehp_green_led_off: SLOTCTRL a8 write cmd 300
      
      After analyzing the log information, it seems that qemu doesn't
      change the Link Status from active to inactive after hot-unplug.
      This results in the abnormal log after the linux kernel commit
      d331710ea78fea merged.
      
      Furthermore, If I hotplug the same virtio-blk disk after hot-unplug,
      the virtio-blk would turn on and then back off.
      
      So this patch set the Link Status inactive after hot-unplug and
      active after hot-plug.
      Signed-off-by: NZheng Xiang <zhengxiang9@huawei.com>
      Signed-off-by: NZheng Xiang <xiang.zheng@linaro.org>
      Cc: Wang Haibin <wanghaibin.wang@huawei.com>
      Cc: qemu-stable@nongnu.org
      Reviewed-by: NMarcel Apfelbaum <marcel.apfelbaum@gmail.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      2f2b18f6
  2. 06 12月, 2017 1 次提交
  3. 04 7月, 2017 2 次提交
  4. 16 3月, 2017 2 次提交
  5. 18 2月, 2017 2 次提交
  6. 25 1月, 2017 1 次提交
  7. 10 1月, 2017 1 次提交
  8. 29 7月, 2016 1 次提交
    • M
      pcie: fix link active status bit migration · 6b449540
      Michael S. Tsirkin 提交于
      We changed link status register in pci express endpoint capability
      over time. Specifically,
      
      commit b2101eae ("pcie: Set the "link
      active" in the link status register") set data link layer link active
      bit in this register without adding compatibility to old machine types.
      
      When migrating from qemu 2.3 and older this affects xhci devices which
      under machine type 2.0 and older have a pci express endpoint capability
      even if they are on a pci bus.
      
      Add compatibility flags to make this bit value match what it was under
      2.3.
      
      Additionally, to avoid breaking migration from qemu 2.3 and up,
      suppress checking link status during migration: this seems sane
      since hardware can change link status at any time.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1352860Reported-by: NGerd Hoffmann <kraxel@redhat.com>
      Fixes: b2101eae
          ("pcie: Set the "link active" in the link status register")
      Cc: qemu-stable@nongnu.org
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      6b449540
  9. 02 6月, 2016 2 次提交
  10. 23 3月, 2016 1 次提交
    • M
      include/qemu/osdep.h: Don't include qapi/error.h · da34e65c
      Markus Armbruster 提交于
      Commit 57cb38b3 included qapi/error.h into qemu/osdep.h to get the
      Error typedef.  Since then, we've moved to include qemu/osdep.h
      everywhere.  Its file comment explains: "To avoid getting into
      possible circular include dependencies, this file should not include
      any other QEMU headers, with the exceptions of config-host.h,
      compiler.h, os-posix.h and os-win32.h, all of which are doing a
      similar job to this file and are under similar constraints."
      qapi/error.h doesn't do a similar job, and it doesn't adhere to
      similar constraints: it includes qapi-types.h.  That's in excess of
      100KiB of crap most .c files don't actually need.
      
      Add the typedef to qemu/typedefs.h, and include that instead of
      qapi/error.h.  Include qapi/error.h in .c files that need it and don't
      get it now.  Include qapi-types.h in qom/object.h for uint16List.
      
      Update scripts/clean-includes accordingly.  Update it further to match
      reality: replace config.h by config-target.h, add sysemu/os-posix.h,
      sysemu/os-win32.h.  Update the list of includes in the qemu/osdep.h
      comment quoted above similarly.
      
      This reduces the number of objects depending on qapi/error.h from "all
      of them" to less than a third.  Unfortunately, the number depending on
      qapi-types.h shrinks only a little.  More work is needed for that one.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      [Fix compilation without the spice devel packages. - Paolo]
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      da34e65c
  11. 20 2月, 2016 1 次提交
  12. 29 1月, 2016 1 次提交
    • P
      pci: Clean up includes · 97d5408f
      Peter Maydell 提交于
      Clean up includes so that osdep.h is included first and headers
      which it implies are not included manually.
      
      This commit was created with scripts/clean-includes.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Message-id: 1453832250-766-23-git-send-email-peter.maydell@linaro.org
      97d5408f
  13. 06 11月, 2015 1 次提交
  14. 29 10月, 2015 2 次提交
  15. 08 7月, 2015 1 次提交
  16. 23 6月, 2015 1 次提交
  17. 18 3月, 2015 1 次提交
  18. 25 11月, 2014 2 次提交
  19. 02 11月, 2014 1 次提交
  20. 15 10月, 2014 1 次提交
  21. 25 8月, 2014 3 次提交
  22. 23 6月, 2014 4 次提交
  23. 10 3月, 2014 1 次提交
  24. 10 2月, 2014 1 次提交
  25. 06 11月, 2013 1 次提交
  26. 14 10月, 2013 1 次提交
  27. 30 7月, 2013 1 次提交
  28. 27 3月, 2013 1 次提交