Skip to content

Commit

Permalink
Fix MSI-X capability write logging opposite status (#759)
Browse files Browse the repository at this point in the history
Signed-off-by: Florian Freudiger <25648113+FlorianFreudiger@users.noreply.github.com>
  • Loading branch information
FlorianFreudiger authored Aug 8, 2023
1 parent 8872c36 commit 89f1e5c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/pci_caps.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,19 +181,19 @@ cap_write_msix(vfu_ctx_t *vfu_ctx, struct pci_cap *cap, char *buf,
*/

if (msix->mxc.fm != new_msix.mxc.fm) {
if (new_msix.mxc.fm) {
msix->mxc.fm = new_msix.mxc.fm;
if (msix->mxc.fm) {
vfu_log(vfu_ctx, LOG_DEBUG, "all MSI-X vectors masked");
} else {
vfu_log(vfu_ctx, LOG_DEBUG,
"vector's mask bit determines whether vector is masked");
}
msix->mxc.fm = new_msix.mxc.fm;
}

if (msix->mxc.mxe != new_msix.mxc.mxe) {
msix->mxc.mxe = new_msix.mxc.mxe;
vfu_log(vfu_ctx, LOG_DEBUG, "%s MSI-X",
msix->mxc.mxe ? "enable" : "disable");
msix->mxc.mxe = new_msix.mxc.mxe;
}

return count;
Expand Down

0 comments on commit 89f1e5c

Please sign in to comment.