qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 7d489d: vfio: fix return type of pread


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 7d489d: vfio: fix return type of pread
Date: Tue, 07 Jul 2015 03:30:04 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 7d489dcdf5fd71b5052ffd401b869a627e1c751f
      
https://github.com/qemu/qemu/commit/7d489dcdf5fd71b5052ffd401b869a627e1c751f
  Author: Paolo Bonzini <address@hidden>
  Date:   2015-07-06 (Mon, 06 Jul 2015)

  Changed paths:
    M hw/vfio/pci.c

  Log Message:
  -----------
  vfio: fix return type of pread

size_t is an unsigned type, thus the error case is never reached in
the below call to pread.  If bytes is negative, it will be seen as
a very high positive value.

Spotted by Coverity.

Signed-off-by: Paolo Bonzini <address@hidden>
Signed-off-by: Alex Williamson <address@hidden>


  Commit: 4e51361d79289aee2985dfed472f8d87bd53a8df
      
https://github.com/qemu/qemu/commit/4e51361d79289aee2985dfed472f8d87bd53a8df
  Author: Peter Crosthwaite <address@hidden>
  Date:   2015-07-06 (Mon, 06 Jul 2015)

  Changed paths:
    M include/exec/cpu-all.h
    M translate-all.c

  Log Message:
  -----------
  cpu-all: complete "real" host page size API

Currently the "host" page size alignment API is really aligning to both
host and target page sizes. There is the qemu_real_page_size which can
be used for the actual host page size but it's missing a mask and ALIGN
macro as provided for qemu_page_size. Complete the API. This allows
system level code that cares about the host page size to use a
consistent alignment interface without having to un-needingly align to
the target page size. This also reduces system level code dependency
on the cpu specific TARGET_PAGE_SIZE.

Signed-off-by: Peter Crosthwaite <address@hidden>
Tested-by: Alexey Kardashevskiy <address@hidden>
Acked-by: Paolo Bonzini <address@hidden>
Signed-off-by: Alex Williamson <address@hidden>


  Commit: f7ceed190d7dcd907afe4b46b23809aaad09a619
      
https://github.com/qemu/qemu/commit/f7ceed190d7dcd907afe4b46b23809aaad09a619
  Author: Peter Crosthwaite <address@hidden>
  Date:   2015-07-06 (Mon, 06 Jul 2015)

  Changed paths:
    M hw/vfio/pci.c

  Log Message:
  -----------
  vfio: cpu: Use "real" page size API

This is system level code, and should only depend on the host page
size, not the target page size.

Note that HOST_PAGE_SIZE is misleadingly lead and is really aligning
to both host and target page size. Hence it's replacement with
REAL_HOST_PAGE_SIZE.

Signed-off-by: Peter Crosthwaite <address@hidden>
Tested-by: Alexey Kardashevskiy <address@hidden>
Acked-by: Paolo Bonzini <address@hidden>
Signed-off-by: Alex Williamson <address@hidden>


  Commit: 1c9b71a7311ed99635a2d007fc8a856879537a05
      
https://github.com/qemu/qemu/commit/1c9b71a7311ed99635a2d007fc8a856879537a05
  Author: Eric Auger <address@hidden>
  Date:   2015-07-06 (Mon, 06 Jul 2015)

  Changed paths:
    M hw/s390x/virtio-ccw.c
    M hw/vfio/pci.c
    M hw/virtio/virtio-pci.c
    M include/sysemu/kvm.h
    M kvm-all.c
    M kvm-stub.c

  Log Message:
  -----------
  kvm: rename kvm_irqchip_[add,remove]_irqfd_notifier with gsi suffix

Anticipating for the introduction of new add/remove functions taking
a qemu_irq parameter, let's rename existing ones with a gsi suffix.

Signed-off-by: Eric Auger <address@hidden>
Tested-by: Vikram Sethi <address@hidden>
Acked-by: Paolo Bonzini <address@hidden>
Reviewed-by: Peter Maydell <address@hidden>
Signed-off-by: Alex Williamson <address@hidden>


  Commit: 197e35249a7360534e1aea0f2268ad0e1aa27121
      
https://github.com/qemu/qemu/commit/197e35249a7360534e1aea0f2268ad0e1aa27121
  Author: Eric Auger <address@hidden>
  Date:   2015-07-06 (Mon, 06 Jul 2015)

  Changed paths:
    M include/sysemu/kvm.h
    M kvm-all.c

  Log Message:
  -----------
  kvm-all.c: add qemu_irq/gsi hash table and utility routines

VFIO platform device needs to setup irqfd but it does not know the
gsi corresponding to the device qemu_irq. This patch proposes to
store a hash table in kvm_state using the qemu_irq as key and the gsi
as a value.

kvm_irqchip_set_qemuirq_gsi allows to insert such a pair. The interrupt
controller is supposed to use it.

