qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH qemu v6 12/15] spapr_vfio_pci: Remove redundant


From: Alexey Kardashevskiy
Subject: Re: [Qemu-devel] [PATCH qemu v6 12/15] spapr_vfio_pci: Remove redundant spapr-pci-vfio-host-bridge
Date: Wed, 22 Apr 2015 19:06:52 +1000
User-agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0

On 04/22/2015 04:47 PM, David Gibson wrote:
On Sat, Apr 11, 2015 at 01:24:41AM +1000, Alexey Kardashevskiy wrote:
sPAPRTCETable is handling 2 TCE tables already:

1) guest view of the TCE table - emulated devices use only this table;

2) hardware IOMMU table - VFIO PCI devices use it for actual work but
it does not replace 1) and it is not visible to the guest.
The initialization of this table is driven by vfio-pci device,
DMA map/unmap requests are handled via MemoryListener so there is very
little to do in spapr-pci-vfio-host-bridge.

This moves VFIO bits to the generic spapr-pci-host-bridge which allows
putting emulated and VFIO devices on the same PHB. It is still possible
to create multiple PHBs and avoid sharing PHB resouces for emulated and
VFIO devices.

If there is no VFIO-PCI device attaches, no special ioctls will be called.
If there are some VFIO-PCI devices attached, PHB may refuse to attach
another VFIO-PCI device if a VFIO container on the host kernel side
does not support
container sharing.

This changes spapr-pci-host-bridge to support properties of
spapr-pci-vfio-host-bridge. This makes spapr-pci-vfio-host-bridge type
equal to spapr-pci-host-bridge.

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

Reviewed-by: David Gibson <address@hidden>

---

How do create aliases for types?

^^ I assume this is left over from some notes of your own?

Nope, this is a question to the public. I ended up having 2 different QOM types (one is derived from another and has an extra property - "iommuid") while I could (probably) have just one (spapr-pci-host-bridge) and the other (spapr-pci-vfio-host-bridge) would be an alias as we have aliases for machines (when "pseries" is an alias for "pseries-2.3", etc). I am fine with the existing approach as it does not add new property to spapr-pci-host-bridge (otherwise it would have to), but still.



--
Alexey



reply via email to

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