Re: [PATCH] hw/pci-host/pnv_phb4: fix guest-triggerable abort on 8-byte config access

Nikhil Kumar Singh <[email protected]> Wed, 5 Aug 2026 19:23:58 +0530
Newsgroups gmane.comp.emulators.qemu.stable,gmane.comp.emulators.qemu
Message-ID <[email protected]>
Hi Philippe,

Thanks for the review.

1. Regarding MIN(size, 4): I avoided this because silently truncating an 
8-byte guest read to 4 bytes leaves the upper 32 bits unpredictable, 
which might mask guest OS bugs. Returning ~0ull explicitly matches 
standard PCI behaviour for invalid reads and is safer.

2. Regarding pci_host_data_le_ops: I agree this is the right way to 
handle it. However, PHB_CONFIG_DATA is currently interleaved inside the 
larger big-endian PHB4 MMIO region. Moving it to generic little-endian 
ops requires a memory region refactor using overlays.

Since this patch addresses an immediate DoS crash, I kept the scope 
minimal. Memory region refactoring can be picked up as a separate 
follow-up patch.

Regards,
~ Nikhil