1. 09 2月, 2018 2 次提交
  2. 07 2月, 2018 1 次提交
    • A
      hw/pci*: Replace fprintf(stderr, "*\n" with error_report() · 0151abe4
      Alistair Francis 提交于
      Replace a large number of the fprintf(stderr, "*\n" calls with
      error_report(). The functions were renamed with these commands and then
      compiler issues where manually fixed.
      
      find ./* -type f -exec sed -i \
          'N;N;N;N;N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N;N;N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      find ./* -type f -exec sed -i \
          'N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \
          {} +
      
      Some lines where then manually tweaked to pass checkpatch.
      
      A trailing '.' was removed in hw/pci/pci.c
      Signed-off-by: NAlistair Francis <alistair.francis@xilinx.com>
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Cc: Marcel Apfelbaum <marcel@redhat.com>
      
      Conversions that aren't followed by exit() dropped, because they might
      be inappropriate.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Message-Id: <20180203084315.20497-9-armbru@redhat.com>
      0151abe4
  3. 06 12月, 2017 3 次提交
  4. 16 11月, 2017 1 次提交
  5. 15 10月, 2017 2 次提交
  6. 15 9月, 2017 1 次提交
  7. 08 9月, 2017 2 次提交
  8. 31 8月, 2017 1 次提交
  9. 15 7月, 2017 2 次提交
  10. 04 7月, 2017 4 次提交
  11. 28 6月, 2017 1 次提交
  12. 18 5月, 2017 1 次提交
  13. 04 4月, 2017 1 次提交
  14. 29 3月, 2017 1 次提交
  15. 16 3月, 2017 2 次提交
  16. 01 3月, 2017 1 次提交
    • G
      spapr/pci: populate PCI DT in reverse order · a8eeafda
      Greg Kurz 提交于
      Since commit 1d2d9742 "spapr_pci: enumerate and add PCI device tree", QEMU
      populates the PCI device tree in the opposite order compared to SLOF.
      
      Before 1d2d9742:
      
      Populating /pci@800000020000000
                           00 0000 (D) : 1af4 1000    virtio [ net ]
                           00 0800 (D) : 1af4 1001    virtio [ block ]
                           00 1000 (D) : 1af4 1009    virtio [ network ]
      Populating /pci@800000020000000/unknown-legacy-device@2
      
      7e5294b8 :  /pci@800000020000000
      7e52b998 :  |-- ethernet@0
      7e52c0c8 :  |-- scsi@1
      7e52c7e8 :  +-- unknown-legacy-device@2 ok
      
      Since 1d2d9742:
      
      Populating /pci@800000020000000
                           00 1000 (D) : 1af4 1009    virtio [ network ]
      Populating /pci@800000020000000/unknown-legacy-device@2
                           00 0800 (D) : 1af4 1001    virtio [ block ]
                           00 0000 (D) : 1af4 1000    virtio [ net ]
      
      7e5e8118 :  /pci@800000020000000
      7e5ea6a0 :  |-- unknown-legacy-device@2
      7e5eadb8 :  |-- scsi@1
      7e5eb4d8 :  +-- ethernet@0 ok
      
      This behaviour change is not actually a bug since no assumptions should be
      made on DT ordering. But it has no real justification either, other than
      being the consequence of the way fdt_add_subnode() inserts new elements
      to the front of the FDT rather than adding them to the tail.
      
      This patch reverts to the historical SLOF ordering by walking PCI devices
      in reverse order. This reconciles pseries with x86 machine types behavior.
      It is expected to make things easier when porting existing applications to
      power.
      Signed-off-by: NGreg Kurz <gkurz@linux.vnet.ibm.com>
      Tested-by: NThomas Huth <thuth@redhat.com>
      Reviewed-by: NNikunj A Dadhania <nikunj@linux.vnet.ibm.com>
      (slight update to the changelog)
      Signed-off-by: NGreg Kurz <groug@kaod.org>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      a8eeafda
  17. 01 2月, 2017 1 次提交
  18. 25 1月, 2017 2 次提交
  19. 20 1月, 2017 1 次提交
    • A
      hw/pci: use-after-free in pci_nic_init_nofail when nic device fails to initialize · a023b7ac
      Alex Kompel 提交于
      object_property_set_bool(OBJECT(dev), true, "realized", &err) in
      pci_nic_init_nofail may release the object if device fails to
      initialize which leads to use-after-free in error handling block.
      qdev_init_nofail does the same thing while holding the reference.
      
      (gdb) run -net nic
      qemu-system-x86_64: failed to find romfile "efi-e1000.rom"
      
      Program received signal SIGSEGV, Segmentation fault.
      object_unparent (obj=0x7fffe96a0010) at qom/object.c:440
      440     in qom/object.c
      (gdb) bt
      <nd_table>, rootbus=0x5555567ed990, default_model=<optimized out>,
      default_devaddr=<optimized out>) at hw/pci/pci.c:1812
      pci_bus=0x5555567ed990) at hw/i386/pc.c:1634
      pci_type=0x555555c1a523 "i440FX", host_type=0x555555ba564e
      "i440FX-pcihost") at hw/i386/pc_piix.c:241
      out>, envp=<optimized out>) at vl.c:4481
      Signed-off-by: NAlex Kompel <barbos@gmail.com>
      Signed-off-by: NJason Wang <jasowang@redhat.com>
      a023b7ac
  20. 16 12月, 2016 1 次提交
  21. 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
  22. 22 7月, 2016 1 次提交
  23. 04 7月, 2016 3 次提交
  24. 17 6月, 2016 2 次提交
  25. 23 3月, 2016 1 次提交
  26. 25 2月, 2016 1 次提交