aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorSam Bobroff <sam.bobroff@au1.ibm.com>2017-02-07 13:56:44 +1100
committerDavid Gibson <david@gibson.dropbear.id.au>2017-02-22 11:28:27 +1100
commitfe93e3e6ec1b1bf4a4c9d4bf55f8776318da6847 (patch)
tree3767b07250a58acdeb0811451933f5ec167180bf /hw
parentd4ccd87e6894569f5535eed94e45bf1bbba0478c (diff)
downloadqemu-fe93e3e6ec1b1bf4a4c9d4bf55f8776318da6847.zip
qemu-fe93e3e6ec1b1bf4a4c9d4bf55f8776318da6847.tar.gz
qemu-fe93e3e6ec1b1bf4a4c9d4bf55f8776318da6847.tar.bz2
spapr: fix off-by-one error in spapr_ovec_populate_dt()
The last byte of the option vector was missing due to an off-by-one error. Without this fix, client architecture support negotiation will fail because the last byte of option vector 5, which contains the MMU support, will be missed. Signed-off-by: Sam Bobroff <sam.bobroff@au1.ibm.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw')
-rw-r--r--hw/ppc/spapr_ovec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/ppc/spapr_ovec.c b/hw/ppc/spapr_ovec.c
index 3eb1d59..0bcf311 100644
--- a/hw/ppc/spapr_ovec.c
+++ b/hw/ppc/spapr_ovec.c
@@ -250,5 +250,5 @@ int spapr_ovec_populate_dt(void *fdt, int fdt_offset,
}
}
- return fdt_setprop(fdt, fdt_offset, name, vec, vec_len);
+ return fdt_setprop(fdt, fdt_offset, name, vec, vec_len + 1);
}