aboutsummaryrefslogtreecommitdiff
path: root/lib/libvfio-user.c
diff options
context:
space:
mode:
authorJohn Levon <john.levon@nutanix.com>2021-02-02 14:46:05 +0000
committerGitHub <noreply@github.com>2021-02-02 14:46:05 +0000
commit5e16631f81984841788ec26fb1eba03f4e898654 (patch)
tree08d6144f1156b43dae74bee3ab016f4768dc4262 /lib/libvfio-user.c
parente20eaf66d57ef73b3e0ce8d9fe1b7a9efb3df610 (diff)
downloadlibvfio-user-5e16631f81984841788ec26fb1eba03f4e898654.zip
libvfio-user-5e16631f81984841788ec26fb1eba03f4e898654.tar.gz
libvfio-user-5e16631f81984841788ec26fb1eba03f4e898654.tar.bz2
define full PCI Express capability struct (#289)
Define the full-size capability as defined in the specification. Previously, we were defining the structure as in the form used by PCI Express Integrated Endpoints. It's reasonable to assume, however, that a vfio-user device is a normal PCI Express Endpoint connected over a Link. We'll go further, and define the whole structure, including the slot registers at the end that are usually only used for Ports. The presumption here is that it can't hurt to use the larger size: the only way a client could care is if it presumed the next capability was at a particular offset from this one, and we must hope nothing is that silly. This also corrects a buffer overflow: cap_size() in fact disagreed with the original size of our struct pxcap (found via clang's address sanitizer). Signed-off-by: John Levon <john.levon@nutanix.com Reviewed-by: Thanos Makatos <thanos.makatos@nutanix.com>
Diffstat (limited to 'lib/libvfio-user.c')
0 files changed, 0 insertions, 0 deletions