nutanix / libvfio-user

framework for emulating devices in userspace
BSD 3-Clause "New" or "Revised" License
154 stars 49 forks source link

Fix MSI-X capability write logging opposite status #759

Closed FlorianFreudiger closed 11 months ago

FlorianFreudiger commented 11 months ago

Since the vfu_log call for whether MSI-X is enabled or not is using the not yet updated msix->mxc.mxe, it will always print the opposite value. ("enable MSI-X" <-> "disable MSI-X")

Instead of changing it to new_msix.mxc.mxe, I simply moved the assignment of both the mxe and the unaffected fm field before their log calls, so both variants are fine to use.

This is also how other functions like handle_px_pxdc_write do it, assignment before log.