Re: [PATCH V2 2/3] amd-iommu: Sync IOVA-to-GPA translation during page invalidation

2020-10-02 Thread Peter Xu
On Fri, Oct 02, 2020 at 09:59:06AM -0500, Wei Huang wrote: > +static void amdvi_sync_domain(AMDVIState *s, uint32_t domid, > + uint64_t addr, uint16_t flags) > +{ [...] > +/* > + * In case of syncing more than a page, we invalidate the entire > +

[PATCH V2 2/3] amd-iommu: Sync IOVA-to-GPA translation during page invalidation

2020-10-02 Thread Wei Huang
Add support to sync the IOVA-to-GPA translation at the time of IOMMU page invalidation. This function is called when two IOMMU commands, AMDVI_CMD_INVAL_AMDVI_PAGES and AMDVI_CMD_INVAL_AMDVI_ALL, are intercepted. Address space notifiers are called accordingly. Co-developed-by: Wei Huang Signed-of