ia64/xen-unstable

view tools/hotplug/NetBSD/vif-bridge-nbsd @ 19731:01748ccc4da3

Intel VT-d: fix Stoakley boot issue with iommu=1

Signed-off-by: Weidong Han <Weidong.han@intel.com>
Signed-off-by: Allen Kay <allen.m.kay@intel.com>
author Keir Fraser <keir.fraser@citrix.com>
date Fri Jun 05 09:25:50 2009 +0100 (2009-06-05)
parents 4bfc67b09e9c
children 415505139333
line source
1 #!/bin/sh -e
3 # $NetBSD: vif-bridge-nbsd,v 1.1.1.1 2008/08/07 20:26:57 cegger Exp $
4 # Called by xenbackendd
5 # Usage: vif-bridge xsdir_backend_path state
7 PATH=/bin:/usr/bin:/sbin:/usr/sbin
8 export PATH
10 xpath=$1
11 xstatus=$2
13 case $xstatus in
14 6)
15 # device removed
16 xenstore-rm $xpath
17 exit 0
18 ;;
19 2)
20 xbridge=$(xenstore-read "$xpath/bridge")
21 xfid=$(xenstore-read "$xpath/frontend-id")
22 xhandle=$(xenstore-read "$xpath/handle")
23 iface=xvif$xfid.$xhandle
24 echo ifconfig $iface up
25 ifconfig $iface up
26 brconfig $xbridge add $iface
27 echo brconfig $xbridge add $iface
28 xenstore-write $xpath/hotplug-status connected
29 echo xenstore-write $xpath/hotplug-status connected
30 exit 0
31 ;;
32 *)
33 exit 0
34 ;;
35 esac