All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Xu <peterx@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Michael S . Tsirkin" <mst@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Marcel Apfelbaum <marcel.apfelbaum@gmail.com>,
	Alex Williamson <alex.williamson@redhat.com>,
	Eric Auger <eric.auger@redhat.com>,
	peterx@redhat.com, Jason Wang <jasowang@redhat.com>
Subject: [Qemu-devel] [PATCH 0/5] intel_iommu: misc fixes for error exposed after error_report_once()
Date: Tue,  8 Jan 2019 19:47:15 +0800	[thread overview]
Message-ID: <20190108114720.21760-1-peterx@redhat.com> (raw)

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 (except
the last patch, which should also workaround an error but has nothing
to do with the newly introduced error_report_once).

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
Patch 5:    workaround of a kernel bug that could cause UNMAP fail error

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 (5):
  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
  vfio: retry one more time conditionally for type1 unmap

 hw/i386/intel_iommu.c |  3 ++-
 hw/pci/msi.c          |  2 +-
 hw/vfio/common.c      | 16 ++++++++++++++++
 hw/vfio/trace-events  |  1 +
 include/hw/pci/msi.h  |  1 +
 target/i386/kvm.c     | 14 +++++++++++---
 6 files changed, 32 insertions(+), 5 deletions(-)

-- 
2.17.1

             reply	other threads:[~2019-01-08 11:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-08 11:47 Peter Xu [this message]
2019-01-08 11:47 ` [Qemu-devel] [PATCH 1/5] intel_iommu: fix operator in vtd_switch_address_space Peter Xu
2019-01-11  4:03   ` Jason Wang
2019-01-08 11:47 ` [Qemu-devel] [PATCH 2/5] intel_iommu: reset intr_enabled when system reset Peter Xu
2019-01-11  4:04   ` Jason Wang
2019-01-08 11:47 ` [Qemu-devel] [PATCH 3/5] pci/msi: export msi_is_masked() Peter Xu
2019-01-08 11:47 ` [Qemu-devel] [PATCH 4/5] i386/kvm: ignore masked irqs when update msi routes Peter Xu
2019-01-08 11:47 ` [Qemu-devel] [PATCH 5/5] vfio: retry one more time conditionally for type1 unmap Peter Xu
2019-01-08 15:23   ` Alex Williamson
2019-01-09  2:53     ` Peter Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190108114720.21760-1-peterx@redhat.com \
    --to=peterx@redhat.com \
    --cc=alex.williamson@redhat.com \
    --cc=eric.auger@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.