HomeFreeBSD

vmm/amd: improve iteration over IVHD (type 10h) entries in IVRS table

Description

vmm/amd: improve iteration over IVHD (type 10h) entries in IVRS table

Many 8-byte entries have zero at byte 4, so the second 4-byte part is
skipped as a 4-byte padding entry. But not all 8-byte entries have that
property and they get misinterpreted.

A real example:

48 00 00 00 ff 01 00 01

This an 8-byte ACPI_IVRS_TYPE_SPECIAL entry for IOAPIC with ID 255 (bogus).
It is reported as:

ivhd0: Unknown dev entry:0xff

Fortunately, it was completely harmless.

Also, bail out early if we encounter an entry of a variable length type.
We do not have proper handling for those yet.

Reviewed by: anish

Details

Provenance
avgAuthored on
Reviewer
anish
Parents
rS326150: zdb: use a heap allocation instead of a huge array on stack
Branches
Unknown
Tags
Unknown