qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] c7679d: vfio-pci: Add support for MSI affinit


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] c7679d: vfio-pci: Add support for MSI affinity
Date: Mon, 14 Oct 2013 10:00:05 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: c7679d450ee021eb0826be65e4e018884443643a
      
https://github.com/qemu/qemu/commit/c7679d450ee021eb0826be65e4e018884443643a
  Author: Alex Williamson <address@hidden>
  Date:   2013-10-02 (Wed, 02 Oct 2013)

  Changed paths:
    M hw/misc/vfio.c

  Log Message:
  -----------
  vfio-pci: Add support for MSI affinity

When MSI is accelerated through KVM the vectors are only programmed
when the guest first enables MSI support.  Subsequent writes to the
vector address or data fields are ignored.  Unfortunately that means
we're ignore updates done to adjust SMP affinity of the vectors.
MSI SMP affinity already works in non-KVM mode because the address
and data fields are read from their backing store on each interrupt.

This patch stores the MSIMessage programmed into KVM so that we can
determine when changes are made and update the routes.

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


  Commit: befe5176ef7a0004ba23517c97c804e292273635
      
https://github.com/qemu/qemu/commit/befe5176ef7a0004ba23517c97c804e292273635
  Author: Alex Williamson <address@hidden>
  Date:   2013-10-02 (Wed, 02 Oct 2013)

  Changed paths:
    M hw/misc/vfio.c

  Log Message:
  -----------
  vfio-pci: Test device reset capabilities

Not all resets are created equal.  PM reset is not very reliable,
especially for GPUs, so we might want to opt for a bus reset if a
standard reset will only do a D3hot->D0 transition.  We can also
use this to tell if the standard reset will do a bus reset (if
neither has_pm_reset or has_flr is probed, but the device still
supports reset).

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


  Commit: 6f864e6ec8812d5a5525a7861ca599c6bcabdebe
      
https://github.com/qemu/qemu/commit/6f864e6ec8812d5a5525a7861ca599c6bcabdebe
  Author: Alex Williamson <address@hidden>
  Date:   2013-10-02 (Wed, 02 Oct 2013)

  Changed paths:
    M hw/misc/vfio.c

  Log Message:
  -----------
  vfio-pci: Lazy PCI option ROM loading

During vfio-pci initfn, the device is not always in a state where the
option ROM can be read.  In the case of graphics cards, there's often
no per function reset, which means we have host driver state affecting
whether the option ROM is usable.  Ideally we want to move reading the
option ROM past any co-assigned device resets to the point where the
guest first tries to read the ROM itself.

To accomplish this, we switch the memory region for the option rom to
an I/O region rather than a memory mapped region.  This has the side
benefit that we don't waste KVM memory slots for a BAR where we don't
care about performance.  This also allows us to delay loading the ROM
from the device until the first read by the guest.  We then use the
PCI config space size of the ROM BAR when setting up the BAR through
QEMU PCI.

Another benefit of this approach is that previously when a user set
the ROM to a file using the romfile= option, we still probed VFIO for
the parameters of the ROM, which can result in dmesg errors about an
invalid ROM.  We now only probe VFIO to get the ROM contents if the
guest actually tries to read the ROM.

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


  Commit: 8fbf47c3a8a7f37a11268a07290d20a325ba4cb6
      
https://github.com/qemu/qemu/commit/8fbf47c3a8a7f37a11268a07290d20a325ba4cb6
  Author: Alex Williamson <address@hidden>
  Date:   2013-10-02 (Wed, 02 Oct 2013)

  Changed paths:
    M hw/misc/vfio.c

  Log Message:
  -----------
  vfio-pci: Cleanup error_reports

Remove carriage returns and tweak formatting for error_reports.

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


  Commit: f16f39c3fc973c5d7cbc2224eefb4ef5eb1e64ff
      
https://github.com/qemu/qemu/commit/f16f39c3fc973c5d7cbc2224eefb4ef5eb1e64ff
  Author: Alex Williamson <address@hidden>
  Date:   2013-10-02 (Wed, 02 Oct 2013)

  Changed paths:
    M hw/misc/vfio.c

  Log Message:
  -----------
  vfio-pci: Implement PCI hot reset

Now that VFIO has a PCI hot reset interface, take advantage of it.
There are two modes that we need to consider.  The first is when only
one device within the set of devices affected is actually assigned to
the guest.  In this case the other devices are are just held by VFIO
for isolation and we can pretend they're not there, doing an entire
bus reset whenever the device reset callback is triggered.  Supporting
this case separately allows us to do the best reset we can do of the
device even if the device is hotplugged.

The second mode is when multiple affected devices are all exposed to
the guest.  In this case we can only do a hot reset when the entire
system is being reset.  However, this also allows us to track which
individual devices are affected by a reset and only do them once.

We split our reset function into pre- and post-reset helper functions
prioritize the types of device resets available to us, and create
separate _one vs _multi reset interfaces to handle the distinct cases
above.

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


  Commit: bf961b52785061e1802214c9e03a1c65b261f7c1
      
https://github.com/qemu/qemu/commit/bf961b52785061e1802214c9e03a1c65b261f7c1
  Author: Sebastian Macke <address@hidden>
  Date:   2013-10-03 (Thu, 03 Oct 2013)

  Changed paths:
    M target-openrisc/mmu.c

  Log Message:
  -----------
  target-openrisc: Correct handling of page faults.

