aboutsummaryrefslogtreecommitdiff
path: root/hw/ppc/spapr_iommu.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2016-08-08 11:32:01 +0100
committerPeter Maydell <peter.maydell@linaro.org>2016-08-08 11:32:01 +0100
commitcbda16c010a2e1e7cd6e5441cef87663fbe1ef75 (patch)
treef5612ce974c39547eb277874f054764e6386a86d /hw/ppc/spapr_iommu.c
parentcf5198d58088e3b416fe517b3946e5120b342761 (diff)
parent57c0eb1e0d6d8f01550d10cf08747f25cd537777 (diff)
downloadqemu-cbda16c010a2e1e7cd6e5441cef87663fbe1ef75.zip
qemu-cbda16c010a2e1e7cd6e5441cef87663fbe1ef75.tar.gz
qemu-cbda16c010a2e1e7cd6e5441cef87663fbe1ef75.tar.bz2
Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-2.7-20160808' into staging
ppc patch queue 2016-08-08 This batch has several last minute bug fixes to be merged for qemu-2.7. # gpg: Signature made Mon 08 Aug 2016 03:40:58 BST # gpg: using RSA key 0x6C38CACA20D9B392 # gpg: Good signature from "David Gibson <david@gibson.dropbear.id.au>" # gpg: aka "David Gibson (Red Hat) <dgibson@redhat.com>" # gpg: aka "David Gibson (ozlabs.org) <dgibson@ozlabs.org>" # gpg: WARNING: This key is not certified with sufficiently trusted signatures! # gpg: It is not certain that the signature belongs to the owner. # Primary key fingerprint: 75F4 6586 AE61 A66C C44E 87DC 6C38 CACA 20D9 B392 * remotes/dgibson/tags/ppc-for-2.7-20160808: spapr: Fix undefined behaviour in spapr_tce_reset() macio: set res_count value to 0 after non-block ATAPI DMA transfers spapr: Correctly set query_hotpluggable_cpus hook based on machine version Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/ppc/spapr_iommu.c')
-rw-r--r--hw/ppc/spapr_iommu.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/ppc/spapr_iommu.c b/hw/ppc/spapr_iommu.c
index d57b05d..6bc4d4d 100644
--- a/hw/ppc/spapr_iommu.c
+++ b/hw/ppc/spapr_iommu.c
@@ -385,7 +385,9 @@ static void spapr_tce_reset(DeviceState *dev)
sPAPRTCETable *tcet = SPAPR_TCE_TABLE(dev);
size_t table_size = tcet->nb_table * sizeof(uint64_t);
- memset(tcet->table, 0, table_size);
+ if (tcet->nb_table) {
+ memset(tcet->table, 0, table_size);
+ }
}
static target_ulong put_tce_emu(sPAPRTCETable *tcet, target_ulong ioba,