qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 4cb47d: vfio-pci: Quirk RTL8168 NIC


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 4cb47d: vfio-pci: Quirk RTL8168 NIC
Date: Tue, 03 Jun 2014 08:00:07 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 4cb47d281a995cb49e4652cb26bafb3ab2d9bd28
      
https://github.com/qemu/qemu/commit/4cb47d281a995cb49e4652cb26bafb3ab2d9bd28
  Author: Alex Williamson <address@hidden>
  Date:   2014-05-30 (Fri, 30 May 2014)

  Changed paths:
    M hw/misc/vfio.c

  Log Message:
  -----------
  vfio-pci: Quirk RTL8168 NIC

This device is ridiculous.  It has two MMIO BARs, BAR4 and BAR2.  BAR4
hosts the MSI-X table, so oviously it would be too easy to access it
directly, instead it creates a window register in BAR2 that, among
other things, provides access to the MSI-X table.  This means MSI-X
doesn't work in the guest because the driver actually manages to
program the physical table.  When interrupt remapping is present, the
device MSI will be blocked.  The Linux driver doesn't make use of this
window, so apparently it's not required to make use of MSI-X.  This
quirk makes the device work with the Windows driver that does use this
window for MSI-X, but I certainly cannot recommend this device for
assignment (the Windows 7 driver also constantly pokes PCI config
space).

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


  Commit: 078c44f48eb9e5134a06f29bec362c1744ca39a3
      
https://github.com/qemu/qemu/commit/078c44f48eb9e5134a06f29bec362c1744ca39a3
  Author: David Gibson <address@hidden>
  Date:   2014-05-30 (Fri, 30 May 2014)

  Changed paths:
    M memory.c

  Log Message:
  -----------
  memory: Sanity check that no listeners remain on a destroyed AddressSpace

At the moment, most AddressSpace objects last as long as the guest system
in practice, but that could well change in future.  In addition, for VFIO
we will be introducing some private per-AdressSpace information, which must
be disposed of before the AddressSpace itself is destroyed.

To reduce the chances of subtle bugs in this area, this patch adds
asssertions to ensure that when an AddressSpace is destroyed, there are no
remaining MemoryListeners using that AS as a filter.

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


  Commit: 12e1129b800a14ee77abe598beba41a95c7b86a5
      
https://github.com/qemu/qemu/commit/12e1129b800a14ee77abe598beba41a95c7b86a5
  Author: Alexey Kardashevskiy <address@hidden>
  Date:   2014-05-30 (Fri, 30 May 2014)

  Changed paths:
    M include/qemu/int128.h

  Log Message:
  -----------
  int128: Add int128_exts64()

This adds macro to extend signed 64bit value to signed 128bit value.

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


  Commit: 7532d3cbf148f72c9476484223b94a188ab59706
      
https://github.com/qemu/qemu/commit/7532d3cbf148f72c9476484223b94a188ab59706
  Author: Alexey Kardashevskiy <address@hidden>
  Date:   2014-05-30 (Fri, 30 May 2014)

  Changed paths:
    M hw/misc/vfio.c

  Log Message:
  -----------
  vfio: Fix 128 bit handling

Upcoming VFIO on SPAPR PPC64 support will initialize the IOMMU
memory region with UINT64_MAX (2^64 bytes) size so int128_get64()
will assert.

The patch takes care of this check. The existing type1 IOMMU code
is not expected to map all 64 bits of RAM so the patch does not
touch that part.

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


  Commit: 279a35ab4a8515d1eac06a76547d4b65a6cde519
      
https://github.com/qemu/qemu/commit/279a35ab4a8515d1eac06a76547d4b65a6cde519
  Author: Alexey Kardashevskiy <address@hidden>
  Date:   2014-05-30 (Fri, 30 May 2014)

  Changed paths:
    M hw/misc/vfio.c

  Log Message:
  -----------
  vfio: Rework to have error paths

This reworks vfio_connect_container() and vfio_get_group() to have
common exit path at the end of the function bodies.

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


  Commit: 3df3e0a5872cbc8fcc55a0413416352eec68132e
      
