1. 26 12月, 2012 2 次提交
  2. 20 12月, 2012 1 次提交
  3. 19 12月, 2012 3 次提交
  4. 17 12月, 2012 1 次提交
  5. 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
  6. 16 11月, 2012 3 次提交
  7. 29 10月, 2012 1 次提交
  8. 23 10月, 2012 1 次提交
    • A
      Rename target_phys_addr_t to hwaddr · a8170e5e
      Avi Kivity 提交于
      target_phys_addr_t is unwieldly, violates the C standard (_t suffixes are
      reserved) and its purpose doesn't match the name (most target_phys_addr_t
      addresses are not target specific).  Replace it with a finger-friendly,
      standards conformant hwaddr.
      
      Outstanding patchsets can be fixed up with the command
      
        git rebase -i --exec 'find -name "*.[ch]"
                              | xargs s/target_phys_addr_t/hwaddr/g' origin
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      a8170e5e
  9. 09 9月, 2012 1 次提交
  10. 30 8月, 2012 1 次提交
  11. 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
  12. 09 8月, 2012 1 次提交
  13. 07 8月, 2012 1 次提交
  14. 27 7月, 2012 2 次提交
    • P
      virtio-scsi: enable MSI-X support · 4c205d0c
      Paolo Bonzini 提交于
      While virtio-scsi does support multiqueue, the default number of
      interrupt vectors is not enough to actually enable usage of
      multiple queues in the driver; this is because with only 2
      vectors the driver will not be able to use a separate
      interrupt for each request queue.  Derive the desired number
      of vectors from the number of request queues.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      4c205d0c
    • P
      virtio-scsi: add ioeventfd support · 3f910904
      Paolo Bonzini 提交于
      Probably due to bad merge months ago, virtio-scsi-pci did not have
      ioeventfd support.  Fix this and enable it by default, as is the
      case for other virtio-pci devices.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      3f910904
  15. 17 7月, 2012 1 次提交
  16. 12 7月, 2012 3 次提交
  17. 04 7月, 2012 1 次提交
  18. 18 6月, 2012 1 次提交
  19. 07 6月, 2012 2 次提交
  20. 22 5月, 2012 4 次提交
    • P
      virtio-blk: always enable VIRTIO_BLK_F_SCSI · a6c5c84a
      Paolo Bonzini 提交于
      VIRTIO_BLK_F_SCSI is supposed to mean whether the host can *parse*
      SCSI requests, not *execute* them.  You could run QEMU with scsi=on
      and a file-backed disk, and QEMU would fail all SCSI requests even
      though it advertises VIRTIO_BLK_F_SCSI.
      
      Because we need to do this to fix a migration compatibility problem
      related to how QEMU is invoked by management, we must do this
      unconditionally even on older machine types.  This more or less assumes
      that no one ever invoked QEMU with scsi=off.
      
      Here is how testing goes:
      
      - old QEMU, scsi=on -> new QEMU, scsi=on
      - new QEMU, scsi=on -> old QEMU, scsi=on
      - old QEMU, scsi=off -> new QEMU, scsi=on
      - new QEMU, scsi=off -> old QEMU, scsi=on
              ok (new QEMU has VIRTIO_BLK_F_SCSI, adding host features is fine)
      
      - old QEMU, scsi=off -> new QEMU, scsi=off
              ok (new QEMU has VIRTIO_BLK_F_SCSI, adding host features is fine)
      
      - old QEMU, scsi=on -> new QEMU, scsi=off
              ok, bug fixed
      
      - new QEMU, scsi=on -> old QEMU, scsi=off
              doesn't work (same as: old QEMU, scsi=on -> old QEMU, scsi=off)
      
      - new QEMU, scsi=off -> old QEMU, scsi=off
              broken by the patch
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      a6c5c84a
    • P
      virtio-blk: define VirtIOBlkConf · 12c5674b
      Paolo Bonzini 提交于
      We will have to add another field to the virtio-blk configuration in
      the next patch.  Avoid a proliferation of arguments to virtio_blk_init.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      12c5674b
    • P
      virtio-blk: blockdev_mark_auto_del is transport-independent · 0e47931b
      Paolo Bonzini 提交于
      Move it from virtio_blk_exit_pci to virtio_blk_exit.
      
      This is included here because the next patch removes proxy->block.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      0e47931b
    • J
      virtio/vhost: Add support for KVM in-kernel MSI injection · 7d37d351
      Jan Kiszka 提交于
      Make use of the new vector notifier to track changes of the MSI-X
      configuration of virtio PCI devices. On enabling events, we establish
      the required virtual IRQ to MSI-X message route and link the signaling
      eventfd file descriptor to this vIRQ line. That way, vhost-generated
      interrupts can be directly delivered to an in-kernel MSI-X consumer like
      the x86 APIC.
      Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      7d37d351
  21. 19 5月, 2012 1 次提交
  22. 11 4月, 2012 1 次提交
    • D
      virtio-pci: change virtio balloon PCI class code · 2ba1d381
      David Gibson 提交于
      Currently the virtio balloon device, when using the virtio-pci interface
      advertises itself with PCI class code MEMORY_RAM.  This is wrong; the
      balloon is vaguely related to memory, but is nothing like a PCI memory
      device in the meaning of the class code, and this code is not required
      or suggested by the virtio PCI specification.
      
      Worse, this patch causes problems on the pseries machine, because the
      firmware, seeing this class code, advertises the device as memory in the
      device tree, and then a guest kernel bug causes it to see this "memory"
      before the real system memory, leading to a crash in early boot.
      
      This patch fixes the problem by removing the bogus PCI class code on the
      balloon device.  The backwards compatibility PC machines get new compat
      properties so that they don't change.
      
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      2ba1d381
  23. 22 2月, 2012 1 次提交
  24. 15 2月, 2012 1 次提交
  25. 04 2月, 2012 2 次提交
    • A
      qdev: remove baked in notion of aliases (v2) · 6acbe4c6
      Anthony Liguori 提交于
      Limit them to the device_add functionality.  Device aliases were a hack based
      on the fact that virtio was modeled the wrong way.  The mechanism for aliasing
      is very limited in that only one alias can exist for any device.
      
      We have to support it for the purposes of compatibility but we only need to
      support it in device_add so restrict it to that piece of code.
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      ---
      v1 -> v2
       - Use a table for aliases (Paolo)
      6acbe4c6
    • A
      qdev: register all types natively through QEMU Object Model · 39bffca2
      Anthony Liguori 提交于
      This was done in a mostly automated fashion.  I did it in three steps and then
      rebased it into a single step which avoids repeatedly touching every file in
      the tree.
      
      The first step was a sed-based addition of the parent type to the subclass
      registration functions.
      
      The second step was another sed-based removal of subclass registration functions
      while also adding virtual functions from the base class into a class_init
      function as appropriate.
      
      Finally, a python script was used to convert the DeviceInfo structures and
      qdev_register_subclass functions to TypeInfo structures, class_init functions,
      and type_register_static calls.
      
      We are almost fully converted to QOM after this commit.
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      39bffca2
  26. 28 1月, 2012 2 次提交