• When we finish migration, there may be pending async io requests
    in flight. If we don't flush it before stage3 starting, it might be
    the case that the guest loses it.
    
    Signed-off-by: Glauber Costa <glommer@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Glauber Costa authored
     
    Browse Code »
  • Allocate enough memory for KVM_GET_MSR_INDEX_LIST as older kernels shot
    far beyond their limits, corrupting user space memory.
    
    Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Jan Kiszka authored
     
    Browse Code »
  • Usage of msi vectors is controlled by the guest and so needs to be
    restored on load. Do this for msi vectors used by the virtio device.
    
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Michael S. Tsirkin authored
     
    Browse Code »
  • MSIX present bit is tested incorrectly, and only happens to work because
    the bit we are testing is 0x1.  Add braces to fix this.
    
    Reported-by: Blue Swirl <blauwirbel@gmail.com>
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Michael S. Tsirkin authored
     
    Browse Code »
  • Clean up msix vector usage state on load. Since guest might have control
    over it through the device, the device will have to load this state from
    file.
    
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Michael S. Tsirkin authored
     
    Browse Code »
  • Contrary to what one could expect, the size of L1 tables is not cluster
    aligned. So as we're writing whole sectors now instead of single entries,
    we need to ensure that the L1 table in memory is large enough; otherwise
    write would access memory after the end of the L1 table.
    
    Signed-off-by: Kevin Wolf <kwolf@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Kevin Wolf authored
     
    Browse Code »
  • Pass is_write = 1 to qcow_aio_setup when writing.
    
    Signed-off-by: Kevin Wolf <kwolf@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Kevin Wolf authored
     
    Browse Code »
  • Scanning for devices via /sys/bus/usb/devices/ and using them via the
    /dev/bus/usb/<bus>/<device> character devices is the prefered method
    on modern kernels, so try that first.
    
    When using SELinux and libvirt, qemu will have access to /sys/bus/usb
    but not /proc/bus/usb, so although the current code will work just
    fine, it will generate SELinux AVC warnings.
    
    See also:
    
      https://bugzilla.redhat.com/508326
    
    Reported-by: Daniel Berrange <berrange@redhat.com>
    Signed-off-by: Mark McLoughlin <markmc@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Mark McLoughlin authored
     
    Browse Code »
  • This fixes a possible endianness issue in the usb-ohci hw module.
    hcca.frame and ohci->frame_number are 16bit, so use cpu_to_le16().
    
    Signed-off-by: Michael Buesch <mb@bu3sch.de>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Michael Buesch authored
     
    Browse Code »
  • Fixes build on 32-bit
    
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Anthony Liguori authored
     
    Browse Code »
  • qemu-io leaks the request buffer whenever the read or write function isn't
    executed completely down the "normal" code path.
    
    [hch: also fix the aio and vectored variants the same way]
    
    Signed-off-by: Kevin Wolf <kwolf@redhat.com>
    Signed-off-by: Christoph Hellwig <hch@lst.de>
    Kevin Wolf authored
     
    Browse Code »
  • Add a -g flag to the open command and the main qemu-io command line to
    allow opening a file growable.  This is only allowed for protocols,
    mirroring the limitation exposed through bdrv_file_open.
    
    Signed-off-by: Christoph Hellwig <hch@lst.de>
    Reviewed-by: Kevin Wolf <kwolf@redhat.com>
    Christoph Hellwig authored
     
    Browse Code »
  • Fix up a couple of issues with validating the input of the various
    length arguments for the vectored I/O commands:
    
     - do the alignment check on each length instead the always 0 count argument
     - use a long long varibale for the cvtnum return value so that we can check
       wether it wasn't a number
     - check for a too large argument instead of truncating it
    
    Also refactor it into a common helper for all four calers and avoid parsing
    the numbers twice.
    
    Signed-off-by: Christoph Hellwig <hch@lst.de>
    Reviewed-by: Kevin Wolf <kwolf@redhat.com>
    Christoph Hellwig authored
     
    Browse Code »
  • Address a couple of review comments from Kevin.
    
    Signed-off-by: Christoph Hellwig <hch@lst.de>
    Christoph Hellwig authored
     
    Browse Code »