From 2d1d87016133b6c2f38e4f6a5fca6be5b820653c Mon Sep 17 00:00:00 2001 From: Thanos Makatos Date: Fri, 4 Feb 2022 13:51:59 +0000 Subject: ignore writes to RO MSI-X registers (#642) Signed-off-by: Thanos Makatos Reviewed-by: John Levon --- include/pci_caps/msix.h | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'include') 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"); -- cgit v1.1