1. 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
  2. 29 7月, 2013 2 次提交
  3. 25 4月, 2013 2 次提交
  4. 12 4月, 2013 1 次提交
  5. 09 4月, 2013 2 次提交
  6. 19 3月, 2013 7 次提交
  7. 04 3月, 2013 1 次提交
  8. 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
  9. 18 1月, 2013 1 次提交
    • S
      dataplane: support viostor virtio-pci status bit setting · cf139388
      Stefan Hajnoczi 提交于
      The viostor virtio-blk driver for Windows does not use the
      VIRTIO_CONFIG_S_DRIVER bit.  It only sets the VIRTIO_CONFIG_S_DRIVER_OK
      bit.
      
      The viostor driver refreshes the virtio-pci status byte sometimes while
      the guest is running.  We misinterpret 0x4 (VIRTIO_CONFIG_S_DRIVER_OK)
      as an indication that virtio-blk-data-plane should be stopped since 0x2
      (VIRTIO_CONFIG_S_DRIVER) is missing.  The result is that the device
      becomes unresponsive.
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      cf139388
  10. 02 1月, 2013 3 次提交
    • A
      virtio-blk: Return UNSUPP for unknown request types · 9e72c450
      Alexey Zaytsev 提交于
      Currently, all unknown requests are treated as VIRTIO_BLK_T_IN
      Signed-off-by: NAlexey Zaytsev <alexey.zaytsev@gmail.com>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      9e72c450
    • S
      virtio-blk: add x-data-plane=on|off performance feature · 392808b4
      Stefan Hajnoczi 提交于
      The virtio-blk-data-plane feature is easy to integrate into
      hw/virtio-blk.c.  The data plane can be started and stopped similar to
      vhost-net.
      
      Users can take advantage of the virtio-blk-data-plane feature using the
      new -device virtio-blk-pci,x-data-plane=on property.
      
      The x-data-plane name was chosen because at this stage the feature is
      experimental and likely to see changes in the future.
      
      If the VM configuration does not support virtio-blk-data-plane an error
      message is printed.  Although we could fall back to regular virtio-blk,
      I prefer the explicit approach since it prompts the user to fix their
      configuration if they want the performance benefit of
      virtio-blk-data-plane.
      
      Limitations:
       * Only format=raw is supported
       * Live migration is not supported
       * Block jobs, hot unplug, and other operations fail with -EBUSY
       * I/O throttling limits are ignored
       * Only Linux hosts are supported due to Linux AIO usage
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      392808b4
    • 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
  11. 19 12月, 2012 2 次提交
  12. 29 9月, 2012 4 次提交
  13. 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
  14. 18 8月, 2012 1 次提交
    • S
      virtio-blk: hide VIRTIO_BLK_F_CONFIG_WCE from old machine types · eec7f96c
      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: NKevin Wolf <kwolf@redhat.com>
      eec7f96c
  15. 10 8月, 2012 3 次提交
  16. 17 7月, 2012 6 次提交
  17. 30 5月, 2012 2 次提交