[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 50/53] intel_iommu: Fix flag check in replay
From: |
Michael S. Tsirkin |
Subject: |
[PULL 50/53] intel_iommu: Fix flag check in replay |
Date: |
Mon, 26 Jun 2023 08:30:17 -0400 |
From: Zhenzhong Duan <zhenzhong.duan@intel.com>
Replay doesn't notify registered notifiers but the one passed
to it. So it's meaningless to check the registered notifier's
synthetic flag.
There is no issue currently as all replay use cases have MAP
flag set, but let's be robust.
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Message-Id: <20230615032626.314476-3-zhenzhong.duan@intel.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
hw/i386/intel_iommu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c
index 34af12f392..f046f85913 100644
--- a/hw/i386/intel_iommu.c
+++ b/hw/i386/intel_iommu.c
@@ -3837,7 +3837,7 @@ static void vtd_iommu_replay(IOMMUMemoryRegion *iommu_mr,
IOMMUNotifier *n)
PCI_FUNC(vtd_as->devfn),
vtd_get_domain_id(s, &ce, vtd_as->pasid),
ce.hi, ce.lo);
- if (vtd_as_has_map_notifier(vtd_as)) {
+ if (n->notifier_flags & IOMMU_NOTIFIER_MAP) {
/* This is required only for MAP typed notifiers */
vtd_page_walk_info info = {
.hook_fn = vtd_replay_hook,
--
MST
- Re: [PULL 52/53] vhost_net: add an assertion for TAP client backends, (continued)
- [PULL 49/53] intel_iommu: Fix a potential issue in VFIO dirty page sync, Michael S. Tsirkin, 2023/06/26
- [PULL 22/53] hw/virtio: Build various target-agnostic objects just once, Michael S. Tsirkin, 2023/06/26
- [PULL 32/53] tests/data/acpi: update after SMBIOS 2.0 change, Michael S. Tsirkin, 2023/06/26
- [PULL 35/53] vdpa: reorder vhost_vdpa_net_cvq_cmd_page_len function, Michael S. Tsirkin, 2023/06/26
- [PULL 36/53] vdpa: map shadow vrings with MAP_SHARED, Michael S. Tsirkin, 2023/06/26
- [PULL 43/53] vhost: fix vhost_dev_enable_notifiers() error case, Michael S. Tsirkin, 2023/06/26
- [PULL 45/53] vdpa: fix not using CVQ buffer in case of error, Michael S. Tsirkin, 2023/06/26
- [PULL 44/53] vdpa: mask _F_CTRL_GUEST_OFFLOADS for vhost vdpa devices, Michael S. Tsirkin, 2023/06/26
- [PULL 47/53] virtio-scsi: avoid dangling host notifier in ->ioeventfd_stop(), Michael S. Tsirkin, 2023/06/26
- [PULL 50/53] intel_iommu: Fix flag check in replay,
Michael S. Tsirkin <=
- [PULL 53/53] vhost-vdpa: do not cleanup the vdpa/vhost-net structures if peer nic is present, Michael S. Tsirkin, 2023/06/26
- Re: [PULL 00/53] virtio,pc,pci: fixes, features, cleanups, Michael S. Tsirkin, 2023/06/26
- Re: [PULL 00/53] virtio,pc,pci: fixes, features, cleanups, Richard Henderson, 2023/06/26