diff options
author | Shameer Kolothum <shameerali.kolothum.thodi@huawei.com> | 2022-03-08 18:48:58 +0000 |
---|---|---|
committer | Alex Williamson <alex.williamson@redhat.com> | 2022-03-15 11:34:08 -0600 |
commit | 6abdce51af1a21b11d325756e654c50a1fa53afe (patch) | |
tree | 8c27f7c9f5f808459a7146766f1139a7adf85878 /drivers/crypto | |
parent | ee3a5b2359e0e5bf6198ffb3b330a12deacebf0f (diff) |
hisi_acc_vfio_pci: Restrict access to VF dev BAR2 migration region
HiSilicon ACC VF device BAR2 region consists of both functional register
space and migration control register space. Unnecessarily exposing the
migration BAR region to the Guest has the potential to prevent/corrupt
the Guest migration.
Hence, introduce a separate struct vfio_device_ops for migration support
which will override the ioctl/read/write/mmap methods to hide the
migration region and limit the Guest access only to the functional
register space.
This will be used in subsequent patches when we add migration support
to the driver.
Please note that it is OK to export the entire VF BAR if migration is
not supported or required as this cannot affect the PF configurations.
Reviewed-by: Longfang Liu <liulongfang@huawei.com>
Signed-off-by: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Link: https://lore.kernel.org/r/20220308184902.2242-6-shameerali.kolothum.thodi@huawei.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'drivers/crypto')
0 files changed, 0 insertions, 0 deletions