mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-06-08 01:54:44 +00:00
HV: centralize the pci cfg read/write sanity checking code
Do the pci cfg read/write sanity checking before the request is dispatched to submodules, so that the checking is centralized rather than scattered across multiple files/places Tracked-On: #2534 Signed-off-by: dongshen <dongsheng.x.zhang@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -118,6 +118,7 @@ static int32_t vmsi_remap(const struct pci_vdev *vdev, bool enable)
|
||||
int32_t vmsi_cfgread(const struct pci_vdev *vdev, uint32_t offset, uint32_t bytes, uint32_t *val)
|
||||
{
|
||||
int32_t ret;
|
||||
|
||||
/* For PIO access, we emulate Capability Structures only */
|
||||
if (msicap_access(vdev, offset)) {
|
||||
*val = pci_vdev_read_cfg(vdev, offset, bytes);
|
||||
|
||||
Reference in New Issue
Block a user