1. 26 5月, 2016 1 次提交
  2. 19 5月, 2016 1 次提交
  3. 17 5月, 2016 1 次提交
    • H
      hw/intc/arm_gic: add tracepoints · 2531088f
      Hollis Blanchard 提交于
      These are obviously critical to understanding interrupt delivery:
      gic_enable_irq
      gic_disable_irq
      gic_set_irq (inbound irq from device models)
      gic_update_set_irq (outbound irq to CPU)
      gic_acknowledge_irq
      
      The only one that I think might raise eyebrows is gic_update_bestirq, but I've
      (sadly) debugged problems that ended up being caused by unexpected priorities.
      Knowing that the GIC has an irq ready, but doesn't deliver to the CPU due to
      priority, has also proven important.
      Signed-off-by: NHollis Blanchard <hollis_blanchard@mentor.com>
      Message-id: 1461252281-22399-1-git-send-email-hollis_blanchard@mentor.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      2531088f
  4. 13 5月, 2016 1 次提交
    • S
      tcg: Clean up from 'next_tb' · 819af24b
      Sergey Fedorov 提交于
      The value returned from tcg_qemu_tb_exec() is the value passed to the
      corresponding tcg_gen_exit_tb() at translation time of the last TB
      attempted to execute. It is a little confusing to store it in a variable
      named 'next_tb'. In fact, it is a combination of 4-byte aligned pointer
      and additional information in its two least significant bits. Break it
      down right away into two variables named 'last_tb' and 'tb_exit' which
      are a pointer to the last TB attempted to execute and the TB exit
      reason, correspondingly. This simplifies the code and improves its
      readability.
      
      Correct a misleading documentation comment for tcg_qemu_tb_exec() and
      fix logging in cpu_tb_exec(). Also rename a misleading 'next_tb' in
      another couple of places.
      Signed-off-by: NSergey Fedorov <serge.fdrv@gmail.com>
      Signed-off-by: NSergey Fedorov <sergey.fedorov@linaro.org>
      Signed-off-by: NRichard Henderson <rth@twiddle.net>
      819af24b
  5. 12 5月, 2016 2 次提交
  6. 11 4月, 2016 1 次提交
    • G
      ui/virtio-gpu: add and use qemu_create_displaysurface_pixman · ca58b45f
      Gerd Hoffmann 提交于
      Add a the new qemu_create_displaysurface_pixman function, to create
      a DisplaySurface backed by an existing pixman image.  In that case
      there is no need to create a new pixman image pointing to the same
      backing storage.  We can just use the existing image directly.
      
      This does not only simplify things a bit, but most importantly it
      gets the reference counting right, so the backing storage for the
      pixman image wouldn't be released underneath us.
      
      Use new function in virtio-gpu, where using it actually fixes
      use-after-free crashes.
      
      Cc: qemu-stable@nongnu.org
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Message-id: 1459499240-742-1-git-send-email-kraxel@redhat.com
      ca58b45f
  7. 31 3月, 2016 1 次提交
  8. 17 3月, 2016 2 次提交
  9. 14 3月, 2016 2 次提交
  10. 11 3月, 2016 1 次提交
    • 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
  11. 01 3月, 2016 4 次提交
  12. 28 2月, 2016 1 次提交
    • G
      xics: report errors with the QEMU Error API · a005b3ef
      Greg Kurz 提交于
      Using the return value to report errors is error prone:
      - xics_alloc() returns -1 on error but spapr_vio_busdev_realize() errors
        on 0
      - xics_alloc_block() returns the unclear value of ics->offset - 1 on error
        but both rtas_ibm_change_msi() and spapr_phb_realize() error on 0
      
      This patch adds an errp argument to xics_alloc() and xics_alloc_block() to
      report errors. The return value of these functions is a valid IRQ number
      if errp is NULL. It is undefined otherwise.
      
      The corresponding error traces get promotted to error messages. Note that
      the "can't allocate IRQ" error message in spapr_vio_busdev_realize() also
      moves to xics_alloc(). Similar error message consolidation isn't really
      applicable to xics_alloc_block() because callers have extra context (device
      config address, MSI or MSIX).
      
      This fixes the issues mentioned above.
      
      Based on previous work from Brian W. Hart.
      Signed-off-by: NGreg Kurz <gkurz@linux.vnet.ibm.com>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      a005b3ef
  13. 25 2月, 2016 1 次提交
  14. 09 2月, 2016 1 次提交
    • P
      hw: Add support for LSI SAS1068 (mptsas) device · e351b826
      Paolo Bonzini 提交于
      This adds the SAS1068 device, a SAS disk controller used in VMware that
      is oldish but widely supported and has decent performance.  Unlike
      megasas, it presents itself as a SAS controller and not as a RAID
      controller.  The device corresponds to the mptsas kernel driver in
      Linux.
      
      A few small things in the device setup are based on Don Slutz's old
      patch, but the device emulation was written from scratch based on Don's
      SeaBIOS patch and on the FreeBSD and Linux drivers.  It is 2400 lines
      shorter than Don's patch (and roughly the same size as MegaSAS---also
      because it doesn't support the similar SPI controller), implements SCSI
      task management functions (with asynchronous cancellation), supports
      big-endian hosts, has complete support for migration and follows the
      QEMU coding standards much more closely.
      
      To write the driver, I first split Don's patch in two parts, with
      the configuration bits in one file and the rest in a separate file.
      I first left mptconfig.c in place and rewrote the rest, then deleted
      mptconfig.c as well.  The configuration pages are still based mostly on
      VirtualBox's, though not exactly the same.  However, the implementation
      is completely different.  The contents of the pages themselves should
      not be copyrightable.
      Signed-off-by: NDon Slutz <Don@CloudSwitch.com>
      Message-Id: <1347382813-5662-1-git-send-email-Don@CloudSwitch.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      e351b826
  15. 20 1月, 2016 1 次提交
    • A
      vfio/pci: Lazy PBA emulation · 95239e16
      Alex Williamson 提交于
      The PCI spec recommends devices use additional alignment for MSI-X
      data structures to allow software to map them to separate processor
      pages.  One advantage of doing this is that we can emulate those data
      structures without a significant performance impact to the operation
      of the device.  Some devices fail to implement that suggestion and
      assigned device performance suffers.
      
      One such case of this is a Mellanox MT27500 series, ConnectX-3 VF,
      where the MSI-X vector table and PBA are aligned on separate 4K
      pages.  If PBA emulation is enabled, performance suffers.  It's not
      clear how much value we get from PBA emulation, but the solution here
      is to only lazily enable the emulated PBA when a masked MSI-X vector
      fires.  We then attempt to more aggresively disable the PBA memory
      region any time a vector is unmasked.  The expectation is then that
      a typical VM will run entirely with PBA emulation disabled, and only
      when used is that emulation re-enabled.
      Reported-by: NShyam Kaushik <shyam.kaushik@gmail.com>
      Tested-by: NShyam Kaushik <shyam.kaushik@gmail.com>
      Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
      95239e16
  16. 07 1月, 2016 2 次提交
  17. 18 12月, 2015 8 次提交
    • D
      io: add QIOChannelCommand class · 195e14d0
      Daniel P. Berrange 提交于
      Add a QIOChannel subclass that is capable of performing I/O
      to/from a separate process, via a pair of pipes. The command
      can be used for unidirectional or bi-directional I/O.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      195e14d0
    • D
      io: add QIOChannelWebsock class · 2d1d0e70
      Daniel P. Berrange 提交于
      Add a QIOChannel subclass that can run the websocket protocol over
      the top of another QIOChannel instance. This initial implementation
      is only capable of acting as a websockets server. There is no support
      for acting as a websockets client yet.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      2d1d0e70
    • D
      io: add QIOChannelTLS class · ed8ee42c
      Daniel P. Berrange 提交于
      Add a QIOChannel subclass that can run the TLS protocol over
      the top of another QIOChannel instance. The object provides a
      simplified API to perform the handshake when starting the TLS
      session. The layering of TLS over the underlying channel does
      not have to be setup immediately. It is possible to take an
      existing QIOChannel that has done some handshake and then swap
      in the QIOChannelTLS layer. This allows for use with protocols
      which start TLS right away, and those which start plain text
      and then negotiate TLS.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      ed8ee42c
    • D
      io: add QIOChannelFile class · d6e48869
      Daniel P. Berrange 提交于
      Add a QIOChannel subclass that is capable of operating on things
      that are files, such as plain files, pipes, character/block
      devices, but notably not sockets.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      d6e48869
    • D
      io: add QIOChannelSocket class · 559607ea
      Daniel P. Berrange 提交于
      Implement a QIOChannel subclass that supports sockets I/O.
      The implementation is able to manage a single socket file
      descriptor, whether a TCP/UNIX listener, TCP/UNIX connection,
      or a UDP datagram. It provides APIs which can listen and
      connect either asynchronously or synchronously. Since there
      is no asynchronous DNS lookup API available, it uses the
      QIOTask helper for spawning a background thread to ensure
      non-blocking operation.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      559607ea
    • D
      io: add QIOTask class for async operations · b02db2d9
      Daniel P. Berrange 提交于
      A number of I/O operations need to be performed asynchronously
      to avoid blocking the main loop. The caller of such APIs need
      to provide a callback to be invoked on completion/error and
      need access to the error, if any. The small QIOTask provides
      a simple framework for dealing with such probes. The API
      docs inline provide an outline of how this is to be used.
      
      Some functions don't have the ability to run asynchronously
      (eg getaddrinfo always blocks), so to facilitate their use,
      the task class provides a mechanism to run a blocking
      function in a thread, while triggering the completion
      callback in the main event loop thread. This easily allows
      any synchronous function to be made asynchronous, albeit
      at the cost of spawning a thread.
      
      In this series, the QIOTask class will be used for things like
      the TLS handshake, the websockets handshake and TCP connect()
      progress.
      
      The concept of QIOTask is inspired by the GAsyncResult
      interface / GTask class in the GIO libraries. The min
      version requirements on glib don't allow those to be
      used from QEMU, so QIOTask provides a facsimilie which
      can be easily switched to GTask in the future if the
      min version is increased.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      b02db2d9
    • P
      linux-user: convert DEBUG_SIGNAL logging to tracepoints · c8ee0a44
      Paolo Bonzini 提交于
      "Unimplemented" messages go to stderr, everything else goes to tracepoints
      Reviewed-by: NLaurent Vivier <lvivier@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      c8ee0a44
    • P
      c6ce9f17
  18. 15 12月, 2015 3 次提交
    • G
      fw_cfg: add generic non-DMA read method · 38bf2093
      Gabriel L. Somlo 提交于
      Introduce fw_cfg_data_read(), a generic read method which works
      on all access widths (1 through 8 bytes, inclusive), and can be
      used during both IOPort and MMIO read accesses.
      
      To maintain legibility, only fw_cfg_data_mem_read() (the MMIO
      data read method) is replaced by this patch. The new method
      essentially unwinds the fw_cfg_data_mem_read() + fw_cfg_read()
      combo, but without unnecessarily repeating all the validity
      checks performed by the latter on each byte being read.
      
      This patch also modifies the trace_fw_cfg_read prototype to
      accept a 64-bit value argument, allowing it to work properly
      with the new read method, but also remain backward compatible
      with existing call sites.
      
      Cc: Laszlo Ersek <lersek@redhat.com>
      Cc: Gerd Hoffmann <kraxel@redhat.com>
      Cc: Marc Marí <markmb@redhat.com>
      Signed-off-by: NGabriel Somlo <somlo@cmu.edu>
      Reviewed-by: NLaszlo Ersek <lersek@redhat.com>
      Message-id: 1446733972-1602-6-git-send-email-somlo@cmu.edu
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      38bf2093
    • B
      usb-mtp: Add support for inotify based file monitoring · 8e3e3897
      Bandan Das 提交于
      For now, we use inotify watches to track only a small number of
      events, namely, add, delete and modify. Note that for delete, the kernel
      already deactivates the watch for us and we just need to
      take care of modifying our internal state.
      
      inotify is a linux only mechanism.
      Suggested-by: NGerd Hoffman <kraxel@redhat.com>
      Signed-off-by: NBandan Das <bsd@redhat.com>
      Message-id: 1448314625-3855-4-git-send-email-bsd@redhat.com
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      8e3e3897
    • B
      usb-mtp: use a list for keeping track of children · 4c7a67f5
      Bandan Das 提交于
      To support adding/removal of objects, we will need to update
      the object cache hierarchy we have built internally. Convert
      to using a Qlist for easier management.
      Signed-off-by: NBandan Das <bsd@redhat.com>
      Message-id: 1448314625-3855-2-git-send-email-bsd@redhat.com
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      4c7a67f5
  19. 03 12月, 2015 1 次提交
  20. 10 11月, 2015 5 次提交