1. 04 Oct, 2014 5 commits
  2. 25 Sep, 2014 1 commit
    • Markus Armbruster's avatar
      block: Keep DriveInfo alive until BlockDriverState dies · 3ae59580
      Markus Armbruster authored
      If the BDS's refcnt > 0, drive_del() destroys the DriveInfo, but not
      the BDS.  This can happen in three places:
      * Device model destruction during unplug: blockdev_auto_del()
      * Xen IDE unplug: pci_piix3_xen_ide_unplug()
      * drive_del command when no device model is attached: do_drive_del()
      The other callers of drive_del are on error paths where refcnt == 1.
      If the user somehow manages to plug in a device model using a BDS that
      has gone through drive_del(), the legacy configuration passed in
      DriveInfo doesn't reach the device model, and automatic deletion on
      unplug doesn't work.  Worse, some device models such as scsi-disk
      crash when DriveInfo doesn't exist.
      This is theoretical; I didn't research an actual reproducer. The problem
      was introduced when we replaced DriveInfo reference counting by BDS
      reference counting in commit a94a3fac..fa510ebf
      Fix by keeping DriveInfo alive until its BDS dies.
      This affects qemu_drive_opts: now you can't reuse the same ID for new
      drive options until the BDS dies.  Before, you could, but since the
      code always attempts to create a BDS with the same ID next, the
      enclosing operation "create a new drive" failed anyway.  Different
      error path, same result.
      Unfortunately, the fix involves use of blockdev.c stuff from block.c,
      which is a layering violation.  Fortunately, my forthcoming
      BlockBackend work will get rid of it again.
      Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: default avatarMax Reitz <mreitz@redhat.com>
      Reviewed-by: default avatarBenoît Canet <benoit.canet@nodalink.com>
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
  3. 22 Sep, 2014 1 commit
  4. 16 Sep, 2014 3 commits
  5. 10 Sep, 2014 1 commit
    • Benoît Canet's avatar
      block: Extract the block accounting code · 5e5a94b6
      Benoît Canet authored
      The plan is to add new accounting metrics (latency, invalid requests, failed
      requests, queue depth) and block.c is overpopulated so it will be better to work
      in a separate module.
      Moreover the long term plan is to have statistics in each of the BDS of the graph
      for metrology purpose; this means that the device model statistics must move from
      the topmost BDS to the device model.
      So we need to decouple the statistic code from BlockDriverState.
      This is another argument for the extraction of the code in a separate module.
      CC: Kevin Wolf <kwolf@redhat.com>
      CC: Stefan Hajnoczi <stefanha@redhat.com>
      CC: Max Reitz <mreitz@redhat.com>
      CC: Eric Blake <eblake@redhat.com>
      CC: Benoit Canet <benoit@irqsave.net>
      CC: Fam Zheng <famz@redhat.com>
      CC: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
      CC: Paolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: default avatarBenoît Canet <benoit.canet@nodalink.com>
      Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
  6. 08 Sep, 2014 1 commit
  7. 01 Sep, 2014 1 commit
  8. 24 Aug, 2014 1 commit
  9. 06 Aug, 2014 1 commit
    • Paolo Bonzini's avatar
      backends: Introduce chr-testdev · 5692399f
      Paolo Bonzini authored
      From: Paolo Bonzini <pbonzini@redhat.com>
      chr-testdev enables a virtio serial channel to be used for guest
      initiated qemu exits. hw/misc/debugexit already enables guest
      initiated qemu exits, but only for PC targets. chr-testdev supports
      any virtio-capable target. kvm-unit-tests/arm is already making use
      of this backend.
      Currently there is a single command implemented, "q".  It takes a
      (prefix) argument for the exit code, thus an exit is implemented by
      writing, e.g. "1q", to the virtio-serial port.
      It can be used as:
         $QEMU ... \
           -device virtio-serial-device \
           -device virtserialport,chardev=ctd -chardev testdev,id=ctd
      or, use:
         $QEMU ... \
           -device virtio-serial-device \
           -device virtconsole,chardev=ctd -chardev testdev,id=ctd
      to bind it to virtio-serial port0.
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: default avatarAndrew Jones <drjones@redhat.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
  10. 06 Jul, 2014 1 commit
    • Kirill Batuzov's avatar
      Handle G_IO_HUP in tcp_chr_read for tcp chardev · 812c1057
      Kirill Batuzov authored
      Since commit cdaa86a5
      ("Add G_IO_HUP handler for socket chardev")
      GLib limitation results in a bug on Windows host. Steps to reproduce:
      Start qemu: qemu-system-i386 -qmp tcp:
      Connect with telnet: telnet 4444
      Try sending some data from telnet.
      Expected result: answers from QEMU.
      Observed result: no answers (actually tcp_chr_read is not called at all).
      Due to GLib limitations it is not possible to create several watches on one
      channel on Windows hosts. See bug #338943 in GNOME bugzilla for details:
      This reimplements commit cdaa86a5
      ("Add G_IO_HUP handler for socket chardev") using a single watch:
      Handle G_IO_HUP in tcp_chr_read instead. It is already watched by a
      corresponding watch.  Remove the second watch with its handler.
      Cc: Antonios Motakis <a.motakis@virtualopensystems.com>
      Cc: Nikolay Nikolaev <n.nikolaev@virtualopensystems.com>
      Cc: Michael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarKirill Batuzov <batuzovk@ispras.ru>
      Signed-off-by: default avatarNikita Belov <zodiac@ispras.ru>
      Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
  11. 29 Jun, 2014 1 commit
  12. 23 Jun, 2014 7 commits
  13. 19 Jun, 2014 16 commits