~ubuntu-branches/ubuntu/trusty/qemu/trusty

« back to all changes in this revision

Viewing changes to debian/patches/ubuntu/arm64/0003-device_tree.c-Terminate-the-empty-reservemap-in-crea.patch

  • Committer: Package Import Robot
  • Author(s): Serge Hallyn
  • Date: 2014-02-04 12:13:08 UTC
  • mfrom: (10.1.45 sid)
  • Revision ID: package-import@ubuntu.com-20140204121308-1xq92lrfs75agw2g
Tags: 1.7.0+dfsg-3ubuntu1~ppa1
* Merge 1.7.0+dfsg-3 from debian.  Remaining changes:
  - debian/patches/ubuntu:
    * expose-vmx_qemu64cpu.patch
    * linaro (omap3) and arm64 patches
    * ubuntu/target-ppc-add-stubs-for-kvm-breakpoints: fix FTBFS
      on ppc
    * ubuntu/CVE-2013-4377.patch: fix denial of service via virtio
  - debian/qemu-system-x86.modprobe: set kvm_intel nested=1 options
  - debian/control:
    * add arm64 to Architectures
    * add qemu-common and qemu-system-aarch64 packages
  - debian/qemu-system-common.install: add debian/tmp/usr/lib
  - debian/qemu-system-common.preinst: add kvm group
  - debian/qemu-system-common.postinst: remove acl placed by udev,
    and add udevadm trigger.
  - qemu-system-x86.links: add eepro100.rom, remove pxe-virtio,
    pxe-e1000 and pxe-rtl8139.
  - add qemu-system-x86.qemu-kvm.upstart and .default
  - qemu-user-static.postinst-in: remove arm64 binfmt
  - debian/rules:
    * allow parallel build
    * add aarch64 to system_targets and sys_systems
    * add qemu-kvm-spice links
    * install qemu-system-x86.modprobe
  - add debian/qemu-system-common.links for OVMF.fd link
* Remove kvm-img, kvm-nbd, kvm-ifup and kvm-ifdown symlinks.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
From 1c18bd18d37de28488fe4c9767cacd13516ef8e4 Mon Sep 17 00:00:00 2001
 
2
From: Peter Maydell <peter.maydell@linaro.org>
 
3
Date: Fri, 22 Nov 2013 17:17:09 +0000
 
4
Subject: [PATCH 03/49] device_tree.c: Terminate the empty reservemap in
 
5
 create_device_tree()
 
6
 
 
7
Device trees created with create_device_tree() may not have any
 
8
entries in their reservemap, because the FDT API requires that the
 
9
reservemap is completed before any FDT nodes are added, and
 
10
create_device_tree() itself creates a node.  However we were not
 
11
calling fdt_finish_reservemap(), which meant that there was no
 
12
terminator in the reservemap list and whatever happened to be at the
 
13
start of the FDT data section would end up being interpreted as
 
14
reservemap entries.  Avoid this by calling fdt_finish_reservemap()
 
15
to add the terminator.
 
16
 
 
17
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
 
18
Acked-by: Alexander Graf <agraf@suse.de>
 
19
Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
 
20
Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
 
21
Message-id: 1385140638-10444-3-git-send-email-peter.maydell@linaro.org
 
22
---
 
23
 device_tree.c | 4 ++++
 
24
 1 file changed, 4 insertions(+)
 
25
 
 
26
diff --git a/device_tree.c b/device_tree.c
 
27
index ffec99a..391da8c 100644
 
28
--- a/device_tree.c
 
29
+++ b/device_tree.c
 
30
@@ -41,6 +41,10 @@ void *create_device_tree(int *sizep)
 
31
     if (ret < 0) {
 
32
         goto fail;
 
33
     }
 
34
+    ret = fdt_finish_reservemap(fdt);
 
35
+    if (ret < 0) {
 
36
+        goto fail;
 
37
+    }
 
38
     ret = fdt_begin_node(fdt, "");
 
39
     if (ret < 0) {
 
40
         goto fail;
 
41
-- 
 
42
1.8.5.2
 
43