[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/6] hw/pci-host: add pci-intack write method
From: |
P J P |
Subject: |
[PATCH 1/6] hw/pci-host: add pci-intack write method |
Date: |
Wed, 17 Jun 2020 11:09:28 +0530 |
From: Prasad J Pandit <pjp@fedoraproject.org>
Add pci-intack mmio write method to avoid NULL pointer dereference
issue.
Reported-by: Lei Sun <slei.casper@gmail.com>
Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
---
hw/pci-host/prep.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/hw/pci-host/prep.c b/hw/pci-host/prep.c
index 1a02e9a670..41befee203 100644
--- a/hw/pci-host/prep.c
+++ b/hw/pci-host/prep.c
@@ -27,6 +27,7 @@
#include "qemu-common.h"
#include "qemu/units.h"
#include "qapi/error.h"
+#include "qemu/log.h"
#include "hw/pci/pci.h"
#include "hw/pci/pci_bus.h"
#include "hw/pci/pci_host.h"
@@ -119,8 +120,15 @@ static uint64_t raven_intack_read(void *opaque, hwaddr
addr,
return pic_read_irq(isa_pic);
}
+static void raven_intack_write(void *opaque, hwaddr addr,
+ uint64_t data, unsigned size)
+{
+ qemu_log_mask(LOG_UNIMP, "%s not implemented\n", __func__);
+}
+
static const MemoryRegionOps raven_intack_ops = {
.read = raven_intack_read,
+ .write = raven_intack_write,
.valid = {
.max_access_size = 1,
},
--
2.26.2
- [PATCH 0/6] Add various undefined MMIO r/w functions, P J P, 2020/06/17
- [PATCH 1/6] hw/pci-host: add pci-intack write method,
P J P <=
- [PATCH 2/6] pci-host: add pcie-msi read method, P J P, 2020/06/17
- [PATCH 3/6] vfio: add quirk device write method, P J P, 2020/06/17
- [PATCH 4/6] prep: add ppc-parity write method, P J P, 2020/06/17
- [PATCH 5/6] nvram: add nrf51_soc flash read method, P J P, 2020/06/17
- [PATCH 6/6] spapr_pci: add spapr msi read method, P J P, 2020/06/17
- Re: [PATCH 0/6] Add various undefined MMIO r/w functions, no-reply, 2020/06/17