From 89f1e5c5f069c9161b3df25e8a34e88c62a56f9e Mon Sep 17 00:00:00 2001 From: Florian Freudiger <25648113+FlorianFreudiger@users.noreply.github.com> Date: Tue, 8 Aug 2023 11:57:00 +0200 Subject: [PATCH] Fix MSI-X capability write logging opposite status (#759) Signed-off-by: Florian Freudiger <25648113+FlorianFreudiger@users.noreply.github.com> --- lib/pci_caps.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/pci_caps.c b/lib/pci_caps.c index 73e26456..39acec8d 100644 --- a/lib/pci_caps.c +++ b/lib/pci_caps.c @@ -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;