kvm_irqchip_[add, remove]_irqfd_notifier allows to setup/tear down
irqfd directly from the qemu_irq.

Signed-off-by: Eric Auger <address@hidden>
Tested-by: Vikram Sethi <address@hidden>
Acked-by: Paolo Bonzini <address@hidden>
Reviewed-by: Peter Maydell <address@hidden>
Signed-off-by: Alex Williamson <address@hidden>


  Commit: 6a1a9cfa1c4a3e5b521d82e6adb94311fc5b9f8b
      
https://github.com/qemu/qemu/commit/6a1a9cfa1c4a3e5b521d82e6adb94311fc5b9f8b
  Author: Eric Auger <address@hidden>
  Date:   2015-07-06 (Mon, 06 Jul 2015)

  Changed paths:
    M hw/intc/arm_gic_kvm.c

  Log Message:
  -----------
  intc: arm_gic_kvm: set the qemu_irq/gsi mapping

The arm_gic_kvm now calls kvm_irqchip_set_qemuirq_gsi to build
the hash table storing qemu_irq/gsi mappings. From that point on
irqfd can be setup directly from the qemu_irq using
kvm_irqchip_add_irqfd_notifier.

Signed-off-by: Eric Auger <address@hidden>
Tested-by: Vikram Sethi <address@hidden>
Acked-by: Paolo Bonzini <address@hidden>
Reviewed-by: Peter Maydell <address@hidden>
Signed-off-by: Alex Williamson <address@hidden>


  Commit: 715ca691daca081108b33306faa6fa102f0df8d8
      
https://github.com/qemu/qemu/commit/715ca691daca081108b33306faa6fa102f0df8d8
  Author: Eric Auger <address@hidden>
  Date:   2015-07-06 (Mon, 06 Jul 2015)

  Changed paths:
    M hw/core/sysbus.c
    M include/hw/sysbus.h

  Log Message:
  -----------
  sysbus: add irq_routing_notifier

Add a new connect_irq_notifier notifier in the SysBusDeviceClass. This
notifier, if populated, is called after sysbus_connect_irq.

This mechanism is used to setup VFIO signaling once VFIO platform
devices get attached to their platform bus, on a machine init done
notifier.

Signed-off-by: Eric Auger <address@hidden>
Reviewed-by: Peter Crosthwaite <address@hidden>
Tested-by: Vikram Sethi <address@hidden>
Reviewed-by: Peter Maydell <address@hidden>
Signed-off-by: Alex Williamson <address@hidden>


  Commit: 879904e8635b316de18393222f02d46d2d1f7f4e
      
https://github.com/qemu/qemu/commit/879904e8635b316de18393222f02d46d2d1f7f4e
  Author: Eric Auger <address@hidden>
  Date:   2015-07-06 (Mon, 06 Jul 2015)

  Changed paths:
    M include/sysemu/kvm.h
    M kvm-stub.c

  Log Message:
  -----------
  kvm: some fixes to kvm_resamplefds_allowed

Commit f41389ae3c54b introduced kvm_resamplefds_enabled() and
associated kvm_resamplefds_allowed boolean. This patch adds
non-KVM version for kvm_resamplefds_enabled and also declares
kvm_resamplefds_allowed in kvm-stub as it is done for fellow
kvm_irqfds_allowed.

Signed-off-by: Eric Auger <address@hidden>
Reviewed-by: Peter Maydell <address@hidden>
Signed-off-by: Alex Williamson <address@hidden>


  Commit: fb5f816499a5184a1336d72db030b8419b523082
      
https://github.com/qemu/qemu/commit/fb5f816499a5184a1336d72db030b8419b523082
  Author: Eric Auger <address@hidden>
  Date:   2015-07-06 (Mon, 06 Jul 2015)

  Changed paths:
    M hw/vfio/platform.c
    M include/hw/vfio/vfio-platform.h
    M trace-events

  Log Message:
  -----------
  hw/vfio/platform: add irqfd support

This patch aims at optimizing IRQ handling using irqfd framework.

Instead of handling the eventfds on user-side they are handled on
kernel side using
- the KVM irqfd framework,
- the VFIO driver virqfd framework.

the virtual IRQ completion is trapped at interrupt controller
This removes the need for fast/slow path swap.

Overall this brings significant performance improvements.

Signed-off-by: Alvise Rigo <address@hidden>
Signed-off-by: Eric Auger <address@hidden>
Reviewed-by: Alex Bennée <address@hidden>
Tested-by: Vikram Sethi <address@hidden>
Acked-by: Peter Maydell <address@hidden>
Signed-off-by: Alex Williamson <address@hidden>


  Commit: f8d8a944009b7e836c718a05590ea6b36146978f
      
