aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorThanos Makatos <thanos.makatos@nutanix.com>2021-06-18 12:01:07 +0100
committerGitHub <noreply@github.com>2021-06-18 12:01:07 +0100
commit3dea51565391dc81ae834b3ecc4f8521c3f03786 (patch)
treec8d6f2ef8981d4358fe777520fb74ec2e566dd13 /include
parent6b8d93075499f0db5d0bfb9386e9024a0bdf68cf (diff)
downloadlibvfio-user-3dea51565391dc81ae834b3ecc4f8521c3f03786.zip
libvfio-user-3dea51565391dc81ae834b3ecc4f8521c3f03786.tar.gz
libvfio-user-3dea51565391dc81ae834b3ecc4f8521c3f03786.tar.bz2
superficially handle Device Control 2 and Link Control 2 (#568)
* superficially handle Device Control 2 and Link Control 2 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/px.h20
1 files changed, 16 insertions, 4 deletions
diff --git a/include/pci_caps/px.h b/include/pci_caps/px.h
index 86cd1b3..e2eb36c 100644
--- a/include/pci_caps/px.h
+++ b/include/pci_caps/px.h
@@ -157,10 +157,22 @@ struct pxdcap2 {
} __attribute__((packed));
_Static_assert(sizeof(struct pxdcap2) == 0x4, "bad PXDCAP2 size");
-struct pxdc2 {
- uint16_t stuff:16;
+union pxdc2 {
+ uint16_t raw;
+ struct {
+ uint32_t comp_timeout:4;
+ uint32_t comp_timout_dis:1;
+ uint32_t ari:1;
+ uint32_t atomic_req:1;
+ uint32_t atomic_egress_block:1;
+ uint32_t ido_req_en:1;
+ uint32_t ido_cmp_en:1;
+ uint32_t ltr_en:1;
+ uint32_t obff_en:2;
+ uint32_t end_end_tlp_prefix_block:1;
+ } __attribute__((packed));
} __attribute__((packed));
-_Static_assert(sizeof(struct pxdc2) == 0x2, "bad PXDC2 size");
+_Static_assert(sizeof(union pxdc2) == 0x2, "bad PXDC2 size");
struct pxds2 {
uint16_t stuff:16;
@@ -245,7 +257,7 @@ struct pxcap {
/* Device Capabilities 2 */
struct pxdcap2 pxdcap2;
/* Device Control 2 */
- struct pxdc2 pxdc2;
+ union pxdc2 pxdc2;
/* Device Status 2 */
struct pxds2 pxds2;
/* Link Capabilities 2 */