1. 08 4月, 2015 1 次提交
  2. 26 2月, 2015 1 次提交
  3. 07 2月, 2015 3 次提交
  4. 24 1月, 2015 1 次提交
  5. 20 10月, 2014 3 次提交
  6. 22 9月, 2014 1 次提交
  7. 10 9月, 2014 1 次提交
    • B
      block: Extract the block accounting code · 5e5a94b6
      Benoît Canet 提交于
      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: NBenoît Canet <benoit.canet@nodalink.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      5e5a94b6
  8. 14 7月, 2014 1 次提交
  9. 06 7月, 2014 1 次提交
  10. 01 7月, 2014 4 次提交
  11. 28 6月, 2014 7 次提交
  12. 04 6月, 2014 1 次提交
  13. 13 3月, 2014 1 次提交
    • S
      dataplane: replace internal thread with IOThread · 48ff2692
      Stefan Hajnoczi 提交于
      Today virtio-blk dataplane uses a 1:1 device-per-thread model.  Now that
      IOThreads have been introduced we can generalize this to N:M devices per
      threads.
      
      This patch drops thread code from dataplane in favor of running inside
      an IOThread AioContext.
      
      As a bonus we solve the case where a guest keeps submitting I/O requests
      while dataplane is trying to stop.  Previously the dataplane thread
      would continue to process requests until the request gave it a break.
      Now we can shut down in bounded time thanks to
      aio_context_acquire/release.
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      48ff2692
  14. 21 9月, 2013 1 次提交
    • P
      virtio-blk: do not relay a previous driver's WCE configuration to the current · ef5bc962
      Paolo Bonzini 提交于
      The following sequence happens:
      - the SeaBIOS virtio-blk driver does not support the WCE feature, which
      causes QEMU to disable writeback caching
      
      - the Linux virtio-blk driver resets the device, finds WCE is available
      but writeback caching is disabled; tells block layer to not send cache
      flush commands
      
      - the Linux virtio-blk driver sets the DRIVER_OK bit, which causes
      writeback caching to be re-enabled, but the Linux virtio-blk driver does
      not know of this side effect and cache flushes remain disabled
      
      The bug is at the third step.  If the guest does know about CONFIG_WCE,
      QEMU should ignore the WCE feature's state.  The guest will control the
      cache mode solely using configuration space.  This change makes Linux
      do flushes correctly, but Linux will keep SeaBIOS's writethrough mode.
      
      Hence, whenever the guest is reset, the cache mode of the disk should
      be reset to whatever was specified in the "-drive" option.  With this
      change, the Linux virtio-blk driver finds that writeback caching is
      enabled, and tells the block layer to send cache flush commands
      appropriately.
      
      Reported-by: Rusty Russell <rusty@au1.ibm.com
      Cc: qemu-stable@nongnu.org
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      ef5bc962
  15. 29 7月, 2013 1 次提交
  16. 15 4月, 2013 1 次提交
  17. 09 4月, 2013 1 次提交
    • P
      hw: move headers to include/ · 0d09e41a
      Paolo Bonzini 提交于
      Many of these should be cleaned up with proper qdev-/QOM-ification.
      Right now there are many catch-all headers in include/hw/ARCH depending
      on cpu.h, and this makes it necessary to compile these files per-target.
      However, fixing this does not belong in these patches.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      0d09e41a
  18. 19 3月, 2013 5 次提交
  19. 01 3月, 2013 1 次提交
    • P
      hw: include hw header files with full paths · 83c9f4ca
      Paolo Bonzini 提交于
      Done with this script:
      
      cd hw
      for i in `find . -name '*.h' | sed 's/^..//'`; do
        echo '\,^#.*include.*["<]'$i'[">], s,'$i',hw/&,'
      done | sed -i -f - `find . -type f`
      
      This is so that paths remain valid as files are moved.
      
      Instead, files in hw/dataplane are referenced with the relative path.
      We know they are not going to move to include/, and they are the only
      include files that are in subdirectories _and_ move.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      83c9f4ca
  20. 02 1月, 2013 2 次提交
    • S
      dataplane: add virtio-blk data plane code · e72f66a0
      Stefan Hajnoczi 提交于
      virtio-blk-data-plane is a subset implementation of virtio-blk.  It only
      handles read, write, and flush requests.  It does this using a dedicated
      thread that executes an epoll(2)-based event loop and processes I/O
      using Linux AIO.
      
      This approach performs very well but can be used for raw image files
      only.  The number of IOPS achieved has been reported to be several times
      higher than the existing virtio-blk implementation.
      
      Eventually it should be possible to unify virtio-blk-data-plane with the
      main body of QEMU code once the block layer and hardware emulation is
      able to run outside the global mutex.
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      e72f66a0
    • S
      virtio-blk: restore VirtIOBlkConf->config_wce flag · 8a873ba7
      Stefan Hajnoczi 提交于
      Two slightly different versions of a patch to conditionally set
      VIRTIO_BLK_F_CONFIG_WCE through the "config-wce" qdev property have been
      applied (ea776abc and eec7f96c).  David Gibson
      <david@gibson.dropbear.id.au> noticed that the "config-wce"
      property is broken as a result and fixed it recently.
      
      The fix sets the host_features VIRTIO_BLK_F_CONFIG_WCE bit from a qdev
      property.  Unfortunately, the virtio device then has no chance to test
      for the presence of the feature bit during virtio_blk_init().
      
      Therefore, reinstate the VirtIOBlkConf->config_wce flag.  Drop the
      duplicate qdev property to set the host_features bit.  The
      VirtIOBlkConf->config_wce flag will be used by virtio-blk-data-plane in
      a later patch.
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      8a873ba7
  21. 11 12月, 2012 1 次提交
    • D
      virtio-blk: Remove duplicate property definition · d567e62f
      David Gibson 提交于
      For the virtio-blk device (via virtio-pci) the property "config-wce" is
      defined in two places.  First, it's defined from the
      DEFINE_VIRTIO_BLK_FEATURES macro, second it's defined directly in
      virtio-pci, just two lines above the call to that macro.
      
      The direct definition in virtio-pci.c is broken, since it operates on the
      'config_wce' field of VirtIOBlkConf, which is never used anywhere else.
      Therefore, this patch removes both the extra property definition and the
      redundant field it works on.
      
      Cc: Kevin Wolf <kwolf@redhat.com>
      Cc: Anthony Liguori <aliguori@us.ibm.com>
      Cc: Paul 'Rusty' Russell <rusty@rustcorp.com.au>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      d567e62f
  22. 22 8月, 2012 1 次提交
    • S
      virtio-blk: hide VIRTIO_BLK_F_CONFIG_WCE from old machine types · ea776abc
      Stefan Hajnoczi 提交于
      QEMU has a policy of keeping a stable guest device ABI.  When new guest device
      features are introduced they must not change hardware info seen by existing
      guests.  This is important because operating systems or applications may
      "fingerprint" the hardware and refuse to run when the hardware changes.  To
      always get the latest guest device ABI, run with x86 machine type "pc".
      
      This patch hides the new VIRTIO_BLK_F_CONFIG_WCE virtio feature bit from
      existing machine types.  Only pc-1.2 and later will expose this feature
      by default.
      
      For more info on the VIRTIO_BLK_F_CONFIG_WCE feature bit, see:
      
        commit 13e3dce0
        Author: Paolo Bonzini <pbonzini@redhat.com>
        Date:   Thu Aug 9 16:07:19 2012 +0200
      
            virtio-blk: support VIRTIO_BLK_F_CONFIG_WCE
      
            Also rename VIRTIO_BLK_F_WCACHE to VIRTIO_BLK_F_WCE for consistency with
            the spec.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      
      Anthony Liguori <aliguori@us.ibm.com> reported:
      
        This broke qemu-test because it changed the pc-1.0 machine type:
      
        Setting guest RANDOM seed to 47167
        *** Running tests ***
        Running test /tests/finger-print.sh...		OK
        --- fingerprints/pc-1.0.x86_64	2011-12-18 13:08:40.000000000 -0600
        +++ fingerprint.txt	2012-08-12 13:30:48.000000000 -0500
        @@ -55,7 +55,7 @@
         /sys/bus/pci/devices/0000:00:06.0/subsystem_device=0x0002
         /sys/bus/pci/devices/0000:00:06.0/class=0x010000
         /sys/bus/pci/devices/0000:00:06.0/revision=0x00
        -/sys/bus/pci/devices/0000:00:06.0/virtio/host-features=0x710006d4
        +/sys/bus/pci/devices/0000:00:06.0/virtio/host-features=0x71000ed4
         /sys/class/dmi/id/bios_vendor=Bochs
         /sys/class/dmi/id/bios_date=01/01/2007
         /sys/class/dmi/id/bios_version=Bochs
        Guest fingerprint changed for pc-1.0!
      Reported-by: NAnthony Liguori <aliguori@us.ibm.com>
      Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      ea776abc