Re: [PATCH] vfio powerpc: enabled and supported on powernv platform

From
Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date
2012-11-27 00:22:16
Also in
kvm, lkml
Reply to
Alex Williamson, 2012-11-26
On Mon, 2012-11-26 at 11:04 -0700, Alex Williamson wrote:
Ok, I see tces are put on shutdown via tce_iommu_detach_group, so you're
more concerned about the guest simply mapping over top of it's own
mappings.  Is that common?  Is it common enough for every multi-page
mapping to assume it will happen?  I know this is a performance
sensitive path for you and it seems like a map-only w/ fallback to
unmap, remap would be better in the general case.

On x86 we do exactly that, but we do the unmap, remap from userspace
when we get an EBUSY.  Thanks, 
Right, Linux as guest at least will never map "over" an existing
mapping. It will always unmap first. IE. The only transition we do on
H_PUT_TCE are 0 -> valid and valid -> 0.

So it would be fine to simplify the code and keep the "map over map" as
a slow fallback. I can't tell for other operating systems but we don't
care about those at this point :-)

Cheers,
Ben.
Thread (56 messages) 56 messages, 5 authors, 2012-12-13
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help