1. 16 11月, 2012 3 次提交
  2. 29 10月, 2012 1 次提交
  3. 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
  4. 09 9月, 2012 1 次提交
  5. 30 8月, 2012 1 次提交
  6. 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
  7. 09 8月, 2012 1 次提交
  8. 07 8月, 2012 1 次提交
  9. 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
  10. 17 7月, 2012 1 次提交
  11. 12 7月, 2012 3 次提交
  12. 04 7月, 2012 1 次提交
  13. 18 6月, 2012 1 次提交
  14. 07 6月, 2012 2 次提交
  15. 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
  16. 19 5月, 2012 1 次提交
  17. 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
  18. 22 2月, 2012 1 次提交
  19. 15 2月, 2012 1 次提交
  20. 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
  21. 28 1月, 2012 2 次提交
  22. 21 1月, 2012 1 次提交
    • B
      virtio-pci: Fix endianness of virtio config · 82afa586
      Benjamin Herrenschmidt 提交于
      The virtio config area in PIO space is a bit special. The initial
      header is little endian but the rest (device specific) is guest
      native endian.
      
      The PIO accessors for PCI on machines that don't have native IO ports
      assume that all PIO is little endian, which works fine for everything
      except the above.
      
      A complicated way to fix it would be to split the BAR into two memory
      regions with different endianess settings, but this isn't practical
      to do, besides, the PIO code doesn't honor region endianness anyway
      (I have a patch for that too but it isn't necessary at this stage).
      
      So I decided to go for the quick fix instead which consists of
      reverting the swap in virtio-pci in selected places, hoping that when
      we eventually do a "v2" of the virtio protocols, we sort that out once
      and for all using a fixed endian setting for everything.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      [agraf: keep virtio in libhw and determine endianness through a
              helper function in exec.c]
      Reviewed-by: NAnthony Liguori <aliguori@us.ibm.com>
      82afa586
  23. 14 1月, 2012 1 次提交
  24. 09 12月, 2011 1 次提交
  25. 05 12月, 2011 1 次提交
  26. 29 11月, 2011 1 次提交
  27. 02 11月, 2011 2 次提交
    • A
      Revert "virtio: Add PCI memory BAR in addition to PIO BAR" · b0eb8449
      Anthony Liguori 提交于
      This reverts commit 46d95bfe.
      b0eb8449
    • D
      virtio: Add PCI memory BAR in addition to PIO BAR · 46d95bfe
      David Gibson 提交于
      Currently, virtio devices are usually presented to the guest as an
      emulated PCI device, virtio_pci.  Although the actual IO operations
      are done through system memory, the configuration of the virtio device
      is done through the one PCI IO space BAR that virtio_pci presents.
      
      But PCI IO space (aka PIO) is deprecated for modern PCI devices, and
      on some systems with many PCI domains accessing PIO space can be
      problematic.  For example on the existing PowerVM implementation of
      the PAPR spec, PCI PIO access is not supported at all.  We're hoping
      that our KVM implementation will support PCI PIO (once we support PCI
      at all), but it will probably have some irritating limitations.
      
      This patch, therefore, extends the virtio_pci device to have a PCI
      memory space (MMIO) BAR as well as the IO BAR.  The MMIO BAR contains
      exactly the same registers, in exactly the same layout as the existing
      PIO BAR.
      
      Because the PIO BAR is still present, existing guest drivers should
      still work fine.  With this change in place, future guest drivers can
      check for an MMIO BAR and use that if present (falling back to PIO
      when possible to support older qemu versions).
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      46d95bfe
  28. 12 10月, 2011 1 次提交