Re: [Qemu-devel] [PATCH 1/5] intel_iommu: fix operator in vtd_switch_address_space

2019-01-10 Thread Jason Wang
On 2019/1/8 下午7:47, Peter Xu wrote: When calculating use_iommu, we wanted to first detect whether DMAR is enabled, then check whether PT is enabled if DMAR is enabled. However in the current code we used "&" rather than "&&" so the ordering requirement is lost (instead it'll be an "AND" operat

[Qemu-devel] [PATCH 1/5] intel_iommu: fix operator in vtd_switch_address_space

2019-01-08 Thread Peter Xu
When calculating use_iommu, we wanted to first detect whether DMAR is enabled, then check whether PT is enabled if DMAR is enabled. However in the current code we used "&" rather than "&&" so the ordering requirement is lost (instead it'll be an "AND" operation). This could introduce errors dumpe