Re: [Qemu-devel] [PATCH v3] intel_iommu: better handling of dmar state switch

2018-09-28 Thread Peter Xu
On Fri, Sep 28, 2018 at 12:47:08PM +0200, Auger Eric wrote: > Hi Peter, Hi, Eric, [...] > > +static void vtd_address_space_refresh_all(IntelIOMMUState *s) > > +{ > > +vtd_address_space_unmap_all(s); > What about internal context and iotlb caches? Shouldn't they be also > invalidated at the s

Re: [Qemu-devel] [PATCH v3] intel_iommu: better handling of dmar state switch

2018-09-28 Thread Auger Eric
Hi Peter, On 9/7/18 4:46 AM, Peter Xu wrote: > QEMU is not handling the global DMAR switch well, especially when from > "on" to "off". > > Let's first take the example of system reset. > > Assuming that a guest has IOMMU enabled. When it reboots, we will drop > all the existing DMAR mappings to

Re: [Qemu-devel] [PATCH v3] intel_iommu: better handling of dmar state switch

2018-09-27 Thread Peter Xu
On Fri, Sep 07, 2018 at 10:46:40AM +0800, Peter Xu wrote: > QEMU is not handling the global DMAR switch well, especially when from > "on" to "off". > > Let's first take the example of system reset. > > Assuming that a guest has IOMMU enabled. When it reboots, we will drop > all the existing DMAR

[Qemu-devel] [PATCH v3] intel_iommu: better handling of dmar state switch

2018-09-06 Thread Peter Xu
QEMU is not handling the global DMAR switch well, especially when from "on" to "off". Let's first take the example of system reset. Assuming that a guest has IOMMU enabled. When it reboots, we will drop all the existing DMAR mappings to handle the system reset, however we'll still keep the exist