aboutsummaryrefslogtreecommitdiff
path: root/test/py/test_pci_caps.py
AgeCommit message (Collapse)AuthorFilesLines
2023-08-31Introduce client object in python tests (#772)Mattias Nissler1-36/+36
Thus far, the client end of the socket is the only piece of client state tracked in tests, for which a global `socket` variable has been used. In preparation to add more state, replace the `socket` global with a `client` global object that groups all client state. Signed-off-by: Mattias Nissler <mnissler@rivosinc.com> Reviewed-by: John Levon <john.levon@nutanix.com> Reviewed-by: Thanos Makatos <thanos.makatos@nutanix.com>
2023-08-15Allow adding MSI capability via vfu_pci_add_capability (#758)Florian Freudiger1-0/+58
Signed-off-by: Florian Freudiger <25648113+FlorianFreudiger@users.noreply.github.com>
2023-01-03fix FLR reset callback (#729)John Levon1-14/+5
A reset callback is allowed to call functions disallowed in quiescent state. However, the FLR reset path neglected to account for this properly, causing an incorrect assert to be triggered if, for example, vfu_sgl_put() is called. To fix this, make sure all reset paths go through call_reset_cb(). Signed-off-by: John Levon <john.levon@nutanix.com> Reviewed-by: Thanos Makatos <thanos.makatos@nutanix.com>
2022-10-04fix compilation for i386 and ppc64 (#709)Thanos Makatos1-2/+5
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com> Reviewed-by: John Levon <john.levon@nutanix.com> Reported-by: Eduardo Lima <eblima@gmail.com>
2022-07-04support for shadow ioeventfd (#698)Thanos Makatos1-4/+0
When an ioeventfd is written to, KVM discards the value since it has no memory to write it to, and simply kicks the eventfd. This a problem for devices such a NVMe controllers that need the value (e.g. doorbells on BAR0). This patch allows the vfio-user server to pass a file descriptor that can be mmap'ed and KVM can write the ioeventfd value to this _shadow_ memory instead of discarding it. This shadow memory is not exposed to the guest. Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com> Reviewed-by: John Levon <john.levon@nutanix.com> Change-Id: Iad849c94076ffa5988e034c8bf7ec312d01f095f
2022-02-04ignore writes to RO MSI-X registers (#642)Thanos Makatos1-2/+65
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com> Reviewed-by: John Levon <john.levon@nutanix.com>
2021-11-30introduce device quiesce callback (#609)Thanos Makatos1-72/+84
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com> Reviewed-by: John Leon <john.levon@nutanix.com>
2021-10-22run python code through flake8 (#613)John Levon1-27/+48
Aside from general style goodness, this found a couple of accidental re-definitions, so it's worth taking the pain now. Also, only run rstlint as part of pre-push. Signed-off-by: John Levon <john.levon@nutanix.com> Reviewed-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
2021-06-18superficially handle Device Control 2 and Link Control 2 (#568)Thanos Makatos1-0/+27
* 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>
2021-06-01fixes for VFIO_USER_DIRTY_PAGES (#537)John Levon1-2/+1
- we should only accept one range, not multiple ones - clearly define and implement argsz behaviour - we need to check if migration is configured - add proper test coverage; move existing testing to python Signed-off-by: John Levon <john.levon@nutanix.com> Reviewed-by: Thanos Makatos <thanos.makatos@nutanix.com>
2021-05-27Fix struct pxcap (#534)Swapnil Ingle1-1/+1
* Added missing reserved bits and renamed per to rer nameing as the nvme specs * Add pxcap capability in lspci test Signed-off-by: Swapnil Ingle <swapnil.ingle@nutanix.com> Reviewed-by: John Levon <john.levon@nutanix.com>
2021-05-25Handle support of PCI FLR capability (#517)Swapnil Ingle1-3/+29
* Handle support of PCI FLR capability If device supports FLR cap then call vfu_reset_cb_t when FLR is initiated by client. Signed-off-by: Swapnil Ingle <swapnil.ingle@nutanix.com> Reviewed-by: John Levon <john.levon@nutanix.com> Reviewed-by: Thanos Makatos <thanos.makatos@nutanix.com>
2021-05-15move PCI capability testing to Python (#453)John Levon1-0/+305
This also adds a couple of additional tests (as well as more fully testing the region access path). Signed-off-by: John Levon <john.levon@nutanix.com> Reviewed-by: Swapnil Ingle <swapnil.ingle@nutanix.com>