1. 05 10月, 2017 1 次提交
  2. 04 10月, 2017 3 次提交
    • A
      vfio/pci: Add NVIDIA GPUDirect Cliques support · dfbee78d
      Alex Williamson 提交于
      NVIDIA has defined a specification for creating GPUDirect "cliques",
      where devices with the same clique ID support direct peer-to-peer DMA.
      When running on bare-metal, tools like NVIDIA's p2pBandwidthLatencyTest
      (part of cuda-samples) determine which GPUs can support peer-to-peer
      based on chipset and topology.  When running in a VM, these tools have
      no visibility to the physical hardware support or topology.  This
      option allows the user to specify hints via a vendor defined
      capability.  For instance:
      
        <qemu:commandline>
          <qemu:arg value='-set'/>
          <qemu:arg value='device.hostdev0.x-nv-gpudirect-clique=0'/>
          <qemu:arg value='-set'/>
          <qemu:arg value='device.hostdev1.x-nv-gpudirect-clique=1'/>
          <qemu:arg value='-set'/>
          <qemu:arg value='device.hostdev2.x-nv-gpudirect-clique=1'/>
        </qemu:commandline>
      
      This enables two cliques.  The first is a singleton clique with ID 0,
      for the first hostdev defined in the XML (note that since cliques
      define peer-to-peer sets, singleton clique offer no benefit).  The
      subsequent two hostdevs are both added to clique ID 1, indicating
      peer-to-peer is possible between these devices.
      
      QEMU only provides validation that the clique ID is valid and applied
      to an NVIDIA graphics device, any validation that the resulting
      cliques are functional and valid is the user's responsibility.  The
      NVIDIA specification allows a 4-bit clique ID, thus valid values are
      0-15.
      Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
      dfbee78d
    • A
      vfio/pci: Add virtual capabilities quirk infrastructure · e3f79f3b
      Alex Williamson 提交于
      If the hypervisor needs to add purely virtual capabilties, give us a
      hook through quirks to do that.  Note that we determine the maximum
      size for a capability based on the physical device, if we insert a
      virtual capability, that can change.  Therefore if maximum size is
      smaller after added virt capabilities, use that.
      Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
      e3f79f3b
    • A
      vfio/pci: Do not unwind on error · 5b31c822
      Alex Williamson 提交于
      If vfio_add_std_cap() errors then going to out prepends irrelevant
      errors for capabilities we haven't attempted to add as we unwind our
      recursive stack.  Just return error.
      
      Fixes: 7ef165b9 ("vfio/pci: Pass an error object to vfio_add_capabilities")
      Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
      5b31c822
  3. 02 10月, 2017 4 次提交
  4. 29 9月, 2017 4 次提交
    • 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
    • G
      virtio-input: send rel-wheel events for wheel buttons · f4924974
      Gerd Hoffmann 提交于
      qemu uses wheel-up/down button events for mouse wheel input, however
      linux applications typically want REL_WHEEL events.
      
      This fixes wheel with linux guests. Tested with X11/wayland, and
      windows virtio-input driver.
      
      Based on a patch from Marc.
      Added property to enable/disable wheel axis.
      
      Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Message-id: 20170926113243.26081-1-kraxel@redhat.com
      f4924974
  5. 27 9月, 2017 22 次提交
  6. 26 9月, 2017 5 次提交
  7. 22 9月, 2017 1 次提交