]> Git Repo - qemu.git/commit
intel-iommu: add iommu lock
authorPeter Xu <[email protected]>
Fri, 18 May 2018 07:25:11 +0000 (15:25 +0800)
committerMichael S. Tsirkin <[email protected]>
Wed, 23 May 2018 14:33:57 +0000 (17:33 +0300)
commit1d9efa73e12ddf361ea997c2d532cc4afa6674d1
tree885f2de689980de529f1f9cb364591433b387cc2
parentb4a4ba0d68f50f218ee3957b6638dbee32a5eeef
intel-iommu: add iommu lock

SECURITY IMPLICATION: this patch fixes a potential race when multiple
threads access the IOMMU IOTLB cache.

Add a per-iommu big lock to protect IOMMU status.  Currently the only
thing to be protected is the IOTLB/context cache, since that can be
accessed even without BQL, e.g., in IO dataplane.

Note that we don't need to protect device page tables since that's fully
controlled by the guest kernel.  However there is still possibility that
malicious drivers will program the device to not obey the rule.  In that
case QEMU can't really do anything useful, instead the guest itself will
be responsible for all uncertainties.

CC: QEMU Stable <[email protected]>
Reported-by: Fam Zheng <[email protected]>
Signed-off-by: Peter Xu <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
hw/i386/intel_iommu.c
include/hw/i386/intel_iommu.h
This page took 0.024086 seconds and 4 git commands to generate.