debuggers.hg

view install.sh @ 20696:b543acc1aaad

iommu: Actually clear IO-APIC pins on boot and shutdown when used with an IOMMU

When booted with iommu=on, io_apic_read/write functions call into the
interrupt remapping code to update the IRTEs. Unfortunately, on boot
and shutdown, we really want clear_IO_APIC() to sanitize the actual
IOAPIC RTE, and not just the bits that are active when interrupt
remapping is enabled. This is particularly a problem on older
versions of Xen which used the IOAPIC RTE as the canonical source for
the IRTE index. In that case, clear_IO_APIC() actually causes
whatever happens to be stored in the RTEs to be used as an IRTE index,
which can come back and bite us in ioapic_guest_write() if we attempt
to remove an interrupt that didn't actually exist. Current upstream
appears less susceptible to errors since the IRTE index is stored in
an array, but it's still a good idea to sanitize the IOAPIC state.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Wed Dec 16 12:32:35 2009 +0000 (2009-12-16)
parents c964dd391c7d
children
line source
1 #!/bin/sh
3 src='./install'
4 if [ -d ./dist ]; then
5 src='./dist/install'
6 fi
8 if ! [ -d $src ]; then
9 echo "ERROR: Could not find a valid distribution directory."
10 echo " If this is a source-only release, try 'make dist'."
11 exit 1
12 fi
14 dst='/'
15 if [ $# -ne 0 ]; then
16 dst=$1
17 fi
19 if ! [ -d $dst ]; then
20 echo "ERROR: You must specify a valid install directory."
21 echo " The specified directory '$dst' is not valid."
22 exit 1
23 fi
25 tmp="`mktemp -d`"
27 echo "Installing Xen from '$src' to '$dst'..."
28 (cd $src; tar -cf - * ) | tar -C "$tmp" -xf -
30 [ -x "$(which udevinfo)" ] && \
31 UDEV_VERSION=$(udevinfo -V | sed -e 's/^[^0-9]* \([0-9]\{1,\}\)[^0-9]\{0,\}/\1/')
33 [ -z "$UDEV_VERSION" -a -x /sbin/udevadm ] && \
34 UDEV_VERSION=$(/sbin/udevadm info -V | awk '{print $NF}')
36 if [ -n "$UDEV_VERSION" ] && [ $UDEV_VERSION -ge 059 ]; then
37 echo " - installing for udev-based system"
38 rm -rf "$tmp/etc/hotplug"
39 else
40 echo " - installing for hotplug-based system"
41 rm -rf "$tmp/etc/udev"
42 fi
44 echo " - modifying permissions"
45 chmod -R a+rX "$tmp"
47 (cd $tmp; tar -cf - *) | tar --no-same-owner -C "$dst" -xf -
48 rm -rf "$tmp"
50 echo "All done."
52 echo "Checking to see whether prerequisite tools are installed..."
53 cd $src/../check
54 ./chk install
55 echo "All done."
57 exit 0