1. 11 3月, 2016 3 次提交
    • A
      vfio: Generalize region support · db0da029
      Alex Williamson 提交于
      Both platform and PCI vfio drivers create a "slow", I/O memory region
      with one or more mmap memory regions overlayed when supported by the
      device. Generalize this to a set of common helpers in the core that
      pulls the region info from vfio, fills the region data, configures
      slow mapping, and adds helpers for comleting the mmap, enable/disable,
      and teardown.  This can be immediately used by the PCI MSI-X code,
      which needs to mmap around the MSI-X vector table.
      
      This also changes VFIORegion.mem to be dynamically allocated because
      otherwise we don't know how the caller has allocated VFIORegion and
      therefore don't know whether to unreference it to destroy the
      MemoryRegion or not.
      Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
      db0da029
    • A
      vfio: Wrap VFIO_DEVICE_GET_REGION_INFO · 46900226
      Alex Williamson 提交于
      In preparation for supporting capability chains on regions, wrap
      ioctl(VFIO_DEVICE_GET_REGION_INFO) so we don't duplicate the code for
      each caller.
      Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
      46900226
    • A
      vfio: Add sysfsdev property for pci & platform · 7df9381b
      Alex Williamson 提交于
      vfio-pci currently requires a host= parameter, which comes in the
      form of a PCI address in [domain:]<bus:slot.function> notation.  We
      expect to find a matching entry in sysfs for that under
      /sys/bus/pci/devices/.  vfio-platform takes a similar approach, but
      defines the host= parameter to be a string, which can be matched
      directly under /sys/bus/platform/devices/.  On the PCI side, we have
      some interest in using vfio to expose vGPU devices.  These are not
      actual discrete PCI devices, so they don't have a compatible host PCI
      bus address or a device link where QEMU wants to look for it.  There's
      also really no requirement that vfio can only be used to expose
      physical devices, a new vfio bus and iommu driver could expose a
      completely emulated device.  To fit within the vfio framework, it
      would need a kernel struct device and associated IOMMU group, but
      those are easy constraints to manage.
      
      To support such devices, which would include vGPUs, that honor the
      VFIO PCI programming API, but are not necessarily backed by a unique
      PCI address, add support for specifying any device in sysfs.  The
      vfio API already has support for probing the device type to ensure
      compatibility with either vfio-pci or vfio-platform.
      
      With this, a vfio-pci device could either be specified as:
      
      -device vfio-pci,host=02:00.0
      
      or
      
      -device vfio-pci,sysfsdev=/sys/devices/pci0000:00/0000:00:1c.0/0000:02:00.0
      
      or even
      
      -device vfio-pci,sysfsdev=/sys/bus/pci/devices/0000:02:00.0
      
      When vGPU support comes along, this might look something more like:
      
      -device vfio-pci,sysfsdev=/sys/devices/virtual/intel-vgpu/vgpu0@0000:00:02.0
      
      NB - This is only a made up example path
      
      The same change is made for vfio-platform, specifying sysfsdev has
      precedence over the old host option.
      Tested-by: NEric Auger <eric.auger@linaro.org>
      Reviewed-by: NEric Auger <eric.auger@linaro.org>
      Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
      7df9381b
  2. 10 3月, 2016 1 次提交
    • P
      Merge remote-tracking branch 'remotes/kraxel/tags/pull-ui-20160309-1' into staging · a648c137
      Peter Maydell 提交于
      add linux evdev support, vnc and console fixes.
      
      # gpg: Signature made Wed 09 Mar 2016 09:02:47 GMT using RSA key ID D3E87138
      # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>"
      # gpg:                 aka "Gerd Hoffmann <gerd@kraxel.org>"
      # gpg:                 aka "Gerd Hoffmann (private) <kraxel@gmail.com>"
      
      * remotes/kraxel/tags/pull-ui-20160309-1:
        ui/console: add escape sequence \e[5, 6n
        input-linux: add switch to enable auto-repeat events
        input-linux: add option to toggle grab on all devices
        input: linux evdev support
        vnc: send cursor when a new client is connecting
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      a648c137
  3. 09 3月, 2016 6 次提交
  4. 08 3月, 2016 29 次提交
  5. 07 3月, 2016 1 次提交