Re: [ANNOUNCE] VFIO V6 & public VFIO repositories

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Benjamin Herrenschmidt
Date: Tuesday, December 21, 2010 - 2:33 pm

On Tue, 2010-12-21 at 11:48 -0800, Tom Lyon wrote:

Right, and we had that for a while too on our PCIe variants :-)

IE. We have a single address space, -but- that address space is divided
into windows that have an individual filter on the transaction requester
IDs (which I can configure to filter a full bus, a full device, or
pretty much per function). I have a pile of such windows (depending on
the exact chipset, up to 256 today).

So essentially, each device -does- have separate mappings, tho those are
limited to a "window" of the address space which is typically going to
be around 256M (or smaller) in 32-bit space (but can be much larger in
64-bit space depending on how much physically contiguous space we can
spare for the translation table itself).

Now, it doesn't do multi-level translations. So KVM guests (or userspace
applications) will not directly modify the translation table. That does
mean map/unmap "ioctls" for userspace. In the KVM case, hypercalls.

This is not a huge deal for us right now as our operating environment is
already paravirtualized (for running under pHyp aka PowerVM aka IBM
proprietary hypervisor). So we just implement the same hypercalls in KVM
and existing kernels will "just work". Not as efficient as direct access
into a multi level page table but still better than nothing :-)


Well, there are going to be some amount of changes in future HW but
that's not something we can count on today and we have to support
existing machines. That said, as I wrote above, I -do- have per-device
assignment, however, I don't get to give an entire 64-bit address space
to each of them, only a "window" in a single address space, so I need
somewhat to convey those boundaries to userspace.

There's also a mismatch with the concept of creating an iommu domain,
and then attaching devices to it (which kvm intends to exploit, Alex was
explaining that his plan is to put all devices in a partition inside the
same domain). In our case, the domains are pretty-much pre-existing and
tied to each device. But this is more an API mismatch specific to
uiommu.

Cheers,
Ben.


--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[ANNOUNCE] VFIO V6 & public VFIO repositories, Tom Lyon, (Mon Nov 22, 4:21 pm)
Re: [ANNOUNCE] VFIO V6 & public VFIO repositories, Benjamin Herrenschmidt, (Mon Dec 20, 10:29 pm)
Re: [ANNOUNCE] VFIO V6 & public VFIO repositories, Alex Williamson, (Tue Dec 21, 2:15 pm)
Re: [ANNOUNCE] VFIO V6 & public VFIO repositories, Benjamin Herrenschmidt, (Tue Dec 21, 2:33 pm)
Re: [ANNOUNCE] VFIO V6 & public VFIO repositorie, Benjamin Herrenschmidt, (Tue Dec 21, 4:00 pm)