1. 12 11月, 2015 5 次提交
    • M
      hw/virtio: Add PCIe capability to virtio devices · 1811e64c
      Marcel Apfelbaum 提交于
      The virtio devices are converted to PCI-Express
      if they are plugged into a PCI-Express bus and
      the 'modern' protocol is enabled.
      
      Devices plugged directly into the Root Complex as
      Integrated Endpoints remain PCI.
      Signed-off-by: NMarcel Apfelbaum <marcel@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      1811e64c
    • J
      virtio-pci: unbreak queue_enable read · 393f04d3
      Jason Wang 提交于
      Guest always get zero when reading queue_enable. This violates
      spec. Fixing this by setting the queue_enable to true during any guest
      writing and setting it to zero during reset.
      
      Cc: Michael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NJason Wang <jasowang@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      393f04d3
    • J
      virtio-pci: introduce pio notification capability for modern device · 9824d2a3
      Jason Wang 提交于
      We used to use mmio for notification. This could be slow on some arch
      (e.g on x86 without EPT). So this patch introduces pio bar and a pio
      notification cap for modern device. This ability is enabled through
      property "modern-pio-notify" for virtio pci devices and was disabled
      by default. Management can enable when it thinks it was needed.
      
      Benchmarks shows almost no obvious difference compared to legacy
      device on machines without ept. Thanks Wenli Quan <wquan@redhat.com>
      for the benchmarking.
      
      Cc: Michael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NJason Wang <jasowang@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      9824d2a3
    • J
      virtio-pci: use zero length mmio eventfd for 1.0 notification cap when possible · bc85ccfd
      Jason Wang 提交于
      We use data match eventfd for 1.0 notification currently. This could
      be slow since software decoding is needed for mmio exit. To speed this
      up, we can switch to use zero length mmio eventfd for 1.0 notification
      since we can examine the queue index directly from the writing
      address. KVM kernel module can utilize this by registering it to fast
      mmio bus which could be as fast as pio on ept capable machine when
      fast mmio is supported by host kernel.
      
      Lots of improvements were seen on a ept capable machine:
      
      Guest RX:(TCP)
      size/session/+throughput%/+cpu%/-+per cpu%/
      64/1/+1.6807%/[-16.2421%]/[+21.3984%]/
      64/2/+0.6091%/[-11.0187%]/[+13.0678%]/
      64/4/+0.0553%/[-5.9768%]/[+6.4155%]/
      64/8/+0.1206%/[-4.0057%]/[+4.2984%]/
      256/1/-0.0031%/[-10.1166%]/[+11.2517%]/
      256/2/-0.5058%/[-6.1656%]/+6.0317%]/
      ...
      
      Guest TX:(TCP)
      size/session/+throughput%/+cpu%/-+per cpu%/
      64/1/[+18.9183%]/-0.2823%/[+19.2550%]/
      64/2/[+13.5714%]/[+2.2675%]/[+11.0533%]/
      64/4/[+13.1070%]/[+2.1817%]/[+10.6920%]/
      64/8/[+13.0426%]/[+2.0887%]/[+10.7299%]/
      256/1/[+36.2761%]/+6.3434%/[+28.1471%]/
      ...
      1024/1/[+44.8873%]/+2.0811%/[+41.9335%]/
      ...
      1024/4/+0.0228%/[-2.2044%]/[+2.2774%]/
      ...
      16384/2/+0.0127%/[-5.0346%]/[+5.3148%]/
      ...
      65535/1/[+0.0062%]/[-4.1183%]/[+4.3017%]/
      65535/2/+0.0004%/[-4.2311%]/[+4.4185%]/
      65535/4/+0.0107%/[-4.6106%]/[+4.8446%]/
      65535/8/-0.0090%/[-5.5178%]/[+5.8306%]/
      
      Latency:(TCP_RR)
      size/session/+transaction rate%/+cpu%/-+per cpu%/
      64/1/[+6.5248%]/[-9.2882%]/[+17.4322%]/
      64/25/[+11.0854%]/[+0.8000%]/[+10.2038%]/
      64/50/[+12.1076%]/[+2.4627%]/[+9.4131%]/
      256/1/[+5.3677%]/[+10.5669%]/-4.7024%/
      256/25/[+5.6402%]/-0.8962%/[+6.5955%]/
      256/50/[+5.9685%]/[+1.7766%]/[+4.1188%]/
      4096/1/+0.2508%/[-10.4941%]/[+12.0047%]/
      4096/25/[+1.8533%]/-0.0273%/+1.8812%/
      4096/50/[+1.2156%]/-1.4134%/+2.6667%/
      
      Notes: data with '[]' is the one whose significance is greater than 95%.
      
      Thanks Wenli Quan <wquan@redhat.com> for the benchmarking.
      
      Cc: Michael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NJason Wang <jasowang@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      bc85ccfd
    • J
      virtio-pci: fix 1.0 virtqueue migration · a6df8adf
      Jason Wang 提交于
      We don't migrate the followings fields for virtio-pci:
      
      uint32_t dfselect;
      uint32_t gfselect;
      uint32_t guest_features[2];
      struct {
          uint16_t num;
          bool enabled;
          uint32_t desc[2];
          uint32_t avail[2];
          uint32_t used[2];
      } vqs[VIRTIO_QUEUE_MAX];
      
      This will confuse driver if migrating during initialization. Solves
      this issue by:
      
      - introduce transport specific callbacks to load and store extra
        virtqueue states.
      - add a new subsection for virtio to migrate transport specific modern
        device state.
      - implement pci specific callbacks.
      - add a new property for virtio-pci for whether or not to migrate
        extra state.
      - compat the migration for 2.4 and elder machine types
      
      Cc: Michael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NJason Wang <jasowang@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      Reviewed-by: NCornelia Huck <cornelia.huck@de.ibm.com>
      a6df8adf
  2. 19 10月, 2015 1 次提交
    • P
      kvm: Pass PCI device pointer to MSI routing functions · dc9f06ca
      Pavel Fedin 提交于
      In-kernel ITS emulation on ARM64 will require to supply requester IDs.
      These IDs can now be retrieved from the device pointer using new
      pci_requester_id() function.
      
      This patch adds pci_dev pointer to KVM GSI routing functions and makes
      callers passing it.
      
      x86 architecture does not use requester IDs, but hw/i386/kvm/pci-assign.c
      also made passing PCI device pointer instead of NULL for consistency with
      the rest of the code.
      Signed-off-by: NPavel Fedin <p.fedin@samsung.com>
      Message-Id: <ce081423ba2394a4efc30f30708fca07656bc500.1444916432.git.p.fedin@samsung.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      dc9f06ca
  3. 09 10月, 2015 1 次提交
    • M
      virtio-input: Fix device introspection on non-Linux hosts · c6047e96
      Markus Armbruster 提交于
      When CONFIG_LINUX is off, devices "virtio-keyboard-device",
      "virtio-mouse-device", "virtio-tablet-device" and
      "virtio-input-host-device" aren't compiled in, yet
      "virtio-keyboard-pci", "virtio-mouse-pci", "virtio-tablet-pci" and
      "virtio-input-host-pci" still are.  Attempts to introspect them crash,
      e.g.
      
          $ qemu-system-x86_64 -device virtio-tablet-pci,help
          **
          ERROR:/work/armbru/qemu/qom/object.c:333:object_initialize_with_type: assertion failed: (type != NULL)
      
      Broken in commit 710e2d90 and commit 006a5ede.
      
      Fix by compiling the "virtio-FOO-pci" exactly when compiling the
      "virtio-FOO-device": compile "virtio-keyboard-device",
      "virtio-mouse-device", "virtio-tablet-device" regardless of
      CONFIG_LINUX, and compile "virtio-input-host-pci" only for
      CONFIG_LINUX.
      Reported-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NGerd Hoffmann <kraxel@redhat.com>
      Message-Id: <1444320700-26260-3-git-send-email-armbru@redhat.com>
      c6047e96
  4. 01 10月, 2015 1 次提交
  5. 11 9月, 2015 1 次提交
  6. 07 9月, 2015 1 次提交
  7. 27 7月, 2015 2 次提交
  8. 13 7月, 2015 1 次提交
  9. 08 7月, 2015 2 次提交
  10. 07 7月, 2015 1 次提交
  11. 23 6月, 2015 3 次提交
  12. 11 6月, 2015 18 次提交
  13. 04 6月, 2015 1 次提交
  14. 31 5月, 2015 2 次提交