On Fri, Jul 02, 2010 at 06:41:55PM +0900, Isaku Yamahata wrote: > On Fri, Jul 02, 2010 at 09:03:39AM +0100, Stefan Hajnoczi wrote: > > On Thu, Jul 1, 2010 at 8:30 PM, Eduard - Gabriel Munteanu > > <eduard.munteanu@xxxxxxxxxxx> wrote: > > > But suddenly the guest OS changes mappings and expects the IOMMU to > > > enforce them as soon as invalidation commands are completed. The guest > > > then reclaims the old space for other uses. This leaves an opportunity > > > for those processes to corrupt or read sensitive data. > > In such a case, OS should put device into quiescence by reset like > pci bus reset or pcie function level reset. > pci bus reset patch hasn't been merged yet, though. > It needs clean up/generalization. > > -- > yamahata I wouldn't count on that. When the IOMMU notifies software of command completion, then that notification should be correct. So if we count on 'pci bus reset' we either don't execute INVALIDATE_* and COMPLETION_WAIT commands, or we issue bogus notifications (e.g. they'd be nops). That goes against the specs, and I'm not sure there's any good reason a non-KVM/QEMU-aware OS would reset the device in _all_ cases. For some background on this, mappings updates are followed by INVALIDATE_* commands and then a COMPLETION_WAIT (to wait for invalidation to finish). Eduard -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html