aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorThanos Makatos <thanos.makatos@nutanix.com>2022-02-04 13:51:59 +0000
committerGitHub <noreply@github.com>2022-02-04 13:51:59 +0000
commit2d1d87016133b6c2f38e4f6a5fca6be5b820653c (patch)
treef316e6a045a8c08d9d5ab31f29e96b7034d73ea7 /include
parent314ed91fd991756bef2c87ecdf7feff4016c1d40 (diff)
downloadlibvfio-user-2d1d87016133b6c2f38e4f6a5fca6be5b820653c.zip
libvfio-user-2d1d87016133b6c2f38e4f6a5fca6be5b820653c.tar.gz
libvfio-user-2d1d87016133b6c2f38e4f6a5fca6be5b820653c.tar.bz2
ignore writes to RO MSI-X registers (#642)
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com> Reviewed-by: John Levon <john.levon@nutanix.com>
Diffstat (limited to 'include')
-rw-r--r--include/pci_caps/msix.h19
1 files changed, 11 insertions, 8 deletions
diff --git a/include/pci_caps/msix.h b/include/pci_caps/msix.h
index 49e0765..36a7de6 100644
--- a/include/pci_caps/msix.h
+++ b/include/pci_caps/msix.h
@@ -39,23 +39,26 @@
extern "C" {
#endif
+/* Message Control for MSI-X */
struct mxc {
- uint16_t ts:11;
- uint16_t reserved:3;
- uint16_t fm:1;
- uint16_t mxe:1;
+ uint16_t ts:11; /* RO */
+ uint16_t reserved:3; /* read must return 0, write has no effect */
+ uint16_t fm:1; /* RW */
+ uint16_t mxe:1; /* RW */
} __attribute__ ((packed));
_Static_assert(sizeof(struct mxc) == PCI_MSIX_FLAGS, "bad MXC size");
+/* Table Offset / Table BIR for MSI-X */
struct mtab {
- uint32_t tbir:3;
- uint32_t to:29;
+ uint32_t tbir:3; /* RO */
+ uint32_t to:29; /* RO */
} __attribute__ ((packed));
_Static_assert(sizeof(struct mtab) == PCI_MSIX_TABLE, "bad MTAB size");
+/* PBA Offset / PBA BIR for MSI-X */
struct mpba {
- uint32_t pbir:3;
- uint32_t pbao:29;
+ uint32_t pbir:3; /* RO */
+ uint32_t pbao:29; /* RO */
} __attribute__ ((packed));
_Static_assert(sizeof(struct mtab) == PCI_MSIX_PBA - PCI_MSIX_TABLE,
"bad MPBA size");