1 |
commit: 136883cf4de36b552032292cc83ef02952229e9e |
2 |
Author: Alexey Shvetsov <alexxy <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Nov 28 18:20:13 2011 +0000 |
4 |
Commit: Alexey Shvetsov <alexxy <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Nov 28 18:20:13 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/virtualization.git;a=commit;h=136883cf |
7 |
|
8 |
Drop duplicated stuff |
9 |
|
10 |
(Portage version: 2.2.0_alpha79/git/Linux x86_64, unsigned Manifest commit) |
11 |
|
12 |
--- |
13 |
app-emulation/xen/Manifest | 14 - |
14 |
app-emulation/xen/files/Manifest | 7 - |
15 |
.../files/xen-3.3.0-unexported-target-fix.patch | 21 - |
16 |
.../xen/files/xen-3.4.2-CVE-2011-1583.patch | 87 ---- |
17 |
.../xen-3.4.2-dump_registers-watchdog-fix.patch | 19 - |
18 |
.../xen/files/xen-3.4.2-fix-__addr_ok-limit.patch | 101 ----- |
19 |
app-emulation/xen/files/xen-3.4.2-no-DMA.patch | 71 ---- |
20 |
.../xen/files/xen-3.4.2-werror-idiocy.patch | 429 -------------------- |
21 |
.../xen/files/xen-4.1.1-iommu_sec_fix.patch | 74 ---- |
22 |
app-emulation/xen/metadata.xml | 1 - |
23 |
app-emulation/xen/xen-3.4.2-r4.ebuild | 114 ------ |
24 |
app-emulation/xen/xen-4.1.1-r2.ebuild | 121 ------ |
25 |
12 files changed, 0 insertions(+), 1059 deletions(-) |
26 |
|
27 |
diff --git a/app-emulation/xen/Manifest b/app-emulation/xen/Manifest |
28 |
deleted file mode 100644 |
29 |
index 61a4034..0000000 |
30 |
--- a/app-emulation/xen/Manifest |
31 |
+++ /dev/null |
32 |
@@ -1,14 +0,0 @@ |
33 |
-AUX Manifest 1462 RMD160 c2090ecd3fcacafcc988563676c028d8b9bd8d0c SHA1 1f1e6db2c197e9a197e876c74131fadca34944cd SHA256 fdbed299dcfeafae7b3fb738912d67f10eef61b337a0315d0b15dc6d984e69b8 |
34 |
-AUX xen-3.3.0-unexported-target-fix.patch 788 RMD160 4b30444c021479cbd3969493639533fc1e43e781 SHA1 9119f06b4a005c385ac27e085e2d96ccf9cd4dc9 SHA256 e46f5fbe4c579b84f895f0ac6e05589553a11305ca30e69405082d58abd9ee07 |
35 |
-AUX xen-3.4.2-CVE-2011-1583.patch 2893 RMD160 c6ae9661202dafc2abdcf3aaf939464d14ded9fd SHA1 b2140fe7d615b542a96dadaaf8ace382e528d2cb SHA256 809c1744aee7569db31e9959c1e2c433ef6f4067134b26f70a689e056a024df9 |
36 |
-AUX xen-3.4.2-dump_registers-watchdog-fix.patch 533 RMD160 766249003d91cbec3b0014a8446e1a4d01cd847a SHA1 6306250671976c638f814a4958211af4bacb53b4 SHA256 17d18f268efd302085bdfa0673e2d9478e84206b6d060d0a63854441233a81c6 |
37 |
-AUX xen-3.4.2-fix-__addr_ok-limit.patch 3380 RMD160 8b8104a370847c1c148255855901b9dd32e6c888 SHA1 e3dd5cfda2410917b0844dff999ccbee2463ccb4 SHA256 dab6954da3cbf7592a36a6234561174d0d117711b87c0868d17f9d21af75a835 |
38 |
-AUX xen-3.4.2-no-DMA.patch 2708 RMD160 9aa83e21e8b07feca1f799f9efb4f9cd5728c6c6 SHA1 e55fa5a04203470af68452762f919b402854fce9 SHA256 87a3fe134b8d3c762d4d229986ccb77898a603a18974f453cfdf6ba9d68fe982 |
39 |
-AUX xen-3.4.2-werror-idiocy.patch 16826 RMD160 14f4678c723fd9241c88786b5b07a8c25252ce6f SHA1 f15d3c4d37b9c11fed49c025de2eaeb6911845a1 SHA256 261ef6541736f1df757476590bb8581cac376c9408e5041e8356336e13025c67 |
40 |
-AUX xen-4.1.1-iommu_sec_fix.patch 2851 RMD160 4367178c10cdc1e752f3e9ffb70f42e6e7179242 SHA1 8487f85dbf81bf245deaccca5ff5b8f46e60d112 SHA256 3a0ab3cb5c18db91f4be457cbba36189a558da7b794e1a35795f4fed3d48a7c8 |
41 |
-DIST xen-3.4.2.tar.gz 11187726 RMD160 2ef81df1f44356d60e04e21df2173ce5357d8509 SHA1 3cd2cafacd52bbac2e2da1cfd846ee6260b43455 SHA256 d17c33136041cc8da69214ccf527fc48637bee7a9ab4d68a88ec50e6a9d20b0b |
42 |
-DIST xen-4.1.1.tar.gz 10355625 RMD160 4b3c0641b0f098889f627662aa6b8fea00c5b636 SHA1 f1b5ef4b663c339faf9c77fc895327cfbcc9776c SHA256 246289227507466b5da8b2d0da84a5b0e68a392527b16cde38898d0348890f5b |
43 |
-EBUILD xen-3.4.2-r4.ebuild 3247 RMD160 73c91e87a06e83faee786268db656531a2dbe71f SHA1 94f6be18689fd09099ad062f829358bfa159d6ef SHA256 385ddd40121b1d415214e9adc619cb39825febcaec21b7cb70c2d2f2e4b60a04 |
44 |
-EBUILD xen-4.1.1-r2.ebuild 3339 RMD160 d70e58cadf5b9c45d67e2c5d05a8061c67d62319 SHA1 06f5c7c6e493f47d476d08663cfdc536ac0ee760 SHA256 6f7089d85d6ab12d22d5acec4efca8a7646a9dfc3c7a6b1b030336cb77867376 |
45 |
-EBUILD xen-9999.ebuild 3170 RMD160 5bbc3bb7dec7d099f639334843c3c6607ff1c5c5 SHA1 799030d125b2acb9976df9e39896937a3c591973 SHA256 b75349eb41edeb16f4571355b963de576cf58e9c7d86a4c4f74d4892d43b094f |
46 |
-MISC metadata.xml 581 RMD160 d22ffb491d9dad33425b97add683dd6b8b9139e1 SHA1 649f65e9fd2ab25e32394c555a24fc0f6b59c37f SHA256 1cf2cc4bb5b5278ac75e74910607518ddd2bd6454f18325319ce1ac102fab535 |
47 |
|
48 |
diff --git a/app-emulation/xen/files/Manifest b/app-emulation/xen/files/Manifest |
49 |
deleted file mode 100644 |
50 |
index 236346a..0000000 |
51 |
--- a/app-emulation/xen/files/Manifest |
52 |
+++ /dev/null |
53 |
@@ -1,7 +0,0 @@ |
54 |
-MISC xen-3.3.0-unexported-target-fix.patch 788 RMD160 4b30444c021479cbd3969493639533fc1e43e781 SHA1 9119f06b4a005c385ac27e085e2d96ccf9cd4dc9 SHA256 e46f5fbe4c579b84f895f0ac6e05589553a11305ca30e69405082d58abd9ee07 |
55 |
-MISC xen-3.4.2-CVE-2011-1583.patch 2893 RMD160 c6ae9661202dafc2abdcf3aaf939464d14ded9fd SHA1 b2140fe7d615b542a96dadaaf8ace382e528d2cb SHA256 809c1744aee7569db31e9959c1e2c433ef6f4067134b26f70a689e056a024df9 |
56 |
-MISC xen-3.4.2-dump_registers-watchdog-fix.patch 533 RMD160 766249003d91cbec3b0014a8446e1a4d01cd847a SHA1 6306250671976c638f814a4958211af4bacb53b4 SHA256 17d18f268efd302085bdfa0673e2d9478e84206b6d060d0a63854441233a81c6 |
57 |
-MISC xen-3.4.2-fix-__addr_ok-limit.patch 3380 RMD160 8b8104a370847c1c148255855901b9dd32e6c888 SHA1 e3dd5cfda2410917b0844dff999ccbee2463ccb4 SHA256 dab6954da3cbf7592a36a6234561174d0d117711b87c0868d17f9d21af75a835 |
58 |
-MISC xen-3.4.2-no-DMA.patch 2708 RMD160 9aa83e21e8b07feca1f799f9efb4f9cd5728c6c6 SHA1 e55fa5a04203470af68452762f919b402854fce9 SHA256 87a3fe134b8d3c762d4d229986ccb77898a603a18974f453cfdf6ba9d68fe982 |
59 |
-MISC xen-3.4.2-werror-idiocy.patch 16826 RMD160 14f4678c723fd9241c88786b5b07a8c25252ce6f SHA1 f15d3c4d37b9c11fed49c025de2eaeb6911845a1 SHA256 261ef6541736f1df757476590bb8581cac376c9408e5041e8356336e13025c67 |
60 |
-MISC xen-4.1.1-iommu_sec_fix.patch 2851 RMD160 4367178c10cdc1e752f3e9ffb70f42e6e7179242 SHA1 8487f85dbf81bf245deaccca5ff5b8f46e60d112 SHA256 3a0ab3cb5c18db91f4be457cbba36189a558da7b794e1a35795f4fed3d48a7c8 |
61 |
|
62 |
diff --git a/app-emulation/xen/files/xen-3.3.0-unexported-target-fix.patch b/app-emulation/xen/files/xen-3.3.0-unexported-target-fix.patch |
63 |
deleted file mode 100644 |
64 |
index 89f91a4..0000000 |
65 |
--- a/app-emulation/xen/files/xen-3.3.0-unexported-target-fix.patch |
66 |
+++ /dev/null |
67 |
@@ -1,21 +0,0 @@ |
68 |
-diff -Nru a/tools/ioemu-qemu-xen/xen-setup b/tools/ioemu-qemu-xen/xen-setup |
69 |
---- a/tools/ioemu-qemu-xen/xen-setup 2008-08-22 17:56:41.000000000 +0800 |
70 |
-+++ b/tools/ioemu-qemu-xen/xen-setup 2009-02-20 10:55:37.000000000 +0800 |
71 |
-@@ -3,6 +3,8 @@ |
72 |
- |
73 |
- # git-clean -x -d && ./xen-setup && make prefix=/usr CMDLINE_CFLAGS='-O0 -g' -j4 && make install DESTDIR=`pwd`/dist/ prefix=/usr && rsync -a --stats --delete . thule:shadow/qemu-iwj.git/ && rsync -a --stats dist/. root@thule:/ |
74 |
- |
75 |
-+target=i386-dm |
76 |
-+ |
77 |
- rm -f $target/Makefile |
78 |
- rm -f $target/config.mak |
79 |
- rm -f config-host.mak |
80 |
-@@ -11,8 +13,6 @@ |
81 |
- |
82 |
- ./configure --disable-gfx-check --disable-gcc-check --disable-curses --disable-slirp "$@" --prefix=/usr |
83 |
- |
84 |
--target=i386-dm |
85 |
-- |
86 |
- if [ "x$XEN_ROOT" != x ]; then |
87 |
- echo "XEN_ROOT=$XEN_ROOT" >>config-host.mak |
88 |
- fi |
89 |
|
90 |
diff --git a/app-emulation/xen/files/xen-3.4.2-CVE-2011-1583.patch b/app-emulation/xen/files/xen-3.4.2-CVE-2011-1583.patch |
91 |
deleted file mode 100644 |
92 |
index f5cec4d..0000000 |
93 |
--- a/app-emulation/xen/files/xen-3.4.2-CVE-2011-1583.patch |
94 |
+++ /dev/null |
95 |
@@ -1,87 +0,0 @@ |
96 |
---- tools/libxc/xc_dom_bzimageloader.c 2009-11-10 23:12:56.000000000 +0800 |
97 |
-+++ tools/libxc/xc_dom_bzimageloader.c 2011-10-09 20:10:08.972815311 +0800 |
98 |
-@@ -308,19 +308,19 @@ |
99 |
- |
100 |
- extern struct xc_dom_loader elf_loader; |
101 |
- |
102 |
--static unsigned int payload_offset(struct setup_header *hdr) |
103 |
-+static int check_magic(struct xc_dom_image *dom, const void *magic, size_t len) |
104 |
- { |
105 |
-- unsigned int off; |
106 |
-+ if (len > dom->kernel_size) |
107 |
-+ return 0; |
108 |
-+ |
109 |
-+ return (memcmp(dom->kernel_blob, magic, len) == 0); |
110 |
-+ } |
111 |
- |
112 |
-- off = (hdr->setup_sects + 1) * 512; |
113 |
-- off += hdr->payload_offset; |
114 |
-- return off; |
115 |
--} |
116 |
-- |
117 |
--static int xc_dom_probe_bzimage_kernel(struct xc_dom_image *dom) |
118 |
-+static int check_bzimage_kernel(struct xc_dom_image *dom, int verbose) |
119 |
- { |
120 |
- struct setup_header *hdr; |
121 |
-- int ret; |
122 |
-+ uint64_t payload_offset, payload_length; |
123 |
-+ /* int ret; */ |
124 |
- |
125 |
- if ( dom->kernel_blob == NULL ) |
126 |
- { |
127 |
-@@ -352,20 +352,47 @@ |
128 |
- return -EINVAL; |
129 |
- } |
130 |
- |
131 |
-- dom->kernel_blob = dom->kernel_blob + payload_offset(hdr); |
132 |
-- dom->kernel_size = hdr->payload_length; |
133 |
-+ /* upcast to 64 bits to avoid overflow */ |
134 |
-+ /* setup_sects is u8 and so cannot overflow */ |
135 |
-+ payload_offset = (hdr->setup_sects + 1) * 512; |
136 |
-+ payload_offset += hdr->payload_offset; |
137 |
-+ payload_length = hdr->payload_length; |
138 |
- |
139 |
-- if ( memcmp(dom->kernel_blob, "\037\213", 2) == 0 ) |
140 |
-- { |
141 |
-+/* if ( memcmp(dom->kernel_blob, "\037\213", 2) == 0 ) |
142 |
-+ { |
143 |
- ret = xc_dom_try_gunzip(dom, &dom->kernel_blob, &dom->kernel_size); |
144 |
-- if ( ret == -1 ) |
145 |
-+ if ( ret == -1 ) */ |
146 |
-+ if ( payload_offset >= dom->kernel_size ) |
147 |
-+ { |
148 |
-+ xc_dom_panic(XC_INVALID_KERNEL, "%s: payload offset overflow", |
149 |
-+ __FUNCTION__); |
150 |
-+ return -EINVAL; |
151 |
-+ } |
152 |
-+ if ( (payload_offset + payload_length) > dom->kernel_size ) |
153 |
-+ { |
154 |
-+ xc_dom_panic(XC_INVALID_KERNEL, "%s: payload length overflow", |
155 |
-+ __FUNCTION__); |
156 |
-+ } |
157 |
-+ |
158 |
-+ dom->kernel_blob = dom->kernel_blob + payload_offset; |
159 |
-+ dom->kernel_size = payload_length; |
160 |
-+ |
161 |
-+ if ( check_magic(dom, "\037\213", 2) ) |
162 |
-+ { |
163 |
-+ if ( xc_dom_try_gunzip(dom, &dom->kernel_blob, &dom->kernel_size) == -1 ) |
164 |
- { |
165 |
-- xc_dom_panic(XC_INVALID_KERNEL, |
166 |
-- "%s: unable to gzip decompress kernel\n", |
167 |
-- __FUNCTION__); |
168 |
-+ if ( verbose ) |
169 |
-+ xc_dom_panic(XC_INVALID_KERNEL, "%s: unable to decompress kernel\$n", |
170 |
-+ __FUNCTION__); |
171 |
- return -EINVAL; |
172 |
- } |
173 |
- } |
174 |
-+ else |
175 |
-+ { |
176 |
-+ xc_dom_panic(XC_INVALID_KERNEL, "%s: unknown compression format\n", |
177 |
-+ __FUNCTION__); |
178 |
-+ return -EINVAL; |
179 |
-+ } |
180 |
- else if ( memcmp(dom->kernel_blob, "\102\132\150", 3) == 0 ) |
181 |
- { |
182 |
- ret = xc_try_bzip2_decode(dom, &dom->kernel_blob, &dom->kernel_size); |
183 |
|
184 |
diff --git a/app-emulation/xen/files/xen-3.4.2-dump_registers-watchdog-fix.patch b/app-emulation/xen/files/xen-3.4.2-dump_registers-watchdog-fix.patch |
185 |
deleted file mode 100644 |
186 |
index 7c8ff5b..0000000 |
187 |
--- a/app-emulation/xen/files/xen-3.4.2-dump_registers-watchdog-fix.patch |
188 |
+++ /dev/null |
189 |
@@ -1,19 +0,0 @@ |
190 |
-diff -r 784caad93325 xen/common/keyhandler.c |
191 |
---- a/xen/common/keyhandler.c Tue Nov 10 15:03:52 2009 +0000 |
192 |
-+++ b/xen/common/keyhandler.c Tue Jan 05 10:47:49 2010 +0000 |
193 |
-@@ -106,6 +106,7 @@ |
194 |
- unsigned int cpu; |
195 |
- |
196 |
- /* We want to get everything out that we possibly can. */ |
197 |
-+ watchdog_disable(); |
198 |
- console_start_sync(); |
199 |
- |
200 |
- printk("'%c' pressed -> dumping registers\n", key); |
201 |
-@@ -125,6 +126,7 @@ |
202 |
- printk("\n"); |
203 |
- |
204 |
- console_end_sync(); |
205 |
-+ watchdog_enable(); |
206 |
- } |
207 |
- |
208 |
- static void dump_dom0_registers(unsigned char key) |
209 |
|
210 |
diff --git a/app-emulation/xen/files/xen-3.4.2-fix-__addr_ok-limit.patch b/app-emulation/xen/files/xen-3.4.2-fix-__addr_ok-limit.patch |
211 |
deleted file mode 100644 |
212 |
index 8616008..0000000 |
213 |
--- a/app-emulation/xen/files/xen-3.4.2-fix-__addr_ok-limit.patch |
214 |
+++ /dev/null |
215 |
@@ -1,101 +0,0 @@ |
216 |
------BEGIN PGP SIGNED MESSAGE----- |
217 |
-Hash: SHA1 |
218 |
- |
219 |
- Xen Security Advisory CVE-2011-2901 / XSA-4 |
220 |
- revision no.2 |
221 |
- Xen <= 3.3 DoS due to incorrect virtual address validation |
222 |
- |
223 |
-ISSUE DESCRIPTION |
224 |
-================= |
225 |
- |
226 |
-The x86_64 __addr_ok() macro intends to ensure that the checked |
227 |
-address is either in the positive half of the 48-bit virtual address |
228 |
-space, or above the Xen-reserved area. However, the current shift |
229 |
-count is off-by-one, allowing full access to the "negative half" too, |
230 |
-via certain hypercalls which ignore virtual-address bits [63:48]. |
231 |
-Vulnerable hypercalls exist only in very old versions of the |
232 |
-hypervisor. |
233 |
- |
234 |
-VULNERABLE SYSTEMS |
235 |
-================== |
236 |
- |
237 |
-All systems running a Xen 3.3 or earlier hypervisor with 64-bit PV |
238 |
-guests with untrusted administrators are vulnerable. |
239 |
- |
240 |
-IMPACT |
241 |
-====== |
242 |
- |
243 |
-A malicious guest administrator on a vulnerable system is able to |
244 |
-crash the host. |
245 |
- |
246 |
-There are no known further exploits but these have not been ruled out. |
247 |
- |
248 |
-RESOLUTION |
249 |
-========== |
250 |
- |
251 |
-The attached patch resolves the issue. |
252 |
- |
253 |
-Alternatively, users may choose to upgrade to a more recent hypervisor |
254 |
- |
255 |
-PATCHES |
256 |
-======= |
257 |
- |
258 |
-The following patch resolves this issue. |
259 |
- |
260 |
-Filename: fix-__addr_ok-limit.patch |
261 |
-SHA1: f18bde8d276110451c608a16f577865aa1226b4f |
262 |
-SHA256: 2da5aac72e1ac4849c34d38374ae456795905fd9512eef94b48fc31383c21636 |
263 |
- |
264 |
-This patch should apply cleanly, and fix the problem, for all affected |
265 |
-versions of Xen. |
266 |
- |
267 |
-It is harmless when applied to later hypervisors and will be included |
268 |
-in the Xen unstable branch in due course. |
269 |
- |
270 |
-VERSION HISTORY |
271 |
-=============== |
272 |
- |
273 |
-Analysis following version 1 of this advisory (sent out to the |
274 |
-predisclosure list during the embargo period) indicates that the |
275 |
-actual DoS vulnerability only exists in very old hypervisors, Xen 3.3 |
276 |
-and earlier, contrary to previous reports. |
277 |
- |
278 |
-This advisory is no longer embargoed. |
279 |
------BEGIN PGP SIGNATURE----- |
280 |
-Version: GnuPG v1.4.9 (GNU/Linux) |
281 |
- |
282 |
-iQEcBAEBAgAGBQJOYLq2AAoJEIP+FMlX6CvZLegH/26/oJBkd/WM/yYhXkzlbnIP |
283 |
-MxF6Fgy96Omu8poQTanD7g1vEcM0TOLY+Kk3GGsfj4aDdEJ5Nq4ZOW8ooI0VnVcD |
284 |
-7VXQqFsXPxre+eZ6g+G0AsmzdsG45C3qujUTRfGKqzYwXqjWjt9nNsdIy1Mrz8/4 |
285 |
-zG1uLDkN0LXnBG2Te4q8ZckYwMq8gFXHHnH35RfQ5Besu6pvJmtK3rFXETdlP12A |
286 |
-JjBh7t5jsCfzvYWFQehVp8mJupuftiOBPClmVh4vrvN9gYd5rzEgB4Q9Ioiqz2qT |
287 |
-2bE1zegR8NeOKBOi9xriTU8F530OdFzeWAbo7D5gyEbYdc60eNwbadcgNGLbzMg= |
288 |
-=09T8 |
289 |
------END PGP SIGNATURE----- |
290 |
- |
291 |
-Subject: XSA-4: xen: correct limit checking in x86_64 version of __addr_ok |
292 |
- |
293 |
-The x86_64 __addr_ok() macro intends to ensure that the checked |
294 |
-address is either in the positive half of the 48-bit virtual address |
295 |
-space, or above the Xen-reserved area. However, the current shift |
296 |
-count is off-by-one, allowing full access to the "negative half" |
297 |
-too. Guests may exploit this to gain access to off-limits ranges. |
298 |
- |
299 |
-This issue has been assigned CVE-2011-2901. |
300 |
- |
301 |
-Signed-off-by: Laszlo Ersek <lersek@××××××.com> |
302 |
-Signed-off-by: Ian Campbell <ian.campbell@××××××.com> |
303 |
- |
304 |
-diff --git a/xen/include/asm-x86/x86_64/uaccess.h |
305 |
-b/xen/include/asm-x86/x86_64/uaccess.h |
306 |
---- a/xen/include/asm-x86/x86_64/uaccess.h |
307 |
-+++ b/xen/include/asm-x86/x86_64/uaccess.h |
308 |
-@@ -34,7 +34,7 @@ |
309 |
- * non-canonical address (and thus fault) before ever reaching VIRT_START. |
310 |
- */ |
311 |
- #define __addr_ok(addr) \ |
312 |
-- (((unsigned long)(addr) < (1UL<<48)) || \ |
313 |
-+ (((unsigned long)(addr) < (1UL<<47)) || \ |
314 |
- ((unsigned long)(addr) >= HYPERVISOR_VIRT_END)) |
315 |
- |
316 |
- #define access_ok(addr, size) \ |
317 |
|
318 |
diff --git a/app-emulation/xen/files/xen-3.4.2-no-DMA.patch b/app-emulation/xen/files/xen-3.4.2-no-DMA.patch |
319 |
deleted file mode 100644 |
320 |
index f04d9e2..0000000 |
321 |
--- a/app-emulation/xen/files/xen-3.4.2-no-DMA.patch |
322 |
+++ /dev/null |
323 |
@@ -1,71 +0,0 @@ |
324 |
-# HG changeset patch |
325 |
-# User Tim Deegan <Tim.Deegan@××××××.com> |
326 |
-# Date 1313145221 -3600 |
327 |
-# Node ID 84e3706df07a1963e23cd3875d8603917657d462 |
328 |
-# Parent cb22fa57ff252893b6adb1481e09b1287eacd990 |
329 |
-Passthrough: disable bus-mastering on any card that causes an IOMMU fault. |
330 |
- |
331 |
-This stops the card from raising back-to-back faults and live-locking |
332 |
-the CPU that handles them. |
333 |
- |
334 |
-Signed-off-by: Tim Deegan <tim@×××.org> |
335 |
-Acked-by: Wei Wang2 <wei.wang2@×××.com> |
336 |
-Acked-by: Allen M Kay <allen.m.kay@×××××.com> |
337 |
- |
338 |
---- a/xen/drivers/passthrough/vtd/iommu.c.orig Mon Jul 25 16:48:39 2011 +0100 |
339 |
-+++ b/xen/drivers/passthrough/vtd/iommu.c Fri Aug 12 11:33:41 2011 +0100 |
340 |
-@@ -733,7 +733,7 @@ |
341 |
- while (1) |
342 |
- { |
343 |
- u8 fault_reason; |
344 |
-- u16 source_id; |
345 |
-+ u16 source_id, cword; |
346 |
- u32 data; |
347 |
- u64 guest_addr; |
348 |
- int type; |
349 |
-@@ -766,6 +766,14 @@ |
350 |
- iommu_page_fault_do_one(iommu, type, fault_reason, |
351 |
- source_id, guest_addr); |
352 |
- |
353 |
-+ /* Tell the device to stop DMAing; we can't rely on the guest to |
354 |
-+ * control it for us. */ |
355 |
-+ cword = pci_conf_read16(PCI_BUS(source_id), PCI_SLOT(source_id), |
356 |
-+ PCI_FUNC(source_id), PCI_COMMAND); |
357 |
-+ pci_conf_write16(PCI_BUS(source_id), PCI_SLOT(source_id), |
358 |
-+ PCI_FUNC(source_id), PCI_COMMAND, |
359 |
-+ cword & ~PCI_COMMAND_MASTER); |
360 |
-+ |
361 |
- fault_index++; |
362 |
- if ( fault_index > cap_num_fault_regs(iommu->cap) ) |
363 |
- fault_index = 0; |
364 |
- |
365 |
---- a/xen/drivers/passthrough/amd/iommu_init.c.orig Mon Jul 25 16:48:39 2011 +0100 |
366 |
-+++ b/xen/drivers/passthrough/amd/iommu_init.c Fri Aug 12 11:33:41 2011 +0100 |
367 |
-@@ -415,7 +415,7 @@ |
368 |
- |
369 |
- static void parse_event_log_entry(u32 entry[]) |
370 |
- { |
371 |
-- u16 domain_id, device_id; |
372 |
-+ u16 domain_id, device_id, bdf, cword; |
373 |
- u32 code; |
374 |
- u64 *addr; |
375 |
- char * event_str[] = {"ILLEGAL_DEV_TABLE_ENTRY", |
376 |
-@@ -449,6 +449,18 @@ |
377 |
- printk(XENLOG_ERR "AMD-Vi: " |
378 |
- "%s: domain = %d, device id = 0x%04x, fault address = 0x%"PRIx64"\n", |
379 |
- event_str[code-1], domain_id, device_id, *addr); |
380 |
-+ |
381 |
-+ /* Tell the device to stop DMAing; we can't rely on the guest to |
382 |
-+ * control it for us. */ |
383 |
-+ for ( bdf = 0; bdf < ivrs_bdf_entries; bdf++ ) |
384 |
-+ if ( get_dma_requestor_id(bdf) == device_id ) |
385 |
-+ { |
386 |
-+ cword = pci_conf_read16(PCI_BUS(bdf), PCI_SLOT(bdf), |
387 |
-+ PCI_FUNC(bdf), PCI_COMMAND); |
388 |
-+ pci_conf_write16(PCI_BUS(bdf), PCI_SLOT(bdf), |
389 |
-+ PCI_FUNC(bdf), PCI_COMMAND, |
390 |
-+ cword & ~PCI_COMMAND_MASTER); |
391 |
-+ } |
392 |
- } |
393 |
- } |
394 |
- |
395 |
|
396 |
diff --git a/app-emulation/xen/files/xen-3.4.2-werror-idiocy.patch b/app-emulation/xen/files/xen-3.4.2-werror-idiocy.patch |
397 |
deleted file mode 100644 |
398 |
index 7f5b3cb..0000000 |
399 |
--- a/app-emulation/xen/files/xen-3.4.2-werror-idiocy.patch |
400 |
+++ /dev/null |
401 |
@@ -1,429 +0,0 @@ |
402 |
-diff -ur xen-3.4.2.orig//Config.mk xen-3.4.2//Config.mk |
403 |
---- xen-3.4.2.orig//Config.mk 2009-11-10 23:16:03.000000000 +0800 |
404 |
-+++ xen-3.4.2//Config.mk 2011-09-25 02:34:11.605793042 +0800 |
405 |
-@@ -14,7 +14,7 @@ |
406 |
- |
407 |
- # Tools to run on system hosting the build |
408 |
- HOSTCC = gcc |
409 |
--HOSTCFLAGS = -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer |
410 |
-+HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer |
411 |
- HOSTCFLAGS += -fno-strict-aliasing |
412 |
- |
413 |
- DISTDIR ?= $(XEN_ROOT)/dist |
414 |
-diff -ur xen-3.4.2.orig//extras/mini-os/minios.mk xen-3.4.2//extras/mini-os/minios.mk |
415 |
---- xen-3.4.2.orig//extras/mini-os/minios.mk 2009-11-10 23:12:55.000000000 +0800 |
416 |
-+++ xen-3.4.2//extras/mini-os/minios.mk 2011-09-25 02:34:11.855793042 +0800 |
417 |
-@@ -6,7 +6,7 @@ |
418 |
- |
419 |
- # Define some default flags. |
420 |
- # NB. '-Wcast-qual' is nasty, so I omitted it. |
421 |
--DEF_CFLAGS += -fno-builtin -Wall -Werror -Wredundant-decls -Wno-format -Wno-redundant-decls |
422 |
-+DEF_CFLAGS += -fno-builtin -Wall -Wredundant-decls -Wno-format -Wno-redundant-decls |
423 |
- DEF_CFLAGS += $(call cc-option,$(CC),-fno-stack-protector,) |
424 |
- DEF_CFLAGS += $(call cc-option,$(CC),-fgnu89-inline) |
425 |
- DEF_CFLAGS += -Wstrict-prototypes -Wnested-externs -Wpointer-arith -Winline |
426 |
-diff -ur xen-3.4.2.orig//tools/blktap/drivers/Makefile xen-3.4.2//tools/blktap/drivers/Makefile |
427 |
---- xen-3.4.2.orig//tools/blktap/drivers/Makefile 2009-11-10 23:12:55.000000000 +0800 |
428 |
-+++ xen-3.4.2//tools/blktap/drivers/Makefile 2011-09-25 02:34:11.750793042 +0800 |
429 |
-@@ -5,7 +5,7 @@ |
430 |
- QCOW_UTIL = img2qcow qcow2raw qcow-create |
431 |
- LIBAIO_DIR = ../../libaio/src |
432 |
- |
433 |
--CFLAGS += -Werror |
434 |
-+CFLAGS += |
435 |
- CFLAGS += -Wno-unused |
436 |
- CFLAGS += -I../lib |
437 |
- CFLAGS += $(CFLAGS_libxenctrl) |
438 |
-diff -ur xen-3.4.2.orig//tools/blktap/lib/Makefile xen-3.4.2//tools/blktap/lib/Makefile |
439 |
---- xen-3.4.2.orig//tools/blktap/lib/Makefile 2009-11-10 23:12:55.000000000 +0800 |
440 |
-+++ xen-3.4.2//tools/blktap/lib/Makefile 2011-09-25 02:34:11.748793042 +0800 |
441 |
-@@ -13,7 +13,7 @@ |
442 |
- SRCS := |
443 |
- SRCS += xenbus.c blkif.c xs_api.c |
444 |
- |
445 |
--CFLAGS += -Werror |
446 |
-+CFLAGS += |
447 |
- CFLAGS += -Wno-unused |
448 |
- CFLAGS += -fPIC |
449 |
- # get asprintf(): |
450 |
-diff -ur xen-3.4.2.orig//tools/console/Makefile xen-3.4.2//tools/console/Makefile |
451 |
---- xen-3.4.2.orig//tools/console/Makefile 2009-11-10 23:12:55.000000000 +0800 |
452 |
-+++ xen-3.4.2//tools/console/Makefile 2011-09-25 02:34:11.704793042 +0800 |
453 |
-@@ -2,7 +2,7 @@ |
454 |
- XEN_ROOT=../.. |
455 |
- include $(XEN_ROOT)/tools/Rules.mk |
456 |
- |
457 |
--CFLAGS += -Werror |
458 |
-+CFLAGS += |
459 |
- |
460 |
- CFLAGS += $(CFLAGS_libxenctrl) |
461 |
- CFLAGS += $(CFLAGS_libxenstore) |
462 |
-diff -ur xen-3.4.2.orig//tools/debugger/xenitp/Makefile xen-3.4.2//tools/debugger/xenitp/Makefile |
463 |
---- xen-3.4.2.orig//tools/debugger/xenitp/Makefile 2009-11-10 23:12:55.000000000 +0800 |
464 |
-+++ xen-3.4.2//tools/debugger/xenitp/Makefile 2011-09-25 02:34:11.744793042 +0800 |
465 |
-@@ -1,7 +1,7 @@ |
466 |
- XEN_ROOT=../../.. |
467 |
- include $(XEN_ROOT)/tools/Rules.mk |
468 |
- |
469 |
--#CFLAGS += -Werror -g -O0 |
470 |
-+#CFLAGS += -g -O0 |
471 |
- |
472 |
- CFLAGS += $(CFLAGS_libxenctrl) |
473 |
- |
474 |
-diff -ur xen-3.4.2.orig//tools/firmware/Rules.mk xen-3.4.2//tools/firmware/Rules.mk |
475 |
---- xen-3.4.2.orig//tools/firmware/Rules.mk 2009-11-10 23:12:55.000000000 +0800 |
476 |
-+++ xen-3.4.2//tools/firmware/Rules.mk 2011-09-25 02:34:11.565793045 +0800 |
477 |
-@@ -10,7 +10,7 @@ |
478 |
- CFLAGS += -DNDEBUG |
479 |
- endif |
480 |
- |
481 |
--CFLAGS += -Werror |
482 |
-+CFLAGS += |
483 |
- |
484 |
- # Disable PIE/SSP if GCC supports them. They can break us. |
485 |
- $(call cc-option-add,CFLAGS,CC,-nopie) |
486 |
-diff -ur xen-3.4.2.orig//tools/flask/libflask/Makefile xen-3.4.2//tools/flask/libflask/Makefile |
487 |
---- xen-3.4.2.orig//tools/flask/libflask/Makefile 2009-11-10 23:12:56.000000000 +0800 |
488 |
-+++ xen-3.4.2//tools/flask/libflask/Makefile 2011-09-25 02:34:11.657793042 +0800 |
489 |
-@@ -9,7 +9,7 @@ |
490 |
- SRCS := |
491 |
- SRCS += flask_op.c |
492 |
- |
493 |
--CFLAGS += -Werror |
494 |
-+CFLAGS += |
495 |
- CFLAGS += -fno-strict-aliasing |
496 |
- CFLAGS += $(INCLUDES) -I./include -I$(XEN_LIBXC) -I$(XEN_INCLUDE) |
497 |
- |
498 |
-diff -ur xen-3.4.2.orig//tools/flask/loadpolicy/Makefile xen-3.4.2//tools/flask/loadpolicy/Makefile |
499 |
---- xen-3.4.2.orig//tools/flask/loadpolicy/Makefile 2009-11-10 23:12:56.000000000 +0800 |
500 |
-+++ xen-3.4.2//tools/flask/loadpolicy/Makefile 2011-09-25 02:34:11.660793042 +0800 |
501 |
-@@ -6,7 +6,7 @@ |
502 |
- LIBFLASK_ROOT = $(XEN_ROOT)/tools/flask/libflask |
503 |
- |
504 |
- PROFILE=#-pg |
505 |
--BASECFLAGS=-Wall -g -Werror |
506 |
-+BASECFLAGS=-Wall -g |
507 |
- BASECFLAGS+= $(PROFILE) |
508 |
- #BASECFLAGS+= -I$(XEN_ROOT)/tools |
509 |
- BASECFLAGS+= $(CFLAGS_libxenctrl) |
510 |
-diff -ur xen-3.4.2.orig//tools/fs-back/Makefile xen-3.4.2//tools/fs-back/Makefile |
511 |
---- xen-3.4.2.orig//tools/fs-back/Makefile 2009-11-10 23:12:56.000000000 +0800 |
512 |
-+++ xen-3.4.2//tools/fs-back/Makefile 2011-09-25 02:34:11.637793042 +0800 |
513 |
-@@ -5,7 +5,7 @@ |
514 |
- |
515 |
- IBIN = fs-backend |
516 |
- |
517 |
--CFLAGS += -Werror |
518 |
-+CFLAGS += |
519 |
- CFLAGS += -Wno-unused |
520 |
- CFLAGS += -fno-strict-aliasing |
521 |
- CFLAGS += $(CFLAGS_libxenctrl) |
522 |
-diff -ur xen-3.4.2.orig//tools/ioemu-qemu-xen/configure xen-3.4.2//tools/ioemu-qemu-xen/configure |
523 |
---- xen-3.4.2.orig//tools/ioemu-qemu-xen/configure 2009-11-05 19:44:56.000000000 +0800 |
524 |
-+++ xen-3.4.2//tools/ioemu-qemu-xen/configure 2011-09-25 02:34:11.888793042 +0800 |
525 |
-@@ -468,7 +468,7 @@ |
526 |
- CFLAGS="$CFLAGS -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls" |
527 |
- LDFLAGS="$LDFLAGS -g" |
528 |
- if test "$werror" = "yes" ; then |
529 |
--CFLAGS="$CFLAGS -Werror" |
530 |
-+CFLAGS="$CFLAGS" |
531 |
- fi |
532 |
- |
533 |
- if test "$solaris" = "no" ; then |
534 |
-@@ -1150,7 +1150,7 @@ |
535 |
- echo "sparse enabled $sparse" |
536 |
- echo "profiler $profiler" |
537 |
- echo "static build $static" |
538 |
--echo "-Werror enabled $werror" |
539 |
-+ |
540 |
- if test "$darwin" = "yes" ; then |
541 |
- echo "Cocoa support $cocoa" |
542 |
- fi |
543 |
-diff -ur xen-3.4.2.orig//tools/ioemu-qemu-xen/Makefile.target xen-3.4.2//tools/ioemu-qemu-xen/Makefile.target |
544 |
---- xen-3.4.2.orig//tools/ioemu-qemu-xen/Makefile.target 2011-09-25 02:33:23.946793064 +0800 |
545 |
-+++ xen-3.4.2//tools/ioemu-qemu-xen/Makefile.target 2011-09-25 02:34:11.584793042 +0800 |
546 |
-@@ -26,7 +26,7 @@ |
547 |
- TARGET_PATH=$(SRC_PATH)/target-$(TARGET_BASE_ARCH) |
548 |
- VPATH=$(SRC_PATH):$(TARGET_PATH):$(SRC_PATH)/hw |
549 |
- CPPFLAGS=-I. -I.. -I$(TARGET_PATH) -I$(SRC_PATH) -MMD -MT $@ -MP -DNEED_CPU_H |
550 |
--#CFLAGS+=-Werror |
551 |
-+#CFLAGS+= |
552 |
- LIBS= |
553 |
- # user emulator name |
554 |
- ifndef TARGET_ARCH2 |
555 |
-diff -ur xen-3.4.2.orig//tools/libaio/harness/Makefile xen-3.4.2//tools/libaio/harness/Makefile |
556 |
---- xen-3.4.2.orig//tools/libaio/harness/Makefile 2009-11-10 23:12:56.000000000 +0800 |
557 |
-+++ xen-3.4.2//tools/libaio/harness/Makefile 2011-09-25 02:34:11.674793042 +0800 |
558 |
-@@ -4,7 +4,7 @@ |
559 |
- HARNESS_SRCS:=main.c |
560 |
- # io_queue.c |
561 |
- |
562 |
--CFLAGS=-Wall -Werror -g -O -laio |
563 |
-+CFLAGS=-Wall -g -O -laio |
564 |
- #-lpthread -lrt |
565 |
- |
566 |
- all: $(PROGS) |
567 |
-diff -ur xen-3.4.2.orig//tools/libfsimage/Rules.mk xen-3.4.2//tools/libfsimage/Rules.mk |
568 |
---- xen-3.4.2.orig//tools/libfsimage/Rules.mk 2009-11-10 23:12:56.000000000 +0800 |
569 |
-+++ xen-3.4.2//tools/libfsimage/Rules.mk 2011-09-25 02:34:11.566793044 +0800 |
570 |
-@@ -1,6 +1,6 @@ |
571 |
- include $(XEN_ROOT)/tools/Rules.mk |
572 |
- |
573 |
--CFLAGS += -I$(XEN_ROOT)/tools/libfsimage/common/ -Werror |
574 |
-+CFLAGS += -I$(XEN_ROOT)/tools/libfsimage/common/ |
575 |
- LDFLAGS += -L../common/ |
576 |
- |
577 |
- PIC_OBJS := $(patsubst %.c,%.opic,$(LIB_SRCS-y)) |
578 |
-diff -ur xen-3.4.2.orig//tools/libxc/Makefile xen-3.4.2//tools/libxc/Makefile |
579 |
---- xen-3.4.2.orig//tools/libxc/Makefile 2011-09-25 02:33:23.987793064 +0800 |
580 |
-+++ xen-3.4.2//tools/libxc/Makefile 2011-09-25 02:34:11.687793042 +0800 |
581 |
-@@ -52,7 +52,7 @@ |
582 |
- |
583 |
- -include $(XEN_TARGET_ARCH)/Makefile |
584 |
- |
585 |
--CFLAGS += -Werror -Wmissing-prototypes |
586 |
-+CFLAGS += -Wmissing-prototypes |
587 |
- CFLAGS += $(INCLUDES) -I. -I../xenstore -I../include |
588 |
- |
589 |
- # Needed for posix_fadvise64() in xc_linux.c |
590 |
-diff -ur xen-3.4.2.orig//tools/libxen/Makefile.dist xen-3.4.2//tools/libxen/Makefile.dist |
591 |
---- xen-3.4.2.orig//tools/libxen/Makefile.dist 2009-11-10 23:12:56.000000000 +0800 |
592 |
-+++ xen-3.4.2//tools/libxen/Makefile.dist 2011-09-25 02:34:11.593793042 +0800 |
593 |
-@@ -22,7 +22,7 @@ |
594 |
- CFLAGS = -Iinclude \ |
595 |
- $(shell xml2-config --cflags) \ |
596 |
- $(shell curl-config --cflags) \ |
597 |
-- -W -Wall -Wmissing-prototypes -Werror -std=c99 -O2 -fPIC |
598 |
-+ -W -Wall -Wmissing-prototypes -std=c99 -O2 -fPIC |
599 |
- |
600 |
- LDFLAGS = $(shell xml2-config --libs) \ |
601 |
- $(shell curl-config --libs) |
602 |
-diff -ur xen-3.4.2.orig//tools/misc/lomount/Makefile xen-3.4.2//tools/misc/lomount/Makefile |
603 |
---- xen-3.4.2.orig//tools/misc/lomount/Makefile 2009-11-10 23:12:56.000000000 +0800 |
604 |
-+++ xen-3.4.2//tools/misc/lomount/Makefile 2011-09-25 02:34:11.666793042 +0800 |
605 |
-@@ -1,7 +1,7 @@ |
606 |
- XEN_ROOT=../../.. |
607 |
- include $(XEN_ROOT)/tools/Rules.mk |
608 |
- |
609 |
--CFLAGS += -Werror |
610 |
-+CFLAGS += |
611 |
- |
612 |
- HDRS = $(wildcard *.h) |
613 |
- OBJS = $(patsubst %.c,%.o,$(wildcard *.c)) |
614 |
-diff -ur xen-3.4.2.orig//tools/misc/Makefile xen-3.4.2//tools/misc/Makefile |
615 |
---- xen-3.4.2.orig//tools/misc/Makefile 2009-11-10 23:12:56.000000000 +0800 |
616 |
-+++ xen-3.4.2//tools/misc/Makefile 2011-09-25 02:34:11.669793042 +0800 |
617 |
-@@ -1,7 +1,7 @@ |
618 |
- XEN_ROOT=../.. |
619 |
- include $(XEN_ROOT)/tools/Rules.mk |
620 |
- |
621 |
--CFLAGS += -Werror |
622 |
-+CFLAGS += |
623 |
- |
624 |
- INCLUDES += -I $(XEN_XC) |
625 |
- INCLUDES += -I $(XEN_LIBXC) |
626 |
-diff -ur xen-3.4.2.orig//tools/pygrub/setup.py xen-3.4.2//tools/pygrub/setup.py |
627 |
---- xen-3.4.2.orig//tools/pygrub/setup.py 2009-11-10 23:12:56.000000000 +0800 |
628 |
-+++ xen-3.4.2//tools/pygrub/setup.py 2011-09-25 02:34:11.901793042 +0800 |
629 |
-@@ -3,7 +3,7 @@ |
630 |
- import os |
631 |
- import sys |
632 |
- |
633 |
--extra_compile_args = [ "-fno-strict-aliasing", "-Werror" ] |
634 |
-+extra_compile_args = [ "-fno-strict-aliasing" ] |
635 |
- |
636 |
- XEN_ROOT = "../.." |
637 |
- |
638 |
-diff -ur xen-3.4.2.orig//tools/python/setup.py xen-3.4.2//tools/python/setup.py |
639 |
---- xen-3.4.2.orig//tools/python/setup.py 2009-11-10 23:12:56.000000000 +0800 |
640 |
-+++ xen-3.4.2//tools/python/setup.py 2011-09-25 02:34:11.897793042 +0800 |
641 |
-@@ -4,7 +4,7 @@ |
642 |
- |
643 |
- XEN_ROOT = "../.." |
644 |
- |
645 |
--extra_compile_args = [ "-fno-strict-aliasing", "-Werror" ] |
646 |
-+extra_compile_args = [ "-fno-strict-aliasing" ] |
647 |
- |
648 |
- include_dirs = [ XEN_ROOT + "/tools/libxc", |
649 |
- XEN_ROOT + "/tools/xenstore", |
650 |
-diff -ur xen-3.4.2.orig//tools/security/Makefile xen-3.4.2//tools/security/Makefile |
651 |
---- xen-3.4.2.orig//tools/security/Makefile 2009-11-10 23:12:56.000000000 +0800 |
652 |
-+++ xen-3.4.2//tools/security/Makefile 2011-09-25 02:34:11.701793042 +0800 |
653 |
-@@ -1,7 +1,7 @@ |
654 |
- XEN_ROOT = ../.. |
655 |
- include $(XEN_ROOT)/tools/Rules.mk |
656 |
- |
657 |
--CFLAGS += -Werror |
658 |
-+CFLAGS += |
659 |
- CFLAGS += -fno-strict-aliasing |
660 |
- CFLAGS += -I. $(CFLAGS_libxenctrl) |
661 |
- |
662 |
-diff -ur xen-3.4.2.orig//tools/vnet/libxutil/Makefile xen-3.4.2//tools/vnet/libxutil/Makefile |
663 |
---- xen-3.4.2.orig//tools/vnet/libxutil/Makefile 2009-11-10 23:12:57.000000000 +0800 |
664 |
-+++ xen-3.4.2//tools/vnet/libxutil/Makefile 2011-09-25 02:34:11.694793042 +0800 |
665 |
-@@ -25,7 +25,7 @@ |
666 |
- PIC_OBJS := $(LIB_SRCS:.c=.opic) |
667 |
- |
668 |
- $(call cc-option-add,CFLAGS,CC,-fgnu89-inline) |
669 |
--CFLAGS += -Werror -fno-strict-aliasing |
670 |
-+CFLAGS += -fno-strict-aliasing |
671 |
- CFLAGS += -O3 |
672 |
- #CFLAGS += -g |
673 |
- |
674 |
-diff -ur xen-3.4.2.orig//tools/vtpm/Rules.mk xen-3.4.2//tools/vtpm/Rules.mk |
675 |
---- xen-3.4.2.orig//tools/vtpm/Rules.mk 2009-11-10 23:12:57.000000000 +0800 |
676 |
-+++ xen-3.4.2//tools/vtpm/Rules.mk 2011-09-25 02:34:11.563793044 +0800 |
677 |
-@@ -9,7 +9,7 @@ |
678 |
- TOOLS_INSTALL_DIR = $(DESTDIR)/usr/bin |
679 |
- |
680 |
- # General compiler flags |
681 |
--CFLAGS = -Werror -g3 -I. |
682 |
-+CFLAGS = -g3 -I. |
683 |
- |
684 |
- # Generic project files |
685 |
- HDRS = $(wildcard *.h) |
686 |
-diff -ur xen-3.4.2.orig//tools/vtpm_manager/Rules.mk xen-3.4.2//tools/vtpm_manager/Rules.mk |
687 |
---- xen-3.4.2.orig//tools/vtpm_manager/Rules.mk 2009-11-10 23:12:57.000000000 +0800 |
688 |
-+++ xen-3.4.2//tools/vtpm_manager/Rules.mk 2011-09-25 02:34:11.562793042 +0800 |
689 |
-@@ -9,7 +9,7 @@ |
690 |
- TOOLS_INSTALL_DIR = $(DESTDIR)/usr/bin |
691 |
- |
692 |
- # General compiler flags |
693 |
--CFLAGS = -Werror -g3 -I. |
694 |
-+CFLAGS = -g3 -I. |
695 |
- |
696 |
- # Generic project files |
697 |
- HDRS = $(wildcard *.h) |
698 |
-diff -ur xen-3.4.2.orig//tools/xcutils/Makefile xen-3.4.2//tools/xcutils/Makefile |
699 |
---- xen-3.4.2.orig//tools/xcutils/Makefile 2009-11-10 23:12:57.000000000 +0800 |
700 |
-+++ xen-3.4.2//tools/xcutils/Makefile 2011-09-25 02:34:11.636793042 +0800 |
701 |
-@@ -11,7 +11,7 @@ |
702 |
- XEN_ROOT = ../.. |
703 |
- include $(XEN_ROOT)/tools/Rules.mk |
704 |
- |
705 |
--CFLAGS += -Werror |
706 |
-+CFLAGS += |
707 |
- CFLAGS += $(CFLAGS_libxenctrl) $(CFLAGS_libxenguest) $(CFLAGS_libxenstore) |
708 |
- |
709 |
- PROGRAMS = xc_restore xc_save readnotes lsevtchn |
710 |
-diff -ur xen-3.4.2.orig//tools/xenmon/Makefile xen-3.4.2//tools/xenmon/Makefile |
711 |
---- xen-3.4.2.orig//tools/xenmon/Makefile 2009-11-10 23:12:57.000000000 +0800 |
712 |
-+++ xen-3.4.2//tools/xenmon/Makefile 2011-09-25 02:34:11.641793042 +0800 |
713 |
-@@ -13,7 +13,7 @@ |
714 |
- XEN_ROOT=../.. |
715 |
- include $(XEN_ROOT)/tools/Rules.mk |
716 |
- |
717 |
--CFLAGS += -Werror |
718 |
-+CFLAGS += |
719 |
- CFLAGS += -I $(XEN_XC) |
720 |
- CFLAGS += $(CFLAGS_libxenctrl) |
721 |
- LDFLAGS += $(LDFLAGS_libxenctrl) |
722 |
-diff -ur xen-3.4.2.orig//tools/xenpmd/Makefile xen-3.4.2//tools/xenpmd/Makefile |
723 |
---- xen-3.4.2.orig//tools/xenpmd/Makefile 2009-11-10 23:12:57.000000000 +0800 |
724 |
-+++ xen-3.4.2//tools/xenpmd/Makefile 2011-09-25 02:34:11.656793042 +0800 |
725 |
-@@ -1,7 +1,7 @@ |
726 |
- XEN_ROOT=../.. |
727 |
- include $(XEN_ROOT)/tools/Rules.mk |
728 |
- |
729 |
--CFLAGS += -Werror |
730 |
-+CFLAGS += |
731 |
- CFLAGS += $(CFLAGS_libxenstore) |
732 |
- LDFLAGS += $(LDFLAGS_libxenstore) |
733 |
- |
734 |
-diff -ur xen-3.4.2.orig//tools/xenstat/libxenstat/Makefile xen-3.4.2//tools/xenstat/libxenstat/Makefile |
735 |
---- xen-3.4.2.orig//tools/xenstat/libxenstat/Makefile 2009-11-10 23:12:57.000000000 +0800 |
736 |
-+++ xen-3.4.2//tools/xenstat/libxenstat/Makefile 2011-09-25 02:34:11.681793042 +0800 |
737 |
-@@ -34,7 +34,7 @@ |
738 |
- OBJECTS-$(CONFIG_NetBSD) += src/xenstat_netbsd.o |
739 |
- SONAME_FLAGS=-Wl,$(SONAME_LDFLAG) -Wl,libxenstat.so.$(MAJOR) |
740 |
- |
741 |
--WARN_FLAGS=-Wall -Werror |
742 |
-+WARN_FLAGS=-Wall |
743 |
- |
744 |
- CFLAGS+=-Isrc -I$(XEN_LIBXC) -I$(XEN_XENSTORE) -I$(XEN_INCLUDE) |
745 |
- LDFLAGS+=-Lsrc -L$(XEN_XENSTORE)/ -L$(XEN_LIBXC)/ |
746 |
-diff -ur xen-3.4.2.orig//tools/xenstat/xentop/Makefile xen-3.4.2//tools/xenstat/xentop/Makefile |
747 |
---- xen-3.4.2.orig//tools/xenstat/xentop/Makefile 2009-11-10 23:12:57.000000000 +0800 |
748 |
-+++ xen-3.4.2//tools/xenstat/xentop/Makefile 2011-09-25 02:34:11.684793042 +0800 |
749 |
-@@ -18,7 +18,7 @@ |
750 |
- all install xentop: |
751 |
- else |
752 |
- |
753 |
--CFLAGS += -DGCC_PRINTF -Wall -Werror -I$(XEN_LIBXENSTAT) |
754 |
-+CFLAGS += -DGCC_PRINTF -Wall -I$(XEN_LIBXENSTAT) |
755 |
- LDFLAGS += -L$(XEN_LIBXENSTAT) |
756 |
- LDLIBS += -lxenstat $(CURSES_LIBS) $(SOCKET_LIBS) |
757 |
- CFLAGS += -DHOST_$(XEN_OS) |
758 |
-diff -ur xen-3.4.2.orig//tools/xenstore/Makefile xen-3.4.2//tools/xenstore/Makefile |
759 |
---- xen-3.4.2.orig//tools/xenstore/Makefile 2009-11-10 23:12:57.000000000 +0800 |
760 |
-+++ xen-3.4.2//tools/xenstore/Makefile 2011-09-25 02:34:11.640793042 +0800 |
761 |
-@@ -4,7 +4,7 @@ |
762 |
- MAJOR = 3.0 |
763 |
- MINOR = 0 |
764 |
- |
765 |
--CFLAGS += -Werror |
766 |
-+CFLAGS += |
767 |
- CFLAGS += -I. |
768 |
- CFLAGS += $(CFLAGS_libxenctrl) |
769 |
- |
770 |
-diff -ur xen-3.4.2.orig//tools/xenstore/xenstored_core.c xen-3.4.2//tools/xenstore/xenstored_core.c |
771 |
---- xen-3.4.2.orig//tools/xenstore/xenstored_core.c 2009-11-10 23:12:57.000000000 +0800 |
772 |
-+++ xen-3.4.2//tools/xenstore/xenstored_core.c 2011-09-25 02:34:11.845793042 +0800 |
773 |
-@@ -865,7 +865,7 @@ |
774 |
- { |
775 |
- unsigned int offset, datalen; |
776 |
- struct node *node; |
777 |
-- char *vec[1] = { NULL }; /* gcc4 + -W + -Werror fucks code. */ |
778 |
-+ char *vec[1] = { NULL }; /* gcc4 + -W + fucks code. */ |
779 |
- char *name; |
780 |
- |
781 |
- /* Extra "strings" can be created by binary data. */ |
782 |
-diff -ur xen-3.4.2.orig//tools/xentrace/Makefile xen-3.4.2//tools/xentrace/Makefile |
783 |
---- xen-3.4.2.orig//tools/xentrace/Makefile 2009-11-10 23:12:57.000000000 +0800 |
784 |
-+++ xen-3.4.2//tools/xentrace/Makefile 2011-09-25 02:34:11.745793042 +0800 |
785 |
-@@ -1,7 +1,7 @@ |
786 |
- XEN_ROOT=../.. |
787 |
- include $(XEN_ROOT)/tools/Rules.mk |
788 |
- |
789 |
--CFLAGS += -Werror |
790 |
-+CFLAGS += |
791 |
- |
792 |
- CFLAGS += $(CFLAGS_libxenctrl) |
793 |
- LDFLAGS += $(LDFLAGS_libxenctrl) |
794 |
-Only in xen-3.4.2/: Werror.sh |
795 |
-diff -ur xen-3.4.2.orig//xen/arch/ia64/Rules.mk xen-3.4.2//xen/arch/ia64/Rules.mk |
796 |
---- xen-3.4.2.orig//xen/arch/ia64/Rules.mk 2009-11-10 23:12:57.000000000 +0800 |
797 |
-+++ xen-3.4.2//xen/arch/ia64/Rules.mk 2011-09-25 02:34:11.570793042 +0800 |
798 |
-@@ -68,7 +68,7 @@ |
799 |
- CFLAGS += -DCONFIG_XEN_IA64_TLBFLUSH_CLOCK |
800 |
- endif |
801 |
- ifeq ($(no_warns),y) |
802 |
--CFLAGS += -Wa,--fatal-warnings -Werror -Wno-uninitialized |
803 |
-+CFLAGS += -Wa,--fatal-warnings -Wno-uninitialized |
804 |
- endif |
805 |
- ifneq ($(vhpt_disable),y) |
806 |
- CFLAGS += -DVHPT_ENABLED=1 |
807 |
-diff -ur xen-3.4.2.orig//xen/arch/x86/boot/build32.mk xen-3.4.2//xen/arch/x86/boot/build32.mk |
808 |
---- xen-3.4.2.orig//xen/arch/x86/boot/build32.mk 2009-11-10 23:12:57.000000000 +0800 |
809 |
-+++ xen-3.4.2//xen/arch/x86/boot/build32.mk 2011-09-25 02:34:11.914793042 +0800 |
810 |
-@@ -8,7 +8,7 @@ |
811 |
- $(call cc-option-add,CFLAGS,CC,-fno-stack-protector) |
812 |
- $(call cc-option-add,CFLAGS,CC,-fno-stack-protector-all) |
813 |
- |
814 |
--CFLAGS += -Werror -fno-builtin -msoft-float |
815 |
-+CFLAGS += -fno-builtin -msoft-float |
816 |
- |
817 |
- # NB. awk invocation is a portable alternative to 'head -n -1' |
818 |
- %.S: %.bin |
819 |
-diff -ur xen-3.4.2.orig//xen/arch/x86/Rules.mk xen-3.4.2//xen/arch/x86/Rules.mk |
820 |
---- xen-3.4.2.orig//xen/arch/x86/Rules.mk 2009-11-10 23:12:57.000000000 +0800 |
821 |
-+++ xen-3.4.2//xen/arch/x86/Rules.mk 2011-09-25 02:34:11.572793042 +0800 |
822 |
-@@ -17,7 +17,7 @@ |
823 |
- endif |
824 |
- |
825 |
- CFLAGS += -fno-builtin -fno-common |
826 |
--CFLAGS += -iwithprefix include -Werror -Wno-pointer-arith -pipe |
827 |
-+CFLAGS += -iwithprefix include -Wno-pointer-arith -pipe |
828 |
- CFLAGS += -I$(BASEDIR)/include |
829 |
- CFLAGS += -I$(BASEDIR)/include/asm-x86/mach-generic |
830 |
- CFLAGS += -I$(BASEDIR)/include/asm-x86/mach-default |
831 |
\ No newline at end of file |
832 |
|
833 |
diff --git a/app-emulation/xen/files/xen-4.1.1-iommu_sec_fix.patch b/app-emulation/xen/files/xen-4.1.1-iommu_sec_fix.patch |
834 |
deleted file mode 100644 |
835 |
index 737c2bd..0000000 |
836 |
--- a/app-emulation/xen/files/xen-4.1.1-iommu_sec_fix.patch |
837 |
+++ /dev/null |
838 |
@@ -1,74 +0,0 @@ |
839 |
- |
840 |
-# HG changeset patch |
841 |
-# User Tim Deegan <Tim.Deegan@××××××.com> |
842 |
-# Date 1313145221 -3600 |
843 |
-# Node ID 84e3706df07a1963e23cd3875d8603917657d462 |
844 |
-# Parent cb22fa57ff252893b6adb1481e09b1287eacd990 |
845 |
-Passthrough: disable bus-mastering on any card that causes an IOMMU fault. |
846 |
- |
847 |
-This stops the card from raising back-to-back faults and live-locking |
848 |
-the CPU that handles them. |
849 |
- |
850 |
-Signed-off-by: Tim Deegan <tim@×××.org> |
851 |
-Acked-by: Wei Wang2 <wei.wang2@×××.com> |
852 |
-Acked-by: Allen M Kay <allen.m.kay@×××××.com> |
853 |
- |
854 |
-diff -r cb22fa57ff25 -r 84e3706df07a xen/drivers/passthrough/amd/iommu_init.c |
855 |
---- a/xen/drivers/passthrough/amd/iommu_init.c Mon Jul 25 16:48:39 2011 +0100 |
856 |
-+++ b/xen/drivers/passthrough/amd/iommu_init.c Fri Aug 12 11:33:41 2011 +0100 |
857 |
-@@ -462,7 +462,7 @@ |
858 |
- |
859 |
- static void parse_event_log_entry(u32 entry[]) |
860 |
- { |
861 |
-- u16 domain_id, device_id; |
862 |
-+ u16 domain_id, device_id, bdf, cword; |
863 |
- u32 code; |
864 |
- u64 *addr; |
865 |
- char * event_str[] = {"ILLEGAL_DEV_TABLE_ENTRY", |
866 |
-@@ -497,6 +497,18 @@ |
867 |
- "%s: domain = %d, device id = 0x%04x, " |
868 |
- "fault address = 0x%"PRIx64"\n", |
869 |
- event_str[code-1], domain_id, device_id, *addr); |
870 |
-+ |
871 |
-+ /* Tell the device to stop DMAing; we can't rely on the guest to |
872 |
-+ * control it for us. */ |
873 |
-+ for ( bdf = 0; bdf < ivrs_bdf_entries; bdf++ ) |
874 |
-+ if ( get_dma_requestor_id(bdf) == device_id ) |
875 |
-+ { |
876 |
-+ cword = pci_conf_read16(PCI_BUS(bdf), PCI_SLOT(bdf), |
877 |
-+ PCI_FUNC(bdf), PCI_COMMAND); |
878 |
-+ pci_conf_write16(PCI_BUS(bdf), PCI_SLOT(bdf), |
879 |
-+ PCI_FUNC(bdf), PCI_COMMAND, |
880 |
-+ cword & ~PCI_COMMAND_MASTER); |
881 |
-+ } |
882 |
- } |
883 |
- else |
884 |
- { |
885 |
-diff -r cb22fa57ff25 -r 84e3706df07a xen/drivers/passthrough/vtd/iommu.c |
886 |
---- a/xen/drivers/passthrough/vtd/iommu.c Mon Jul 25 16:48:39 2011 +0100 |
887 |
-+++ b/xen/drivers/passthrough/vtd/iommu.c Fri Aug 12 11:33:41 2011 +0100 |
888 |
-@@ -893,7 +893,7 @@ |
889 |
- while (1) |
890 |
- { |
891 |
- u8 fault_reason; |
892 |
-- u16 source_id; |
893 |
-+ u16 source_id, cword; |
894 |
- u32 data; |
895 |
- u64 guest_addr; |
896 |
- int type; |
897 |
-@@ -926,6 +926,14 @@ |
898 |
- iommu_page_fault_do_one(iommu, type, fault_reason, |
899 |
- source_id, guest_addr); |
900 |
- |
901 |
-+ /* Tell the device to stop DMAing; we can't rely on the guest to |
902 |
-+ * control it for us. */ |
903 |
-+ cword = pci_conf_read16(PCI_BUS(source_id), PCI_SLOT(source_id), |
904 |
-+ PCI_FUNC(source_id), PCI_COMMAND); |
905 |
-+ pci_conf_write16(PCI_BUS(source_id), PCI_SLOT(source_id), |
906 |
-+ PCI_FUNC(source_id), PCI_COMMAND, |
907 |
-+ cword & ~PCI_COMMAND_MASTER); |
908 |
-+ |
909 |
- fault_index++; |
910 |
- if ( fault_index > cap_num_fault_regs(iommu->cap) ) |
911 |
- fault_index = 0; |
912 |
- |
913 |
|
914 |
diff --git a/app-emulation/xen/metadata.xml b/app-emulation/xen/metadata.xml |
915 |
index 6550459..80411f0 100644 |
916 |
--- a/app-emulation/xen/metadata.xml |
917 |
+++ b/app-emulation/xen/metadata.xml |
918 |
@@ -7,7 +7,6 @@ |
919 |
<name>Ian Delaney aka idella4 proxy maintainer</name> |
920 |
</maintainer> |
921 |
<use> |
922 |
- <flag name='acm'>Enable the ACM/sHype XSM module from IBM</flag> |
923 |
<flag name='flask'>Enable the Flask XSM module from NSA</flag> |
924 |
<flag name='pae'>Enable support for PAE kernels (usually x86-32 with >4GB memory)</flag> |
925 |
<flag name='xsm'>Enable the Xen Security Modules (XSM)</flag> |
926 |
|
927 |
diff --git a/app-emulation/xen/xen-3.4.2-r4.ebuild b/app-emulation/xen/xen-3.4.2-r4.ebuild |
928 |
deleted file mode 100644 |
929 |
index 643ade2..0000000 |
930 |
--- a/app-emulation/xen/xen-3.4.2-r4.ebuild |
931 |
+++ /dev/null |
932 |
@@ -1,114 +0,0 @@ |
933 |
-# Copyright 1999-2011 Gentoo Foundation |
934 |
-# Distributed under the terms of the GNU General Public License v2 |
935 |
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen/xen-3.4.2-r4.ebuild,v 1.3 2011/10/15 19:38:16 hwoarang Exp $ |
936 |
- |
937 |
-EAPI=2 |
938 |
- |
939 |
-inherit mount-boot flag-o-matic toolchain-funcs base |
940 |
- |
941 |
-DESCRIPTION="The Xen virtual machine monitor" |
942 |
-HOMEPAGE="http://xen.org/" |
943 |
-SRC_URI="http://bits.xensource.com/oss-xen/release/${PV}/xen-${PV}.tar.gz" |
944 |
- |
945 |
-LICENSE="GPL-2" |
946 |
-SLOT="0" |
947 |
-KEYWORDS="amd64 x86" |
948 |
-IUSE="debug custom-cflags pae acm flask xsm" |
949 |
- |
950 |
-RDEPEND="|| ( sys-boot/grub |
951 |
- sys-boot/grub-static ) |
952 |
- >=sys-kernel/xen-sources-2.6.18" |
953 |
-PDEPEND="~app-emulation/xen-tools-${PV}" |
954 |
-PATCHES=( |
955 |
- "${FILESDIR}/"${PN}-3.3.0-unexported-target-fix.patch |
956 |
- "${FILESDIR}/"${P}-dump_registers-watchdog-fix.patch |
957 |
- "${FILESDIR}/"${P}-no-DMA.patch |
958 |
- "${FILESDIR}/"${P}-werror-idiocy.patch |
959 |
- "${FILESDIR}/"${P}-fix-__addr_ok-limit.patch |
960 |
- "${FILESDIR}/"${P}-CVE-2011-1583.patch |
961 |
-) |
962 |
- |
963 |
-RESTRICT="test" |
964 |
- |
965 |
-# Approved by QA team in bug #144032 |
966 |
-QA_WX_LOAD="boot/xen-syms-${PV}" |
967 |
- |
968 |
-pkg_setup() { |
969 |
- if [ -x "${S}/.config/" ]; then |
970 |
- die "You will need to remove ${S}/.config by hand" |
971 |
- fi |
972 |
- if [[ -z ${XEN_TARGET_ARCH} ]]; then |
973 |
- if use x86 && use amd64; then |
974 |
- die "Confusion! Both x86 and amd64 are set in your use flags!" |
975 |
- elif use x86; then |
976 |
- export XEN_TARGET_ARCH="x86_32" |
977 |
- elif use amd64; then |
978 |
- export XEN_TARGET_ARCH="x86_64" |
979 |
- else |
980 |
- die "Unsupported architecture!" |
981 |
- fi |
982 |
- fi |
983 |
- |
984 |
- if use xsm ; then |
985 |
- export "XSM_ENABLE=y" |
986 |
- use acm && export "ACM_SECURITY=y" |
987 |
- if use flask ; then |
988 |
- ! use acm && export "FLASK_ENABLE=y" |
989 |
- use acm && ewarn "Both acm and flask XSM specified, defaulting to acm." |
990 |
- fi |
991 |
- elif use acm || use flask ; then |
992 |
- ewarn "acm and flask require USE=xsm to be set, dropping use flags" |
993 |
- fi |
994 |
-} |
995 |
- |
996 |
-src_prepare() { |
997 |
- base_src_prepare |
998 |
- |
999 |
- # if the user *really* wants to use their own custom-cflags, let them |
1000 |
- if use custom-cflags; then |
1001 |
- einfo "User wants their own CFLAGS - removing defaults" |
1002 |
- # try and remove all the default custom-cflags |
1003 |
- find "${S}" -name Makefile -o -name Rules.mk -o -name Config.mk -exec sed \ |
1004 |
- -e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \ |
1005 |
- -e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \ |
1006 |
- -e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \ |
1007 |
- -e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \ |
1008 |
- -e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \ |
1009 |
- -i {} \; |
1010 |
- fi |
1011 |
-} |
1012 |
- |
1013 |
-src_compile() { |
1014 |
- local myopt |
1015 |
- use debug && myopt="${myopt} debug=y" |
1016 |
- use pae && myopt="${myopt} pae=y" |
1017 |
- |
1018 |
- if use custom-cflags; then |
1019 |
- filter-flags -fPIE -fstack-protector |
1020 |
- replace-flags -O3 -O2 |
1021 |
- else |
1022 |
- unset CFLAGS |
1023 |
- fi |
1024 |
- |
1025 |
- # Send raw LDFLAGS so that --as-needed works |
1026 |
- emake CC="$(tc-getCC)" LDFLAGS="$(raw-ldflags)" -C xen ${myopt} || die "compile failed" |
1027 |
-} |
1028 |
- |
1029 |
-src_install() { |
1030 |
- local myopt |
1031 |
- use debug && myopt="${myopt} debug=y" |
1032 |
- use pae && myopt="${myopt} pae=y" |
1033 |
- |
1034 |
- emake LDFLAGS="$(raw-ldflags)" DESTDIR="${D}" -C xen ${myopt} install || die "install failed" |
1035 |
-} |
1036 |
- |
1037 |
-pkg_postinst() { |
1038 |
- elog "Official Xen Guide and the unoffical wiki page:" |
1039 |
- elog " http://www.gentoo.org/doc/en/xen-guide.xml" |
1040 |
- elog " http://en.gentoo-wiki.com/wiki/Xen/" |
1041 |
- |
1042 |
- if use pae; then |
1043 |
- echo |
1044 |
- ewarn "This is a PAE build of Xen. It will *only* boot PAE kernels!" |
1045 |
- fi |
1046 |
-} |
1047 |
|
1048 |
diff --git a/app-emulation/xen/xen-4.1.1-r2.ebuild b/app-emulation/xen/xen-4.1.1-r2.ebuild |
1049 |
deleted file mode 100644 |
1050 |
index 4b3a74b..0000000 |
1051 |
--- a/app-emulation/xen/xen-4.1.1-r2.ebuild |
1052 |
+++ /dev/null |
1053 |
@@ -1,121 +0,0 @@ |
1054 |
-# Copyright 1999-2011 Gentoo Foundation |
1055 |
-# Distributed under the terms of the GNU General Public License v2 |
1056 |
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen/xen-4.1.1-r2.ebuild,v 1.7 2011/11/08 23:46:38 mr_bones_ Exp $ |
1057 |
- |
1058 |
-EAPI="4" |
1059 |
- |
1060 |
-if [[ $PV == *9999 ]]; then |
1061 |
- KEYWORDS="" |
1062 |
- REPO="xen-unstable.hg" |
1063 |
- EHG_REPO_URI="http://xenbits.xensource.com/${REPO}" |
1064 |
- S="${WORKDIR}/${REPO}" |
1065 |
- live_eclass="mercurial" |
1066 |
-else |
1067 |
- KEYWORDS="amd64 x86" |
1068 |
- SRC_URI="http://bits.xensource.com/oss-xen/release/${PV}/xen-${PV}.tar.gz" |
1069 |
-fi |
1070 |
- |
1071 |
-inherit mount-boot flag-o-matic toolchain-funcs ${live_eclass} |
1072 |
- |
1073 |
-DESCRIPTION="The Xen virtual machine monitor" |
1074 |
-HOMEPAGE="http://xen.org/" |
1075 |
- |
1076 |
-LICENSE="GPL-2" |
1077 |
-SLOT="0" |
1078 |
-IUSE="custom-cflags debug flask pae xsm" |
1079 |
- |
1080 |
-RDEPEND="|| ( sys-boot/grub |
1081 |
- sys-boot/grub-static )" |
1082 |
-PDEPEND="~app-emulation/xen-tools-${PV}" |
1083 |
- |
1084 |
-RESTRICT="test" |
1085 |
- |
1086 |
-# Approved by QA team in bug #144032 |
1087 |
-QA_WX_LOAD="boot/xen-syms-${PV}" |
1088 |
- |
1089 |
-REQUIRED_USE=" |
1090 |
- flask? ( xsm ) |
1091 |
- " |
1092 |
- |
1093 |
-pkg_setup() { |
1094 |
- if [[ -z ${XEN_TARGET_ARCH} ]]; then |
1095 |
- if use x86 && use amd64; then |
1096 |
- die "Confusion! Both x86 and amd64 are set in your use flags!" |
1097 |
- elif use x86; then |
1098 |
- export XEN_TARGET_ARCH="x86_32" |
1099 |
- elif use amd64; then |
1100 |
- export XEN_TARGET_ARCH="x86_64" |
1101 |
- else |
1102 |
- die "Unsupported architecture!" |
1103 |
- fi |
1104 |
- fi |
1105 |
- |
1106 |
- if use flask ; then |
1107 |
- export "XSM_ENABLE=y" |
1108 |
- export "FLASK_ENABLE=y" |
1109 |
- elif use xsm ; then |
1110 |
- export "XSM_ENABLE=y" |
1111 |
- fi |
1112 |
-} |
1113 |
- |
1114 |
-src_prepare() { |
1115 |
- # Drop .config |
1116 |
- sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop" |
1117 |
- # if the user *really* wants to use their own custom-cflags, let them |
1118 |
- if use custom-cflags; then |
1119 |
- einfo "User wants their own CFLAGS - removing defaults" |
1120 |
- # try and remove all the default custom-cflags |
1121 |
- find "${S}" -name Makefile -o -name Rules.mk -o -name Config.mk -exec sed \ |
1122 |
- -e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \ |
1123 |
- -e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \ |
1124 |
- -e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \ |
1125 |
- -e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \ |
1126 |
- -e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \ |
1127 |
- -i {} \; || die "failed to set custom-cflags" |
1128 |
- fi |
1129 |
- |
1130 |
- # remove -Werror for gcc-4.6's sake |
1131 |
- find "${S}" -name 'Makefile*' -o -name '*.mk' -o -name 'common.make' | \ |
1132 |
- xargs sed -i 's/ *-Werror */ /' || die "failed to remove -Werror" |
1133 |
- # not strictly necessary to fix this |
1134 |
- sed -i 's/, "-Werror"//' "${S}/tools/python/setup.py" || die "failed to remove -Werror on setup.py" |
1135 |
- |
1136 |
- # Add sccurity fix bug #379241 |
1137 |
- epatch "${FILESDIR}/${P}-iommu_sec_fix.patch" |
1138 |
-} |
1139 |
- |
1140 |
-src_configure() { |
1141 |
- use debug && myopt="${myopt} debug=y" |
1142 |
- use pae && myopt="${myopt} pae=y" |
1143 |
- |
1144 |
- if use custom-cflags; then |
1145 |
- filter-flags -fPIE -fstack-protector |
1146 |
- replace-flags -O3 -O2 |
1147 |
- else |
1148 |
- unset CFLAGS |
1149 |
- fi |
1150 |
-} |
1151 |
- |
1152 |
-src_compile() { |
1153 |
- # Send raw LDFLAGS so that --as-needed works |
1154 |
- emake CC="$(tc-getCC)" LDFLAGS="$(raw-ldflags)" LD="$(tc-getLD)" -C xen ${myopt} |
1155 |
-} |
1156 |
- |
1157 |
-src_install() { |
1158 |
- local myopt |
1159 |
- use debug && myopt="${myopt} debug=y" |
1160 |
- use pae && myopt="${myopt} pae=y" |
1161 |
- |
1162 |
- emake LDFLAGS="$(raw-ldflags)" DESTDIR="${D}" -C xen ${myopt} install |
1163 |
-} |
1164 |
- |
1165 |
-pkg_postinst() { |
1166 |
- elog "Official Xen Guide and the unoffical wiki page:" |
1167 |
- elog " http://www.gentoo.org/doc/en/xen-guide.xml" |
1168 |
- elog " http://en.gentoo-wiki.com/wiki/Xen/" |
1169 |
- |
1170 |
- if use pae; then |
1171 |
- echo |
1172 |
- ewarn "This is a PAE build of Xen. It will *only* boot PAE kernels!" |
1173 |
- fi |
1174 |
-} |