[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [Patch RFC 00/13] VT-d Asynchronous Device-TLB Flush for ATS Device
>>> On 28.09.15 at 05:08, <quan.xu@xxxxxxxxx> wrote: >>>> Thursday, September 24, 2015 12:27 AM, Tim Deegan wrote: >> 7/13: I'm not convinced that making the vcpu spin calling >> sched_yield() is a very good plan. Better to explicitly pause the domain if >> you >> need its vcpus not to run. But first -- why does IOMMU flushing mean that >> vcpus can't be run? > > Ensure that the required Device-TLB flushes are applied before returning to > guest mode via hypercall completion. > the domain can also DMA this freed pages. > For example, Call do_memory_op HYPERCALL to free a pageX (gfn --- mfn) from > domain, and assume that there is > a mapping(gfn --- mfn) in Device-TLB, once the vcpu has returned to guest > mode, > then the domain can still DMA this freed pageX. > Domain kernel cannot use this being freed page, otherwise this is a domain > kernel bug. It would be a guest kernel bug, but all _we_ care about is that such a guest kernel bug won't affect the hypervisor or other guests. You need to answer the question (perhaps just for yourself) taking into account Tim's suggestion to hold references to all pages mapped by the IOMMU page tables. Once you do that, I don't think there'll be a reason to pause the guest for the duration of the flush. And really (as pointed out before) pausing the guest would get us _far_ away from how real hardware behaves. The only possibly tricky thing will be how to know in the flush completion handler which pages to drop references for, as it doesn't look like you'd be able to put them on a list without allocating extra memory fro tracking (and allocation in turn would be bad as it can fail). > I didn't make the IOMMU table to take typed refcount to anything it points > to. This is really complex. But unavoidable I think, and with that I'm not sure it makes a lot of sense to do further (detailed) review of the initial version of the series. Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |