1. 07 6月, 2016 2 次提交
  2. 08 4月, 2016 2 次提交
  3. 23 3月, 2016 1 次提交
    • M
      include/qemu/osdep.h: Don't include qapi/error.h · da34e65c
      Markus Armbruster 提交于
      Commit 57cb38b3 included qapi/error.h into qemu/osdep.h to get the
      Error typedef.  Since then, we've moved to include qemu/osdep.h
      everywhere.  Its file comment explains: "To avoid getting into
      possible circular include dependencies, this file should not include
      any other QEMU headers, with the exceptions of config-host.h,
      compiler.h, os-posix.h and os-win32.h, all of which are doing a
      similar job to this file and are under similar constraints."
      qapi/error.h doesn't do a similar job, and it doesn't adhere to
      similar constraints: it includes qapi-types.h.  That's in excess of
      100KiB of crap most .c files don't actually need.
      
      Add the typedef to qemu/typedefs.h, and include that instead of
      qapi/error.h.  Include qapi/error.h in .c files that need it and don't
      get it now.  Include qapi-types.h in qom/object.h for uint16List.
      
      Update scripts/clean-includes accordingly.  Update it further to match
      reality: replace config.h by config-target.h, add sysemu/os-posix.h,
      sysemu/os-win32.h.  Update the list of includes in the qemu/osdep.h
      comment quoted above similarly.
      
      This reduces the number of objects depending on qapi/error.h from "all
      of them" to less than a third.  Unfortunately, the number depending on
      qapi-types.h shrinks only a little.  More work is needed for that one.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      [Fix compilation without the spice devel packages. - Paolo]
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      da34e65c
  4. 25 2月, 2016 1 次提交
  5. 07 2月, 2016 2 次提交
  6. 05 2月, 2016 1 次提交
  7. 03 2月, 2016 1 次提交
  8. 29 1月, 2016 1 次提交
  9. 16 1月, 2016 1 次提交
  10. 26 11月, 2015 1 次提交
  11. 30 10月, 2015 1 次提交
    • P
      virtio: sync the dataplane vring state to the virtqueue before virtio_save · 10a06fd6
      Pavel Butsykin 提交于
      When creating snapshot with the dataplane enabled, the snapshot file gets
      not the actual state of virtqueue, because the current state is stored in
      VirtIOBlockDataPlane. Therefore, before saving snapshot need to sync
      the dataplane vring state to the virtqueue. The dataplane will resume its
      work at the next notify virtqueue.
      
      When snapshot loads with loadvm we get a message:
      VQ 0 size 0x80 Guest index 0x15f5 inconsistent with Host index 0x0:
          delta 0x15f5
      error while loading state for instance 0x0 of device
          '0000:00:08.0/virtio-blk'
      Error -1 while loading VM state
      
      to reproduce the error I used the following hmp commands:
      savevm snap1
      loadvm snap1
      
      qemu parameters:
      --enable-kvm -smp 4 -m 1024 -drive file=/var/lib/libvirt/images/centos6.4.qcow2,if=none,id=drive-virtio-disk0,format=qcow2,cache=none,aio=native -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x8,drive=drive-virtio-disk0,id=virtio-disk0 -set device.virtio-disk0.x-data-plane=on
      Signed-off-by: NPavel Butsykin <pbutsykin@virtuozzo.com>
      Signed-off-by: NDenis V. Lunev <den@openvz.org>
      Message-id: 1445859777-2982-1-git-send-email-den@openvz.org
      CC: Stefan Hajnoczi <stefanha@redhat.com>
      CC: "Michael S. Tsirkin" <mst@redhat.com>
      CC: Kevin Wolf <kwolf@redhat.com>
      CC: Paolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      10a06fd6
  12. 29 10月, 2015 1 次提交
  13. 13 10月, 2015 1 次提交
  14. 10 9月, 2015 1 次提交
  15. 30 7月, 2015 1 次提交
  16. 27 7月, 2015 2 次提交
  17. 11 6月, 2015 1 次提交
  18. 01 6月, 2015 1 次提交
  19. 31 5月, 2015 1 次提交
  20. 28 4月, 2015 1 次提交
  21. 18 3月, 2015 1 次提交
    • F
      virtio-scsi: Fix assert in virtio_scsi_push_event · 2034e324
      Fam Zheng 提交于
      Hotplugging a scsi-disk may trigger the assertion in qemu_sgl_concat.
      
          qemu-system-x86_64: qemu/hw/scsi/virtio-scsi.c:115: qemu_sgl_concat:
          Assertion `skip == 0' failed.
      
      This is introduced by commit 55783a55 (virtio-scsi: work around bug in
      old BIOSes) which didn't check out_num when accessing out_sg[0].iov_len
      (the same to in sg). For virtio_scsi_push_event, looking into out_sg
      doesn't make sense because 0 req_size is intended.
      
      Cc: qemu-stable@nongnu.org
      [Cc'ing qemu-stable because 55783a55 did it too]
      Signed-off-by: NFam Zheng <famz@redhat.com>
      Message-Id: <1426233354-525-1-git-send-email-famz@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      2034e324
  22. 12 3月, 2015 2 次提交
  23. 02 3月, 2015 1 次提交
    • M
      virtio-scsi: Allocate op blocker reason before blocking · f6758f7d
      Max Reitz 提交于
      s->blocker is really only used in hw/scsi/virtio-scsi.c; the only places
      where it is used in hw/scsi/virtio-scsi-dataplane.c is when it is
      allocated and when it is freed. That does not make a whole lot of sense
      (and is actually wrong because this leads to s->blocker potentially
      being NULL when blk_op_block_all() is called in virtio-scsi.c), so move
      the allocation and destruction of s->blocker to the device realization
      and unrealization in virtio-scsi.c, respectively.
      
      Case in point:
      
      $ echo -e 'eject drv\nquit' | \
          x86_64-softmmu/qemu-system-x86_64 \
              -monitor stdio -machine accel=qtest -display none \
              -object iothread,id=thr -device virtio-scsi-pci,iothread=thr \
              -drive if=none,file=test.qcow2,format=qcow2,id=drv \
              -device scsi-cd,drive=drv
      
      Without this patch:
      
      (qemu) eject drv
      [1]    10102 done
             10103 segmentation fault (core dumped)
      
      With this patch:
      
      (qemu) eject drv
      Device 'drv' is busy: block device is in use by data plane
      (qemu) quit
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      Message-Id: <1425057113-26940-1-git-send-email-mreitz@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      f6758f7d
  24. 27 2月, 2015 1 次提交
  25. 26 2月, 2015 2 次提交
  26. 27 1月, 2015 1 次提交
  27. 15 12月, 2014 1 次提交
  28. 07 11月, 2014 1 次提交
    • P
      virtio-scsi: work around bug in old BIOSes · 55783a55
      Paolo Bonzini 提交于
      Old BIOSes left some padding by mistake after the req_size/resp_size.
      New QEMU does not like it, thinking it is a bidirectional command.
      
      As a workaround, we can check if the ANY_LAYOUT bit is set; if not, we
      always consider the first buffer as the virtio-scsi request/response,
      because, back when QEMU did not support ANY_LAYOUT, it expected the
      payload to start at the second element of the iovec.
      
      This can show up during migration.
      
      Cc: qemu-stable@nongnu.org
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      55783a55
  29. 31 10月, 2014 2 次提交
  30. 27 10月, 2014 2 次提交
  31. 23 10月, 2014 1 次提交
  32. 20 10月, 2014 1 次提交
    • M
      hw: Convert from BlockDriverState to BlockBackend, mostly · 4be74634
      Markus Armbruster 提交于
      Device models should access their block backends only through the
      block-backend.h API.  Convert them, and drop direct includes of
      inappropriate headers.
      
      Just four uses of BlockDriverState are left:
      
      * The Xen paravirtual block device backend (xen_disk.c) opens images
        itself when set up via xenbus, bypassing blockdev.c.  I figure it
        should go through qmp_blockdev_add() instead.
      
      * Device model "usb-storage" prompts for keys.  No other device model
        does, and this one probably shouldn't do it, either.
      
      * ide_issue_trim_cb() uses bdrv_aio_discard() instead of
        blk_aio_discard() because it fishes its backend out of a BlockAIOCB,
        which has only the BlockDriverState.
      
      * PC87312State has an unused BlockDriverState[] member.
      
      The next two commits take care of the latter two.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NMax Reitz <mreitz@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      4be74634