From: Junjie Cao <junjie.cao@intel.com>
To: qemu-devel@nongnu.org
Cc: zhenzhong.duan@intel.com, yi.l.liu@intel.com, philmd@linaro.org,
mst@redhat.com, jasowang@redhat.com,
clement.mathieu--drif@bull.com, marcel.apfelbaum@gmail.com,
pbonzini@redhat.com, richard.henderson@linaro.org,
farosas@suse.de, lvivier@redhat.com,
Junjie Cao <junjie.cao@intel.com>
Subject: [PATCH v4 0/2] intel_iommu: fix guest-triggerable assert in MMIO handlers
Date: Fri, 15 May 2026 02:07:01 +0800 [thread overview]
Message-ID: <20260514180703.85686-1-junjie.cao@intel.com> (raw)
An 8-byte guest access to a 32-bit-only VT-d register hits
assert(size == 4) and aborts QEMU. Found by generic-fuzz.
v1: https://lore.kernel.org/all/20260420170523.17908-1-junjie.cao@intel.com/
v2: https://lore.kernel.org/all/20260424201842.176953-1-junjie.cao@intel.com/
v3: https://lore.kernel.org/all/20260506031942.251335-1-junjie.cao@intel.com/
Changes in v4:
- Switch the guest-error log from error_report_once() to
qemu_log_mask(LOG_GUEST_ERROR, ...) so it is surfaced only
under -d guest_errors (Zhenzhong).
- Add a block comment at each of the 4 reachable sites
(FECTL 0x38, IECTL 0xa0, IEADDR 0xa8, PECTL 0xe0)
explaining why the check must stay, so future readers do
not delete it as "harmless" (Yi).
- No functional change beyond the logging-API swap.
Changes in v3:
- Drop v2's min_access_size=8 approach: per Zhenzhong, it
silently zero-extends 4-byte guest writes, wiping upper
wmask bits of 64-bit registers and firing triggers gated
on size==8.
- Keep min_access_size=4. Remove the 25 assert(size == 4)
sites: 21 are unreachable (non-8-aligned), the 4 reachable
(FECTL 0x38, IECTL 0xa0, IEADDR 0xa8, PECTL 0xe0) fall
through to vtd_set_long() and log a guest error.
Junjie Cao (2):
intel_iommu: fix guest-triggerable abort on oversized MMIO access
tests/qtest: add 8-byte MMIO access sweep for intel-iommu
hw/i386/intel_iommu.c | 74 ++++++++++++++++++++++------------
tests/qtest/intel-iommu-test.c | 30 ++++++++++++++
2 files changed, 79 insertions(+), 25 deletions(-)
base-commit: 5e61afe211e82a9af15a8794a0bd29bb574e953b
--
2.43.0
next reply other threads:[~2026-05-14 10:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-14 18:07 Junjie Cao [this message]
2026-05-14 11:33 ` [PATCH v4 0/2] intel_iommu: fix guest-triggerable assert in MMIO handlers Yi Liu
2026-05-14 18:07 ` [PATCH v4 1/2] intel_iommu: fix guest-triggerable abort on oversized MMIO access Junjie Cao
2026-05-14 18:07 ` [PATCH v4 2/2] tests/qtest: add 8-byte MMIO access sweep for intel-iommu Junjie Cao
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=20260514180703.85686-1-junjie.cao@intel.com \
--to=junjie.cao@intel.com \
--cc=clement.mathieu--drif@bull.com \
--cc=farosas@suse.de \
--cc=jasowang@redhat.com \
--cc=lvivier@redhat.com \
--cc=marcel.apfelbaum@gmail.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=yi.l.liu@intel.com \
--cc=zhenzhong.duan@intel.com \
/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.