https://github.com/qemu/qemu/commit/f8d8a944009b7e836c718a05590ea6b36146978f
  Author: Alexey Kardashevskiy <address@hidden>
  Date:   2015-07-06 (Mon, 06 Jul 2015)

  Changed paths:
    M hw/vfio/common.c

  Log Message:
  -----------
  vfio: Unregister IOMMU notifiers when container is destroyed

On systems with guest visible IOMMU, adding a new memory region onto
PCI bus calls vfio_listener_region_add() for every DMA window. This
installs a notifier for IOMMU memory regions. The notifier is supposed
to be removed vfio_listener_region_del(), however in the case of mixed
PHB (emulated + VFIO devices) when last VFIO device is unplugged and
container gets destroyed, all existing DMA windows stay alive altogether
with the notifiers which are on the linked list which head was in
the destroyed container.

This unregisters IOMMU memory region notifier when a container is
destroyed.

Signed-off-by: Alexey Kardashevskiy <address@hidden>
Reviewed-by: David Gibson <address@hidden>
Signed-off-by: Alex Williamson <address@hidden>


  Commit: 43302969966bc3a95470bfc300289a83068ef5d9
      
https://github.com/qemu/qemu/commit/43302969966bc3a95470bfc300289a83068ef5d9
  Author: Gabriel Laupre <address@hidden>
  Date:   2015-07-06 (Mon, 06 Jul 2015)

  Changed paths:
    M hw/vfio/pci.c
    M include/hw/pci/pci_ids.h

  Log Message:
  -----------
  vfio/pci : Add pba_offset PCI quirk for Chelsio T5 devices

Fix pba_offset initialization value for Chelsio T5 Virtual Function
device. The T5 hardware has a bug in it where it reports a Pending Interrupt
Bit Array Offset of 0x8000 for its SR-IOV Virtual Functions instead
of the 0x1000 that the hardware actually uses internally. As the hardware
doesn't return the correct pba_offset value, add a quirk to instead
return a hardcoded value of 0x1000 when a Chelsio T5 VF device is
detected.

This bug has been fixed in the Chelsio's next chip series T6 but there are
no plans to respin the T5 ASIC for this bug. It is just documented in the
T5 Errata and left it at that.

Signed-off-by: Gabriel Laupre <address@hidden>
Reviewed-by: Bandan Das <address@hidden>
Signed-off-by: Alex Williamson <address@hidden>


  Commit: 1452673888f6d7f0454276d049846c9bec659233
      
https://github.com/qemu/qemu/commit/1452673888f6d7f0454276d049846c9bec659233
  Author: Peter Maydell <address@hidden>
  Date:   2015-07-07 (Tue, 07 Jul 2015)

  Changed paths:
    M hw/core/sysbus.c
    M hw/intc/arm_gic_kvm.c
    M hw/s390x/virtio-ccw.c
    M hw/vfio/common.c
    M hw/vfio/pci.c
    M hw/vfio/platform.c
    M hw/virtio/virtio-pci.c
    M include/exec/cpu-all.h
    M include/hw/pci/pci_ids.h
    M include/hw/sysbus.h
    M include/hw/vfio/vfio-platform.h
    M include/sysemu/kvm.h
    M kvm-all.c
    M kvm-stub.c
    M trace-events
    M translate-all.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/awilliam/tags/vfio-update-20150706.0' 
into staging

VFIO updates for 2.4-rc0
- "real" host page size API (Peter Crosthwaite)
- platform device irqfd support (Eric Auger)
- spapr container disconnect fix (Alexey Kardashevskiy)
- quirk for broken Chelsio hardware (Gabriel Laupre)
- coverity fix (Paolo Bonzini)

# gpg: Signature made Mon Jul  6 19:23:49 2015 BST using RSA key ID 3BB08B22
# gpg: Good signature from "Alex Williamson <address@hidden>"
# gpg:                 aka "Alex Williamson <address@hidden>"
# gpg:                 aka "Alex Williamson <address@hidden>"
# gpg:                 aka "Alex Williamson <address@hidden>"

* remotes/awilliam/tags/vfio-update-20150706.0:
  vfio/pci : Add pba_offset PCI quirk for Chelsio T5 devices
  vfio: Unregister IOMMU notifiers when container is destroyed
  hw/vfio/platform: add irqfd support
  kvm: some fixes to kvm_resamplefds_allowed
  sysbus: add irq_routing_notifier
  intc: arm_gic_kvm: set the qemu_irq/gsi mapping
  kvm-all.c: add qemu_irq/gsi hash table and utility routines
  kvm: rename kvm_irqchip_[add,remove]_irqfd_notifier with gsi suffix
  vfio: cpu: Use "real" page size API
  cpu-all: complete "real" host page size API
  vfio: fix return type of pread

Signed-off-by: Peter Maydell <address@hidden>

Conflicts:
        kvm-all.c


Compare: https://github.com/qemu/qemu/compare/f6e3035f75e5...1452673888f6

reply via email to

[Prev in Thread] Current Thread [Next in Thread]