summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Shvetsov <alexxy@gentoo.org>2011-09-18 12:15:09 +0000
committerAlexey Shvetsov <alexxy@gentoo.org>2011-09-18 12:15:09 +0000
commitd4b9a2300d70a47a6f739bfda3a7c94c4c53b0ab (patch)
treec380b958be257bfb84a3909742bffcef3646ff71 /app-emulation/xen
parentDrop predefined cflags for debug useflag. Bug #383481 (diff)
downloadhistorical-d4b9a2300d70a47a6f739bfda3a7c94c4c53b0ab.tar.gz
historical-d4b9a2300d70a47a6f739bfda3a7c94c4c53b0ab.tar.bz2
historical-d4b9a2300d70a47a6f739bfda3a7c94c4c53b0ab.zip
[app-emulation/xen] Fix bug #379241
Package-Manager: portage-2.2.0_alpha58/cvs/Linux x86_64
Diffstat (limited to 'app-emulation/xen')
-rw-r--r--app-emulation/xen/ChangeLog8
-rw-r--r--app-emulation/xen/Manifest31
-rw-r--r--app-emulation/xen/files/xen-4.1.1-iommu_sec_fix.patch74
-rw-r--r--app-emulation/xen/xen-4.1.1-r2.ebuild (renamed from app-emulation/xen/xen-4.1.1-r1.ebuild)4
4 files changed, 100 insertions, 17 deletions
diff --git a/app-emulation/xen/ChangeLog b/app-emulation/xen/ChangeLog
index 4e20a8ffc9b0..19bfacd00d43 100644
--- a/app-emulation/xen/ChangeLog
+++ b/app-emulation/xen/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for app-emulation/xen
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen/ChangeLog,v 1.79 2011/09/11 14:48:15 alexxy Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen/ChangeLog,v 1.80 2011/09/18 12:15:08 alexxy Exp $
+
+*xen-4.1.1-r2 (18 Sep 2011)
+
+ 18 Sep 2011; Alexey Shvetsov <alexxy@gentoo.org> -xen-4.1.1-r1.ebuild,
+ +xen-4.1.1-r2.ebuild, +files/xen-4.1.1-iommu_sec_fix.patch:
+ Fix bug #379241
*xen-4.1.1-r1 (11 Sep 2011)
diff --git a/app-emulation/xen/Manifest b/app-emulation/xen/Manifest
index f5d3bd87f6b0..ef2e3367e8cf 100644
--- a/app-emulation/xen/Manifest
+++ b/app-emulation/xen/Manifest
@@ -3,27 +3,28 @@ Hash: SHA256
AUX xen-3.3.0-unexported-target-fix.patch 788 RMD160 4b30444c021479cbd3969493639533fc1e43e781 SHA1 9119f06b4a005c385ac27e085e2d96ccf9cd4dc9 SHA256 e46f5fbe4c579b84f895f0ac6e05589553a11305ca30e69405082d58abd9ee07
AUX xen-3.4.2-dump_registers-watchdog-fix.patch 533 RMD160 766249003d91cbec3b0014a8446e1a4d01cd847a SHA1 6306250671976c638f814a4958211af4bacb53b4 SHA256 17d18f268efd302085bdfa0673e2d9478e84206b6d060d0a63854441233a81c6
+AUX xen-4.1.1-iommu_sec_fix.patch 2851 RMD160 4367178c10cdc1e752f3e9ffb70f42e6e7179242 SHA1 8487f85dbf81bf245deaccca5ff5b8f46e60d112 SHA256 3a0ab3cb5c18db91f4be457cbba36189a558da7b794e1a35795f4fed3d48a7c8
DIST xen-3.4.2.tar.gz 11187726 RMD160 2ef81df1f44356d60e04e21df2173ce5357d8509 SHA1 3cd2cafacd52bbac2e2da1cfd846ee6260b43455 SHA256 d17c33136041cc8da69214ccf527fc48637bee7a9ab4d68a88ec50e6a9d20b0b
DIST xen-4.1.1.tar.gz 10355625 RMD160 4b3c0641b0f098889f627662aa6b8fea00c5b636 SHA1 f1b5ef4b663c339faf9c77fc895327cfbcc9776c SHA256 246289227507466b5da8b2d0da84a5b0e68a392527b16cde38898d0348890f5b
EBUILD xen-3.4.2-r1.ebuild 3058 RMD160 19a8baa3dbf87f4c5d4e5019f88ae4dc5ccc32e6 SHA1 aed8b48c47b8f713dbc17d67fa2d21c838f7f071 SHA256 719917cfbf0605d4951415d9f53c49262d92ba8e8921a3835aefcd549dd275bb
-EBUILD xen-4.1.1-r1.ebuild 2933 RMD160 19b81de584daa8ecc01796c4d963bfb177c73eb0 SHA1 e95d8d59e785e30fd56ef2007a3c173b720e0ab1 SHA256 98fc5c43100bed8a258f4e954c7e29a51f5c6956877991f8d4a924e756a73cdd
+EBUILD xen-4.1.1-r2.ebuild 3012 RMD160 7055789a3d10a477921485e1fd3a1500bca317a5 SHA1 7eab29e0157f06c46c530329b8acb4db53c3c061 SHA256 40fbd9ea0a51c0e72c7b53e5cbb85cdf9157687a1fdb3c6b34e29ad972b0c387
EBUILD xen-9999.ebuild 2929 RMD160 34b61aa566948357bed2bde59d06e38fdc21249c SHA1 5dfa8cebff2f2b9a10e40b888e151baf8afb804c SHA256 62f131e504a87ab2e05b1109325167ae9f6d9747ae90d89536d49734c7445f0e
-MISC ChangeLog 12650 RMD160 b6f963491a118e291f9313254496d4f5d2c0fb47 SHA1 b80d1bd61cd5efbbc1d85337c3bed82c2a114e1f SHA256 af90886b4c9ded1bb3a97f9fb7527e52bc0a519652ce178b75dde05303c0151b
+MISC ChangeLog 12833 RMD160 446a1d8cdd825f12e62b6119f3effea7a35513d6 SHA1 17f7c82dfea94d0fbce0abee46dbd35a4b317406 SHA256 ce714638aa70a3180c06ad02bdce7e3b0814c43ebabe55411e2a5fe9a768edf4
MISC metadata.xml 581 RMD160 d22ffb491d9dad33425b97add683dd6b8b9139e1 SHA1 649f65e9fd2ab25e32394c555a24fc0f6b59c37f SHA256 1cf2cc4bb5b5278ac75e74910607518ddd2bd6454f18325319ce1ac102fab535
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (GNU/Linux)
-iQIcBAEBCAAGBQJObMn/AAoJEOf+E+/4L5Lm+FcQAIpww+J9CWWh1la/0iKYmHm5
-l980PIvRsIOwD7quvstAuVBOqz9gk2J+HpasA2fPs1d/diK5RYePNgM24WQJL474
-kW7pJj2/8rII+iumXk1zzmTNf10VWL67juJ5djAh0JbyYNLCIy3H6tyR/I3HLJmT
-i7IvZNeck9chPvyNsIipg2iJDFrA/ik93BbG7OStc9/AQ+9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sjGt95pxjT83c3jIJO6Rp
+IpScDZe5uugRUSnEkDoFOoD8Q2O/ApdSS0U4gIfdAEIROrnsBKgjDoVNvyn3fvf9
+BXO3Uuw6rOh8ESFgK5Iys++Ti151Y3PTpH8FP04NlhELD9P36OdG8944X/nL9p9w
+86IpewGQSXzf3cXJz+p5
+=lrTB
-----END PGP SIGNATURE-----
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
new file mode 100644
index 000000000000..737c2bd777aa
--- /dev/null
+++ b/app-emulation/xen/files/xen-4.1.1-iommu_sec_fix.patch
@@ -0,0 +1,74 @@
+
+# HG changeset patch
+# User Tim Deegan <Tim.Deegan@citrix.com>
+# Date 1313145221 -3600
+# Node ID 84e3706df07a1963e23cd3875d8603917657d462
+# Parent cb22fa57ff252893b6adb1481e09b1287eacd990
+Passthrough: disable bus-mastering on any card that causes an IOMMU fault.
+
+This stops the card from raising back-to-back faults and live-locking
+the CPU that handles them.
+
+Signed-off-by: Tim Deegan <tim@xen.org>
+Acked-by: Wei Wang2 <wei.wang2@amd.com>
+Acked-by: Allen M Kay <allen.m.kay@intel.com>
+
+diff -r cb22fa57ff25 -r 84e3706df07a xen/drivers/passthrough/amd/iommu_init.c
+--- a/xen/drivers/passthrough/amd/iommu_init.c Mon Jul 25 16:48:39 2011 +0100
++++ b/xen/drivers/passthrough/amd/iommu_init.c Fri Aug 12 11:33:41 2011 +0100
+@@ -462,7 +462,7 @@
+
+ static void parse_event_log_entry(u32 entry[])
+ {
+- u16 domain_id, device_id;
++ u16 domain_id, device_id, bdf, cword;
+ u32 code;
+ u64 *addr;
+ char * event_str[] = {"ILLEGAL_DEV_TABLE_ENTRY",
+@@ -497,6 +497,18 @@
+ "%s: domain = %d, device id = 0x%04x, "
+ "fault address = 0x%"PRIx64"\n",
+ event_str[code-1], domain_id, device_id, *addr);
++
++ /* Tell the device to stop DMAing; we can't rely on the guest to
++ * control it for us. */
++ for ( bdf = 0; bdf < ivrs_bdf_entries; bdf++ )
++ if ( get_dma_requestor_id(bdf) == device_id )
++ {
++ cword = pci_conf_read16(PCI_BUS(bdf), PCI_SLOT(bdf),
++ PCI_FUNC(bdf), PCI_COMMAND);
++ pci_conf_write16(PCI_BUS(bdf), PCI_SLOT(bdf),
++ PCI_FUNC(bdf), PCI_COMMAND,
++ cword & ~PCI_COMMAND_MASTER);
++ }
+ }
+ else
+ {
+diff -r cb22fa57ff25 -r 84e3706df07a xen/drivers/passthrough/vtd/iommu.c
+--- a/xen/drivers/passthrough/vtd/iommu.c Mon Jul 25 16:48:39 2011 +0100
++++ b/xen/drivers/passthrough/vtd/iommu.c Fri Aug 12 11:33:41 2011 +0100
+@@ -893,7 +893,7 @@
+ while (1)
+ {
+ u8 fault_reason;
+- u16 source_id;
++ u16 source_id, cword;
+ u32 data;
+ u64 guest_addr;
+ int type;
+@@ -926,6 +926,14 @@
+ iommu_page_fault_do_one(iommu, type, fault_reason,
+ source_id, guest_addr);
+
++ /* Tell the device to stop DMAing; we can't rely on the guest to
++ * control it for us. */
++ cword = pci_conf_read16(PCI_BUS(source_id), PCI_SLOT(source_id),
++ PCI_FUNC(source_id), PCI_COMMAND);
++ pci_conf_write16(PCI_BUS(source_id), PCI_SLOT(source_id),
++ PCI_FUNC(source_id), PCI_COMMAND,
++ cword & ~PCI_COMMAND_MASTER);
++
+ fault_index++;
+ if ( fault_index > cap_num_fault_regs(iommu->cap) )
+ fault_index = 0;
+
diff --git a/app-emulation/xen/xen-4.1.1-r1.ebuild b/app-emulation/xen/xen-4.1.1-r2.ebuild
index 00bb1ad28940..d94f818b86f6 100644
--- a/app-emulation/xen/xen-4.1.1-r1.ebuild
+++ b/app-emulation/xen/xen-4.1.1-r2.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen/xen-4.1.1-r1.ebuild,v 1.1 2011/09/11 14:48:15 alexxy Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen/xen-4.1.1-r2.ebuild,v 1.1 2011/09/18 12:15:08 alexxy Exp $
EAPI="4"
@@ -73,6 +73,8 @@ src_prepare() {
-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
-i {} \;
fi
+ # Add sccurity fix bug #379241
+ epatch "${FILESDIR}/${P}-iommu_sec_fix.patch"
}
src_configure() {