https://github.com/qemu/qemu/commit/3df3e0a5872cbc8fcc55a0413416352eec68132e
  Author: David Gibson <address@hidden>
  Date:   2014-05-30 (Fri, 30 May 2014)

  Changed paths:
    M hw/misc/vfio.c

  Log Message:
  -----------
  vfio: Introduce VFIO address spaces

The only model so far supported for VFIO passthrough devices is the model
usually used on x86, where all of the guest's RAM is mapped into the
(host) IOMMU and there is no IOMMU visible in the guest.

This patch begins to relax this model, introducing the notion of a
VFIOAddressSpace.  This represents a logical DMA address space which will
be visible to one or more VFIO devices by appropriate mapping in the (host)
IOMMU.  Thus the currently global list of containers becomes local to
a VFIOAddressSpace, and we verify that we don't attempt to add a VFIO
group to multiple address spaces.

For now, only one VFIOAddressSpace is created and used, corresponding to
main system memory, that will change in future patches.

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


  Commit: 0688448b71d22912601380b7e7eb66a38dc996b8
      
https://github.com/qemu/qemu/commit/0688448b71d22912601380b7e7eb66a38dc996b8
  Author: David Gibson <address@hidden>
  Date:   2014-05-30 (Fri, 30 May 2014)

  Changed paths:
    M hw/misc/vfio.c

  Log Message:
  -----------
  vfio: Create VFIOAddressSpace objects as needed

So far, VFIO has a notion of different logical DMA address spaces, but
only ever uses one (system memory).  This patch extends this, creating
new VFIOAddressSpace objects as necessary, according to the AddressSpace
reported by the PCI subsystem for this device's DMAs.

This isn't enough yet to support guest side IOMMUs with VFIO, but it does
mean we could now support VFIO devices on, for example, a guest side PCI
host bridge which maps system memory at somewhere other than 0 in PCI
space.

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


  Commit: 5e70018b00dbe59a96b80933a0dd308ee1ec4488
      
https://github.com/qemu/qemu/commit/5e70018b00dbe59a96b80933a0dd308ee1ec4488
  Author: David Gibson <address@hidden>
  Date:   2014-05-30 (Fri, 30 May 2014)

  Changed paths:
    M hw/misc/vfio.c

  Log Message:
  -----------
  vfio: Add guest side IOMMU support

This patch uses the new IOMMU notifiers to allow VFIO pass through devices
to work with guest side IOMMUs, as long as the host-side VFIO iommu has
sufficient capability and granularity to match the guest side. This works
by tracking all map and unmap operations on the guest IOMMU using the
notifiers, and mirroring them into VFIO.

There are a number of FIXMEs, and the scheme involves rather more notifier
structures than I'd like, but it should make for a reasonable proof of
concept.

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


  Commit: e00fcfeab3d452cba3d0a08991a39ab15df66424
      
https://github.com/qemu/qemu/commit/e00fcfeab3d452cba3d0a08991a39ab15df66424
  Author: Peter Maydell <address@hidden>
  Date:   2014-06-03 (Tue, 03 Jun 2014)

  Changed paths:
    M hw/misc/vfio.c
    M include/qemu/int128.h
    M memory.c

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

VFIO patches: realtek NIC quirk + SPAPR IOMMU AddressSpace support

# gpg: Signature made Mon 02 Jun 2014 22:44:42 BST using RSA key ID 3BB08B22
# gpg: Can't check signature: public key not found

* remotes/awilliam/tags/vfio-pci-for-qemu-20140602.0:
  vfio: Add guest side IOMMU support
  vfio: Create VFIOAddressSpace objects as needed
  vfio: Introduce VFIO address spaces
  vfio: Rework to have error paths
  vfio: Fix 128 bit handling
  int128: Add int128_exts64()
  memory: Sanity check that no listeners remain on a destroyed AddressSpace
  vfio-pci: Quirk RTL8168 NIC

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


Compare: https://github.com/qemu/qemu/compare/278073ba293d...e00fcfeab3d4

reply via email to

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