1. 19 12月, 2017 2 次提交
  2. 14 12月, 2017 1 次提交
  3. 23 10月, 2017 1 次提交
  4. 15 10月, 2017 2 次提交
  5. 05 10月, 2017 1 次提交
  6. 29 9月, 2017 3 次提交
    • F
      usb: Use angle brackets for cacard include directive · 13787d59
      Fam Zheng 提交于
      This is a library header, so angle brackets are more appropriate; also
      move the line to before QEMU headers, as is recommended in HACKING.
      Signed-off-by: NFam Zheng <famz@redhat.com>
      Message-id: 20170920085952.3872-1-famz@redhat.com
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      13787d59
    • G
      usb: fix libusb config variable name. · 275d477a
      Gerd Hoffmann 提交于
      Cc: Jan Kiszka <jan.kiszka@siemens.com>
      Fixes: 4e5ee5b2Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Tested-by: NJan Kiszka <jan.kiszka@siemens.com>
      Message-id: 20170926063820.30773-1-kraxel@redhat.com
      275d477a
    • T
      hw/usb/bus: Remove bad object_unparent() from usb_try_create_simple() · f3b2bea3
      Thomas Huth 提交于
      Valgrind detects an invalid read operation when hot-plugging of an
      USB device fails:
      
      $ valgrind x86_64-softmmu/qemu-system-x86_64 -device usb-ehci -nographic -S
      ==30598== Memcheck, a memory error detector
      ==30598== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
      ==30598== Using Valgrind-3.12.0 and LibVEX; rerun with -h for copyright info
      ==30598== Command: x86_64-softmmu/qemu-system-x86_64 -device usb-ehci -nographic -S
      ==30598==
      QEMU 2.10.50 monitor - type 'help' for more information
      (qemu) device_add usb-tablet
      (qemu) device_add usb-tablet
      (qemu) device_add usb-tablet
      (qemu) device_add usb-tablet
      (qemu) device_add usb-tablet
      (qemu) device_add usb-tablet
      ==30598== Invalid read of size 8
      ==30598==    at 0x60EF50: object_unparent (object.c:445)
      ==30598==    by 0x580F0D: usb_try_create_simple (bus.c:346)
      ==30598==    by 0x581BEB: usb_claim_port (bus.c:451)
      ==30598==    by 0x582310: usb_qdev_realize (bus.c:257)
      ==30598==    by 0x4CB399: device_set_realized (qdev.c:914)
      ==30598==    by 0x60E26D: property_set_bool (object.c:1886)
      ==30598==    by 0x61235E: object_property_set_qobject (qom-qobject.c:27)
      ==30598==    by 0x61000F: object_property_set_bool (object.c:1162)
      ==30598==    by 0x4567C3: qdev_device_add (qdev-monitor.c:630)
      ==30598==    by 0x456D52: qmp_device_add (qdev-monitor.c:807)
      ==30598==    by 0x470A99: hmp_device_add (hmp.c:1933)
      ==30598==    by 0x3679C3: handle_hmp_command (monitor.c:3123)
      
      The object_unparent() here is not necessary anymore since commit
      69382d8b ("qdev: Fix object reference leak in case device.realize()
      fails"), so let's remove it now.
      Suggested-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NThomas Huth <thuth@redhat.com>
      Message-id: 1506526106-30971-1-git-send-email-thuth@redhat.com
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      f3b2bea3
  7. 27 9月, 2017 3 次提交
  8. 22 9月, 2017 3 次提交
  9. 19 9月, 2017 2 次提交
    • A
      Convert single line fprintf(.../n) to warn_report() · 2ab4b135
      Alistair Francis 提交于
      Convert all the single line uses of fprintf(stderr, "warning:"..."\n"...
      to use warn_report() instead. This helps standardise on a single
      method of printing warnings to the user.
      
      All of the warnings were changed using this command:
        find ./* -type f -exec sed -i \
          's|fprintf(.*".*warning[,:] \(.*\)\\n"\(.*\));|warn_report("\1"\2);|Ig' \
          {} +
      
      Some of the lines were manually edited to reduce the line length to below
      80 charecters.
      
      The #include lines were manually updated to allow the code to compile.
      Signed-off-by: NAlistair Francis <alistair.francis@xilinx.com>
      Cc: Kevin Wolf <kwolf@redhat.com>
      Cc: Max Reitz <mreitz@redhat.com>
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Cc: Igor Mammedov <imammedo@redhat.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Eduardo Habkost <ehabkost@redhat.com>
      Cc: Gerd Hoffmann <kraxel@redhat.com>
      Cc: Jason Wang <jasowang@redhat.com>
      Cc: Michael Roth <mdroth@linux.vnet.ibm.com>
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: Aurelien Jarno <aurelien@aurel32.net>
      Cc: Yongbok Kim <yongbok.kim@imgtec.com>
      Cc: Stefan Hajnoczi <stefanha@redhat.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: James Hogan <james.hogan@imgtec.com> [mips]
      Message-Id: <ae8f8a7f0a88ded61743dff2adade21f8122a9e7.1505158760.git.alistair.francis@xilinx.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      2ab4b135
    • P
      scsi: move block/scsi.h to include/scsi/constants.h · 08e2c9f1
      Paolo Bonzini 提交于
      Complete the transition by renaming this header, which was
      shared by block/iscsi.c and the SCSI emulation code.
      Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      08e2c9f1
  10. 13 9月, 2017 3 次提交
  11. 31 8月, 2017 1 次提交
  12. 01 8月, 2017 2 次提交
    • V
      trace-events: fix code style: print 0x before hex numbers · 8908eb1a
      Vladimir Sementsov-Ogievskiy 提交于
      The only exception are groups of numers separated by symbols
      '.', ' ', ':', '/', like 'ab.09.7d'.
      
      This patch is made by the following:
      
      > find . -name trace-events | xargs python script.py
      
      where script.py is the following python script:
      =========================
       #!/usr/bin/env python
      
      import sys
      import re
      import fileinput
      
      rhex = '%[-+ *.0-9]*(?:[hljztL]|ll|hh)?(?:x|X|"\s*PRI[xX][^"]*"?)'
      rgroup = re.compile('((?:' + rhex + '[.:/ ])+' + rhex + ')')
      rbad = re.compile('(?<!0x)' + rhex)
      
      files = sys.argv[1:]
      
      for fname in files:
          for line in fileinput.input(fname, inplace=True):
              arr = re.split(rgroup, line)
              for i in range(0, len(arr), 2):
                  arr[i] = re.sub(rbad, '0x\g<0>', arr[i])
      
              sys.stdout.write(''.join(arr))
      =========================
      Signed-off-by: NVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
      Acked-by: NCornelia Huck <cohuck@redhat.com>
      Message-id: 20170731160135.12101-5-vsementsov@virtuozzo.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      8908eb1a
    • S
      trace: add trace_event_get_state_backends() · d87aa138
      Stefan Hajnoczi 提交于
      Code that checks dstate is unaware of SystemTap and LTTng UST dstate, so
      the following trace event will not fire when solely enabled by SystemTap
      or LTTng UST:
      
        if (trace_event_get_state(TRACE_MY_EVENT)) {
            str = g_strdup_printf("Expensive string to generate ...",
                                  ...);
            trace_my_event(str);
            g_free(str);
        }
      
      Add trace_event_get_state_backends() to fetch backend dstate.  Those
      backends that use QEMU dstate fetch it as part of
      generate_h_backend_dstate().
      
      Update existing trace_event_get_state() callers to use
      trace_event_get_state_backends() instead.
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      Message-id: 20170731140718.22010-3-stefanha@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      d87aa138
  13. 31 7月, 2017 1 次提交
  14. 20 7月, 2017 1 次提交
    • E
      usb: Fix build with newer gcc · 121829cb
      Eric Blake 提交于
      gcc 7 is pickier about our sources:
      
      hw/usb/bus.c: In function ‘usb_port_location’:
      hw/usb/bus.c:410:66: error: ‘%d’ directive output may be truncated writing between 1 and 11 bytes into a region of size between 0 and 15 [-Werror=format-truncation=]
               snprintf(downstream->path, sizeof(downstream->path), "%s.%d",
                                                                        ^~
      hw/usb/bus.c:410:9: note: ‘snprintf’ output between 3 and 28 bytes into a destination of size 16
               snprintf(downstream->path, sizeof(downstream->path), "%s.%d",
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                        upstream->path, portnr);
                        ~~~~~~~~~~~~~~~~~~~~~~~
      
      But we know that there are at most 5 levels of USB hubs, with at
      most two digits per level; that plus the separating dots means we
      use at most 15 bytes (including trailing NUL) of our 16-byte field.
      Adding an assertion to show gcc that we checked for truncation is
      enough to shut up the false-positive warning.
      
      Inspired by an idea by Dr. David Alan Gilbert <dgilbert@redhat.com>.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Message-id: 20170717151334.17954-1-eblake@redhat.com
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      121829cb
  15. 17 7月, 2017 1 次提交
  16. 14 7月, 2017 2 次提交
  17. 13 7月, 2017 1 次提交
    • A
      Convert error_report() to warn_report() · 3dc6f869
      Alistair Francis 提交于
      Convert all uses of error_report("warning:"... to use warn_report()
      instead. This helps standardise on a single method of printing warnings
      to the user.
      
      All of the warnings were changed using these two commands:
          find ./* -type f -exec sed -i \
            's|error_report(".*warning[,:] |warn_report("|Ig' {} +
      
      Indentation fixed up manually afterwards.
      
      The test-qdev-global-props test case was manually updated to ensure that
      this patch passes make check (as the test cases are case sensitive).
      Signed-off-by: NAlistair Francis <alistair.francis@xilinx.com>
      Suggested-by: NThomas Huth <thuth@redhat.com>
      Cc: Jeff Cody <jcody@redhat.com>
      Cc: Kevin Wolf <kwolf@redhat.com>
      Cc: Max Reitz <mreitz@redhat.com>
      Cc: Ronnie Sahlberg <ronniesahlberg@gmail.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Peter Lieven <pl@kamp.de>
      Cc: Josh Durgin <jdurgin@redhat.com>
      Cc: "Richard W.M. Jones" <rjones@redhat.com>
      Cc: Markus Armbruster <armbru@redhat.com>
      Cc: Peter Crosthwaite <crosthwaite.peter@gmail.com>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
      Cc: Greg Kurz <groug@kaod.org>
      Cc: Rob Herring <robh@kernel.org>
      Cc: Peter Maydell <peter.maydell@linaro.org>
      Cc: Peter Chubb <peter.chubb@nicta.com.au>
      Cc: Eduardo Habkost <ehabkost@redhat.com>
      Cc: Marcel Apfelbaum <marcel@redhat.com>
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Cc: Igor Mammedov <imammedo@redhat.com>
      Cc: David Gibson <david@gibson.dropbear.id.au>
      Cc: Alexander Graf <agraf@suse.de>
      Cc: Gerd Hoffmann <kraxel@redhat.com>
      Cc: Jason Wang <jasowang@redhat.com>
      Cc: Marcelo Tosatti <mtosatti@redhat.com>
      Cc: Christian Borntraeger <borntraeger@de.ibm.com>
      Cc: Cornelia Huck <cohuck@redhat.com>
      Cc: Stefan Hajnoczi <stefanha@redhat.com>
      Acked-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Acked-by: NGreg Kurz <groug@kaod.org>
      Acked-by: NCornelia Huck <cohuck@redhat.com>
      Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
      Reviewed by: Peter Chubb <peter.chubb@data61.csiro.au>
      Acked-by: NMax Reitz <mreitz@redhat.com>
      Acked-by: NMarcel Apfelbaum <marcel@redhat.com>
      Message-Id: <e1cfa2cd47087c248dd24caca9c33d9af0c499b0.1499866456.git.alistair.francis@xilinx.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      3dc6f869
  18. 04 7月, 2017 1 次提交
  19. 28 6月, 2017 1 次提交
  20. 21 6月, 2017 1 次提交
    • S
      usb-host: support devices with sparse/non-sequential USB interfaces · 896b6757
      Samuel Brian 提交于
      Some USB devices have sparse interface numbering which is not able to be
      passthroughed.
      For example, the Sierra Wireless MC7455/MC7430:
      
        # lsusb  -D /dev/bus/usb/003/003 | egrep '1199|9071|bNumInterfaces|bInterfaceNumber'
        Device: ID 1199:9071 Sierra Wireless, Inc.
          idVendor           0x1199 Sierra Wireless, Inc.
          idProduct          0x9071
            bNumInterfaces          5
              bInterfaceNumber        0
              bInterfaceNumber        2
              bInterfaceNumber        3
              bInterfaceNumber        8
              bInterfaceNumber       10
      
      In this case, the interface numbers are 0, 2, 3, 8, 10 and not the
      0, 1, 2, 3, 4 that QEMU tries to claim.
      
      This change allows sparse USB interface numbering.
      Instead of only claiming the interfaces in the range reported by the USB
      device through bNumInterfaces, QEMU attempts to claim all possible
      interfaces.
      
      v2 to fix broken v1 patch formatting.
      v3 to fix indentation.
      Signed-off-by: NSamuel Brian <sam.brian@accelerated.com>
      Message-id: 20170613234039.27201-1-sam.brian@accelerated.com
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      896b6757
  21. 20 6月, 2017 1 次提交
  22. 13 6月, 2017 1 次提交
  23. 12 6月, 2017 1 次提交
  24. 02 6月, 2017 4 次提交