diff options
author | Ilias Apalodimas <ilias.apalodimas@linaro.org> | 2017-10-02 22:07:03 +0300 |
---|---|---|
committer | Ilias Apalodimas <ilias.apalodimas@linaro.org> | 2017-10-02 22:07:03 +0300 |
commit | 8fe0c3bf5802dd0538d3ae5aaafa37c7277086aa (patch) | |
tree | 8d8fe97eb80c7d16d80a64852a9a5857e4950411 /vfio-netem.c | |
parent | 476d2f1d4c03be3a8fb6eecbb5d92ffac59fe783 (diff) |
Added API for reading/writing regs
Diffstat (limited to 'vfio-netem.c')
-rw-r--r-- | vfio-netem.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/vfio-netem.c b/vfio-netem.c index 324c80c..e02b865 100644 --- a/vfio-netem.c +++ b/vfio-netem.c @@ -242,7 +242,8 @@ static long vfio_net_ioctl(struct mdev_device *mdev, unsigned int cmd, info.flags = VFIO_REGION_INFO_FLAG_READ | VFIO_REGION_INFO_FLAG_WRITE; /* FIXME not all BARS are not mappable */ - info.flags |= VFIO_REGION_INFO_FLAG_MMAP; + if (info.index == VFIO_PCI_BAR2_REGION_INDEX) + info.flags |= VFIO_REGION_INFO_FLAG_MMAP; #if 0 if (vdev->bar_mmap_supported[info.index]) { info.flags |= VFIO_REGION_INFO_FLAG_MMAP; |