Re: [PATCH 02/24] iommu/amd: Introduce vIOMMU-specific events and event

From: Suthikulpanit, Suravee

Date: Tue Sep 01 2026 - 10:51:48 EST




On 8/19/2026 3:17 PM, guanghuifeng@xxxxxxxxxxxxxxxxx wrote:

在 2026/7/27 21:28, Suravee Suthikulpanit 写道:
.....

Additionally, per Section 2.5.12, a GUEST_EVENT_FAULT occupies two log
entries (paired event entry). The current iommu_poll_events() advances
by a single entry per iteration, so the second (paired) entry will be
misinterpreted as an unknown event type on the next iteration. The
handler should consume/skip the second entry.

For GUEST_EVENT_FAULT, which consumes 2 entries, my expectation is the driver reports 2 events in dmesg, which are interpreted together.

1. GUEST_EVENT_FAULT: handled by the case EVENT_TYPE_GUEST_EVENT_FAULT.
2. The injected event: handled by the corresponding type. (not the unknown type)

However, I can modify this by letting the GUEST_EVENT_FAULT event handler consume two Event log entries and report raw value for the injected guest event (i.e. the second entry).

I'll send this out in v5.

Thanks,
Suravee