The result of (rw & 0) is always zero and therefore a logic false.
The whole comparison will therefore never be executed, it is a obvious bug,
we should use !(rw & 1) here.

Signed-off-by: Sebastian Macke <address@hidden>
Reviewed-by: Jia Liu <address@hidden>


  Commit: 6ef8263ead779e1eecfaf1e0388f4c3941ea7ec3
      
https://github.com/qemu/qemu/commit/6ef8263ead779e1eecfaf1e0388f4c3941ea7ec3
  Author: Sebastian Macke <address@hidden>
  Date:   2013-10-03 (Thu, 03 Oct 2013)

  Changed paths:
    M target-openrisc/mmu.c

  Log Message:
  -----------
  target-openrisc: Removes a non-conforming behavior for the first page of the 
memory

Where *software* leaves 0x0000 - 0x2000 unmapped, the hardware should
still allow for this area to be mapped.

Signed-off-by: Sebastian Macke <address@hidden>
Signed-off-by: Stefan Kristiansson <address@hidden>
Reviewed-by: Jia Liu <address@hidden>


  Commit: 1d5bf692e55ae22b59083741d521e27db704846d
      
https://github.com/qemu/qemu/commit/1d5bf692e55ae22b59083741d521e27db704846d
  Author: Alexey Kardashevskiy <address@hidden>
  Date:   2013-10-03 (Thu, 03 Oct 2013)

  Changed paths:
    M hw/misc/vfio.c

  Log Message:
  -----------
  vfio: Fix debug output for int128 values

Memory regions can easily be 2^64 byte long and therefore overflow
for just a bit but that is enough for int128_get64() to assert.

This takes care of debug printing of huge section sizes.

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


  Commit: 64fa25a0efcadda6e8197e8ea578f6117d01bb4b
      
https://github.com/qemu/qemu/commit/64fa25a0efcadda6e8197e8ea578f6117d01bb4b
  Author: Alex Williamson <address@hidden>
  Date:   2013-10-04 (Fri, 04 Oct 2013)

  Changed paths:
    M hw/misc/vfio.c

  Log Message:
  -----------
  vfio-pci: Add dummy PCI ROM write accessor

Just to be sure we don't jump off any NULL pointer cliffs.

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


  Commit: b1c50c5f248805be747e96e89efbe784ee99f764
      
https://github.com/qemu/qemu/commit/b1c50c5f248805be747e96e89efbe784ee99f764
  Author: Alex Williamson <address@hidden>
  Date:   2013-10-04 (Fri, 04 Oct 2013)

  Changed paths:
    M hw/misc/vfio.c

  Log Message:
  -----------
  vfio-pci: Fix endian issues in vfio_pci_size_rom()

VFIO is always little endian so do byte swapping of our mask on the
way in and byte swapping of the size on the way out.

Signed-off-by: Alex Williamson <address@hidden>
Reported-by: Alexey Kardashevskiy <address@hidden>


  Commit: 08683cb53286848913d4b58afb3f975a29d93535
      
https://github.com/qemu/qemu/commit/08683cb53286848913d4b58afb3f975a29d93535
  Author: Anthony Liguori <address@hidden>
  Date:   2013-10-14 (Mon, 14 Oct 2013)

  Changed paths:
    M hw/misc/vfio.c

  Log Message:
  -----------
  Merge remote-tracking branch 'awilliam/tags/vfio-pci-for-qemu-20131010.0' 
into staging

vfio-pci updates include:
 - Forgotten MSI affinity patch posted several months ago
 - Lazy option ROM loading to delay load until after device/bus resets
 - Error reporting cleanups
 - PCI hot reset support introduced with Linux v3.12 development kernels
 - Debug build fix for int128

The lazy ROM loading and hot reset should help VGA assignment as we can
now do a bus reset when there are multiple devices on the bus, ex.
multi-function graphics and audio cards.

# gpg: Signature made Thu 10 Oct 2013 11:26:39 AM PDT using RSA key ID 3BB08B22
# gpg: Can't check signature: public key not found

# By Alex Williamson (7) and Alexey Kardashevskiy (1)
# Via Alex Williamson
* awilliam/tags/vfio-pci-for-qemu-20131010.0:
  vfio-pci: Fix endian issues in vfio_pci_size_rom()
  vfio-pci: Add dummy PCI ROM write accessor
  vfio: Fix debug output for int128 values
  vfio-pci: Implement PCI hot reset
  vfio-pci: Cleanup error_reports
  vfio-pci: Lazy PCI option ROM loading
  vfio-pci: Test device reset capabilities
  vfio-pci: Add support for MSI affinity

Message-id: address@hidden
Signed-off-by: Anthony Liguori <address@hidden>


  Commit: ded77da3cd6b6bcd201a4e36abb3294d725be644
      
https://github.com/qemu/qemu/commit/ded77da3cd6b6bcd201a4e36abb3294d725be644
  Author: Anthony Liguori <address@hidden>
  Date:   2013-10-14 (Mon, 14 Oct 2013)

  Changed paths:
    M target-openrisc/mmu.c

  Log Message:
  -----------
  Merge remote-tracking branch 'jliu/or32' into staging

# By Sebastian Macke
# Via Jia Liu
* jliu/or32:
  target-openrisc: Removes a non-conforming behavior for the first page of the 
memory
  target-openrisc: Correct handling of page faults.

Message-id: address@hidden
Signed-off-by: Anthony Liguori <address@hidden>


Compare: https://github.com/qemu/qemu/compare/575ddeb459f6...ded77da3cd6b

reply via email to

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