Skip to content

intel_iommu: misc fixes for error exposed after error_report_once()

Peter Xu qemu-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest4 patches 3 repliesIn review
  2. v15 patches 4 repliesSuperseded

Changes in v2 from the cover letter

- dropping the last vfio patch
- add acked-by for Jason on 1&2 patches

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4intel_iommu: fix operator in vtd_switch_address_spacehw/i386/intel_iommu.c+1 -10 replies
2/4intel_iommu: reset intr_enabled when system resethw/i386/intel_iommu.c+1 -00 replies
3/4pci/msi: export msi_is_masked()hw/pci/msi.c include/hw/pci/msi.h+2 -10 replies
4/4i386/kvm: ignore masked irqs when update msi routestarget/i386/kvm.c+11 -30 replies

Reviews trailers per patch

2 of 4 patches have a Reviewed-by or Acked-by.

PatchJason Wang
1/4A-b
2/4A-b
3/4
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [Qemu-devel] [PATCH v2 0/4] intel_iommu: misc fixes for error exposed after error_report_once()

v2:
- dropping the last vfio patch
- add acked-by for Jason on 1&2 patches

Recently we have switched quite a few VT-d trace points into error_report_once()s and this does expose some errors that we didn't detect before (previously tracepoints won't trigger as long as tracepoints weren't enabled). These errors are not severe in that all of them will not affect functionality of the guest otherwise we'll notice them even earlier. However it still worths to fix all of them. This patchset tries to fix quite a few errors like this.

All the errors could easily be triggered by rebooting a guest with both vfio-pci device and vIOMMU, and we can see errors dumped in stderr like:

qemu-kvm: vtd_iova_to_slpte: detected slpte permission error (iova=0xffd9ce00, level=0x2, slpte=0x0, write=1)
qemu-kvm: vtd_iommu_translate: detected translation failure (dev=02:00:00, iova=0x0)
qemu-kvm: vtd_interrupt_remap_msi: MSI address low 32 bit invalid: 0x0

Regarding to the patchset itself:

Patch 1:    fixes slpte permission error warning
Patch 2:    fixes intr_enabled flag reset missing
Patch 3-4:  fixes MSI translation warning

It was tested that this series can fix all the error messages observed in below bugs:

https://bugzilla.redhat.com/show_bug.cgi?id=1662270
https://bugzilla.redhat.com/show_bug.cgi?id=1662291

Please have a look, thanks.

Peter Xu (4):
intel_iommu: fix operator in vtd_switch_address_space
intel_iommu: reset intr_enabled when system reset pci/msi: export msi_is_masked()
i386/kvm: ignore masked irqs when update msi routes

 hw/i386/intel_iommu.c |  3 ++-
 hw/pci/msi.c          |  2 +-
 include/hw/pci/msi.h  |  1 +
 target/i386/kvm.c     | 14 +++++++++++---
 4 files changed, 15 insertions(+), 5 deletions(-)
Signature · 1 line
2.17.1