diff options
author | Prasad J Pandit <pjp@fedoraproject.org> | 2018-12-13 01:00:35 +0530 |
---|---|---|
committer | Michael Roth <mdroth@linux.vnet.ibm.com> | 2019-07-30 15:15:46 -0500 |
commit | bceff528ba310d04baa6617a9fb708b85b85934c (patch) | |
tree | c5a1e089fb85b0ada673cb4d0dc96d8e85bf0849 | |
parent | 1549e3a54ab135b86e7a7cb4b94e9b13665bf648 (diff) |
pvrdma: add uar_read routine
Define skeleton 'uar_read' routine. Avoid NULL dereference.
Reported-by: Li Qiang <liq3ea@163.com>
Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
Reviewed-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
Signed-off-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
(cherry picked from commit 2aa86456fb938a11f2b7bd57c8643c213218681c)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
-rw-r--r-- | hw/rdma/vmw/pvrdma_main.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/hw/rdma/vmw/pvrdma_main.c b/hw/rdma/vmw/pvrdma_main.c index 34d8cc4694..c9d9631769 100644 --- a/hw/rdma/vmw/pvrdma_main.c +++ b/hw/rdma/vmw/pvrdma_main.c @@ -455,6 +455,11 @@ static const MemoryRegionOps regs_ops = { }, }; +static uint64_t uar_read(void *opaque, hwaddr addr, unsigned size) +{ + return 0xffffffff; +} + static void uar_write(void *opaque, hwaddr addr, uint64_t val, unsigned size) { PVRDMADev *dev = opaque; @@ -496,6 +501,7 @@ static void uar_write(void *opaque, hwaddr addr, uint64_t val, unsigned size) } static const MemoryRegionOps uar_ops = { + .read = uar_read, .write = uar_write, .endianness = DEVICE_LITTLE_ENDIAN, .impl = { |