On 2016年11月24日 12:09, Edgar E. Iglesias wrote: >>>> Hi, >>>> > > > >>>> > > > I have a few questions. >>>> > > > >>>> > > > If I understand correctly, you'll be emulating an Intel IOMMU in Xen. >>>> > > > So guests will essentially create intel iommu style page-tables. >>>> > > > >>>> > > > If we were to use this on Xen/ARM, we would likely be modelling an >>>> > > > ARM >>>> > > > SMMU as a vIOMMU. Since Xen on ARM does not use QEMU for emulation, >>>> > > > the >>>> > > > hypervisor OPs for QEMUs xen dummy IOMMU queries would not really be >>>> > > > used. >>>> > > > Do I understand this correctly? >>> > > >>> > > I think they could be called from the toolstack. This is why I was >>> > > saying in the other thread that the hypercalls should be general enough >>> > > that QEMU is not the only caller. >>> > > >>> > > For PVH and ARM guests, the toolstack should be able to setup the vIOMMU >>> > > on behalf of the guest without QEMU intervention. > OK, I see. Or, I think I understand, not sure :-) > > In QEMU when someone changes mappings in an IOMMU there will be a notifier > to tell caches upstream that mappings have changed. I think we will need to > prepare for that. I.e when TCG CPUs sit behind an IOMMU.
For Xen side, we may notify pIOMMU driver about mapping change via calling pIOMMU driver's API in vIOMMU. > > Another area that may need change is that on ARM we need the map-query to > return > the memory attributes for the given mapping. Today QEMU or any emulator > doesn't use it much but in the future things may change. > > For SVM, whe will also need to deal with page-table faults by the IOMMU. > So I think there will need to be a channel from Xen to Guesrt to report these. Yes, vIOMMU should forward the page-fault event to guest. For VTD side, we will trigger VTD's interrupt to notify guest about the event. > > For example, what happens when a guest assigned DMA unit page-faults? > Xen needs to know how to forward this fault back to guest for fixup and the > guest needs to be able to fix it and tell the device that it's OK to contine. > E.g PCI PRI or similar. > > -- Best regards Tianyu Lan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel