On 4/1/22 11:14, Peter Maydell wrote:
On Fri, 1 Apr 2022 at 17:11, Wei Huang <wei.hua...@amd.com> wrote:
On 3/31/22 21:09, Jason Wang wrote:
On Fri, Apr 1, 2022 at 2:30 AM Peter Xu <pet...@redhat.com> wrote:
On Thu, Mar 31, 2022 at 05:01:52PM +0100, Peter Maydell wrote:
(4) The claimed bit layout of the event structure doesn't
match up with the one in the spec document I found. This
could be because I found a document for some other bit
of hardware, of course.
Could you elaborate? Are you referring to amdvi_setevent_bits(evt, info,
55, 8)?
https://www.amd.com/system/files/TechDocs/48882_IOMMU.pdf
was the spec I found through random googling, but the event
structure layouts in chapter 2.5 of that document aren't
at all like the one that amdvi_encode_event() is using.
Maybe that's the wrong spec, as I say.
The spec is up-to-date. But it seems amdvi_setevent_bits(evt, info, 55,
8) is problematic. Use amdvi_log_illegaldevtab_error() as an example:
info |= AMDVI_EVENT_ILLEGAL_DEVTAB_ENTRY;
amdvi_encode_event(evt, devid, addr, info);
amdvi_log_event(s, evt);
info is encoded with AMDVI_EVENT_ILLEGAL_DEVTAB_ENTRY (1U << 12) and is
used by amdvi_encode_event() via amdvi_setevent_bits(evt, info, 55, 8)
into event log bits[63:55]. This should instead be written into
bits[63:48] to match ILLEGAL_DEV_TABLE_ENTRY event format in Chapter 2.5.2.
thanks
-- PMM