aboutsummaryrefslogtreecommitdiff
path: root/hw/vfio/platform.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2015-11-10 22:21:42 +0000
committerPeter Maydell <peter.maydell@linaro.org>2015-11-10 22:21:42 +0000
commitd93ae5b69621b7ec6ecfa405ec656d5b5f5e4770 (patch)
treed851d049d722eac5ab75f5aad7d2ec75d0643a37 /hw/vfio/platform.c
parenta77067f6ac9b17beefea506ce5f514072fe3fcf4 (diff)
parentbdd81addf4033ce26e6cd180b060f63095f3ded9 (diff)
downloadqemu-d93ae5b69621b7ec6ecfa405ec656d5b5f5e4770.zip
qemu-d93ae5b69621b7ec6ecfa405ec656d5b5f5e4770.tar.gz
qemu-d93ae5b69621b7ec6ecfa405ec656d5b5f5e4770.tar.bz2
Merge remote-tracking branch 'remotes/awilliam/tags/vfio-update-20151110.0' into staging
VFIO updates 2015-11-10 - Make Windows happy with vfio-pci devices exposed on conventional PCI buses on q35 by hiding PCIe capability (Alex Williamson) - Convert to g_new() where appropriate (Markus Armbruster) # gpg: Signature made Tue 10 Nov 2015 19:46:41 GMT using RSA key ID 3BB08B22 # gpg: Good signature from "Alex Williamson <alex.williamson@redhat.com>" # gpg: aka "Alex Williamson <alex@shazbot.org>" # gpg: aka "Alex Williamson <alwillia@redhat.com>" # gpg: aka "Alex Williamson <alex.l.williamson@gmail.com>" * remotes/awilliam/tags/vfio-update-20151110.0: vfio: Use g_new() & friends where that makes obvious sense vfio/pci: Hide device PCIe capability on non-express buses for PCIe VMs Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/vfio/platform.c')
-rw-r--r--hw/vfio/platform.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/vfio/platform.c b/hw/vfio/platform.c
index 5c1156c..289b498 100644
--- a/hw/vfio/platform.c
+++ b/hw/vfio/platform.c
@@ -478,7 +478,7 @@ static int vfio_populate_device(VFIODevice *vbasedev)
struct vfio_region_info reg_info = { .argsz = sizeof(reg_info) };
VFIORegion *ptr;
- vdev->regions[i] = g_malloc0(sizeof(VFIORegion));
+ vdev->regions[i] = g_new0(VFIORegion, 1);
ptr = vdev->regions[i];
reg_info.index = i;
ret = ioctl(vbasedev->fd, VFIO_DEVICE_GET_REGION_INFO, &reg_info);