direct-io.hg
changeset 2327:9afec5bc14ae semistable
bitkeeper revision 1.1159.1.94 (412723d6gmOYtgyWHkWx2fG6l1ywZA)
Merge ssh://xenbk@gandalf.hpl.hp.com//var/bk/xeno-unstable.bk
into labyrinth.cl.cam.ac.uk:/auto/anfs/scratch/labyrinth/iap10/xeno-clone/xeno.bk
Merge ssh://xenbk@gandalf.hpl.hp.com//var/bk/xeno-unstable.bk
into labyrinth.cl.cam.ac.uk:/auto/anfs/scratch/labyrinth/iap10/xeno-clone/xeno.bk
line diff
1.1 --- a/.rootkeys Fri Aug 20 09:40:30 2004 +0000 1.2 +++ b/.rootkeys Sat Aug 21 10:28:38 2004 +0000 1.3 @@ -172,6 +172,7 @@ 4110f478aeQWllIN7J4kouAHiAqrPw linux-2.6 1.4 40f56239sFcjHiIRmnObRIDF-zaeKQ linux-2.6.7-xen-sparse/arch/xen/kernel/process.c 1.5 40f562392LBhwmOxVPsYdkYXMxI_ZQ linux-2.6.7-xen-sparse/arch/xen/kernel/reboot.c 1.6 3f68905c5eiA-lBMQSvXLMWS1ikDEA linux-2.6.7-xen-sparse/arch/xen/kernel/xen_proc.c 1.7 +41261688yS8eAyy-7kzG4KBs0xbYCA linux-2.6.7-xen-sparse/drivers/Makefile 1.8 4108f5c1WfTIrs0HZFeV39sttekCTw linux-2.6.7-xen-sparse/drivers/char/mem.c 1.9 4111308bZAIzwf_Kzu6x1TZYZ3E0_Q linux-2.6.7-xen-sparse/drivers/char/tty_io.c 1.10 40f56239Dp_vMTgz8TEbvo1hjHGc3w linux-2.6.7-xen-sparse/drivers/xen/Makefile 1.11 @@ -571,6 +572,7 @@ 3e6377e4i0c9GtKN65e99OtRbw3AZw xen/commo 1.12 3ddb79bdYO5D8Av12NHqPeSviav7cg xen/common/domain.c 1.13 40f2b4a27xPOh3R6zD4M_aabz-TDyg xen/common/elf.c 1.14 3fba5b96H0khoxNiKbjdi0inpXV-Pw xen/common/event_channel.c 1.15 +41262590gGIOn-1pvF5KpUu8Wb6_JA xen/common/grant_table.c 1.16 3ddb79bd9drcFPVxd4w2GPOIjLlXpA xen/common/kernel.c 1.17 3e4cd9d8LAAghUY0hNIK72uc2ch_Nw xen/common/keyhandler.c 1.18 3ddb79bduhSEZI8xa7IbGQCpap5y2A xen/common/lib.c 1.19 @@ -719,6 +721,7 @@ 3ddb79c05DdHQ0UxX_jKsXdR4QlMCA xen/inclu 1.20 3ddb79c2O729EttZTYu1c8LcsUO_GQ xen/include/xen/elf.h 1.21 3ddb79c0HIghfBF8zFUdmXhOU8i6hA xen/include/xen/errno.h 1.22 3ddb79c1W0lQca8gRV7sN6j3iY4Luw xen/include/xen/event.h 1.23 +41262590CyJy4vd42dnqzsn8-eeGvw xen/include/xen/grant_table.h 1.24 3ddb79c0GurNF9tDWqQbAwJFH8ugfA xen/include/xen/init.h 1.25 3ddb79c1nzaWu8NoF4xCCMSFJR4MlA xen/include/xen/ioport.h 1.26 3ddb79c2qAxCOABlkKtD8Txohe-qEw xen/include/xen/irq.h
2.1 --- a/linux-2.6.7-xen-sparse/arch/xen/Kconfig.drivers Fri Aug 20 09:40:30 2004 +0000 2.2 +++ b/linux-2.6.7-xen-sparse/arch/xen/Kconfig.drivers Sat Aug 21 10:28:38 2004 +0000 2.3 @@ -4,12 +4,15 @@ menu "Device Drivers" 2.4 2.5 source "drivers/base/Kconfig" 2.6 2.7 +source "drivers/scsi/Kconfig" 2.8 +source "drivers/block/Kconfig" 2.9 +source "drivers/md/Kconfig" 2.10 + 2.11 +# Always include scsi and block to enable iscsi, loop0 etc. 2.12 + 2.13 if XEN_PHYSDEV_ACCESS 2.14 -source "drivers/block/Kconfig" 2.15 source "drivers/ide/Kconfig" 2.16 -source "drivers/scsi/Kconfig" 2.17 source "drivers/cdrom/Kconfig" 2.18 -source "drivers/md/Kconfig" 2.19 endif 2.20 2.21 source "net/Kconfig"
3.1 --- a/linux-2.6.7-xen-sparse/arch/xen/Makefile Fri Aug 20 09:40:30 2004 +0000 3.2 +++ b/linux-2.6.7-xen-sparse/arch/xen/Makefile Sat Aug 21 10:28:38 2004 +0000 3.3 @@ -24,8 +24,6 @@ UTS_MACHINE := $(XENARCH) 3.4 3.5 core-y += arch/xen/kernel/ 3.6 3.7 -drivers-y += drivers/xen/ 3.8 - 3.9 include/.asm-ignore: 3.10 @rm -f include/.asm-ignore 3.11 @mv include/asm include/.asm-ignore
4.1 --- a/linux-2.6.7-xen-sparse/arch/xen/configs/xen0_defconfig Fri Aug 20 09:40:30 2004 +0000 4.2 +++ b/linux-2.6.7-xen-sparse/arch/xen/configs/xen0_defconfig Sat Aug 21 10:28:38 2004 +0000 4.3 @@ -10,6 +10,7 @@ CONFIG_NO_IDLE_HZ=y 4.4 # 4.5 CONFIG_XEN_PRIVILEGED_GUEST=y 4.6 CONFIG_XEN_PHYSDEV_ACCESS=y 4.7 +# CONFIG_XEN_WRITABLE_PAGETABLES is not set 4.8 CONFIG_FOREIGN_PAGES=y 4.9 CONFIG_PAGESIZED_SKBS=y 4.10 CONFIG_X86=y 4.11 @@ -34,10 +35,11 @@ CONFIG_SYSVIPC=y 4.12 CONFIG_SYSCTL=y 4.13 # CONFIG_AUDIT is not set 4.14 CONFIG_LOG_BUF_SHIFT=14 4.15 -# CONFIG_HOTPLUG is not set 4.16 +CONFIG_HOTPLUG=y 4.17 # CONFIG_IKCONFIG is not set 4.18 # CONFIG_EMBEDDED is not set 4.19 CONFIG_KALLSYMS=y 4.20 +# CONFIG_KALLSYMS_ALL is not set 4.21 CONFIG_FUTEX=y 4.22 CONFIG_EPOLL=y 4.23 CONFIG_IOSCHED_NOOP=y 4.24 @@ -63,11 +65,6 @@ CONFIG_XENARCH="i386" 4.25 CONFIG_MMU=y 4.26 CONFIG_UID16=y 4.27 CONFIG_GENERIC_ISA_DMA=y 4.28 -# CONFIG_M386 is not set 4.29 -# CONFIG_M486 is not set 4.30 -# CONFIG_M586 is not set 4.31 -# CONFIG_M586TSC is not set 4.32 -# CONFIG_M586MMX is not set 4.33 # CONFIG_M686 is not set 4.34 # CONFIG_MPENTIUMII is not set 4.35 # CONFIG_MPENTIUMIII is not set 4.36 @@ -77,9 +74,6 @@ CONFIG_MPENTIUM4=y 4.37 # CONFIG_MK7 is not set 4.38 # CONFIG_MK8 is not set 4.39 # CONFIG_MCRUSOE is not set 4.40 -# CONFIG_MWINCHIPC6 is not set 4.41 -# CONFIG_MWINCHIP2 is not set 4.42 -# CONFIG_MWINCHIP3D is not set 4.43 # CONFIG_MCYRIXIII is not set 4.44 # CONFIG_MVIAC3_2 is not set 4.45 # CONFIG_X86_GENERIC is not set 4.46 @@ -106,7 +100,6 @@ CONFIG_X86_CPUID=y 4.47 # CONFIG_EDD is not set 4.48 CONFIG_NOHIGHMEM=y 4.49 # CONFIG_HIGHMEM4G is not set 4.50 -# CONFIG_HIGHMEM64G is not set 4.51 CONFIG_HAVE_DEC_LOCK=y 4.52 # CONFIG_REGPARM is not set 4.53 4.54 @@ -127,10 +120,34 @@ CONFIG_ISA=y 4.55 # CONFIG_SCx200 is not set 4.56 4.57 # 4.58 +# PCMCIA/CardBus support 4.59 +# 4.60 +CONFIG_PCMCIA=m 4.61 +# CONFIG_PCMCIA_DEBUG is not set 4.62 +CONFIG_YENTA=m 4.63 +CONFIG_CARDBUS=y 4.64 +# CONFIG_I82092 is not set 4.65 +# CONFIG_I82365 is not set 4.66 +# CONFIG_TCIC is not set 4.67 +CONFIG_PCMCIA_PROBE=y 4.68 + 4.69 +# 4.70 +# PCI Hotplug Support 4.71 +# 4.72 +# CONFIG_HOTPLUG_PCI is not set 4.73 + 4.74 +# 4.75 # Kernel hacking 4.76 # 4.77 -# CONFIG_DEBUG_KERNEL is not set 4.78 +CONFIG_DEBUG_KERNEL=y 4.79 CONFIG_EARLY_PRINTK=y 4.80 +# CONFIG_DEBUG_STACKOVERFLOW is not set 4.81 +# CONFIG_DEBUG_STACK_USAGE is not set 4.82 +# CONFIG_DEBUG_SLAB is not set 4.83 +CONFIG_MAGIC_SYSRQ=y 4.84 +# CONFIG_DEBUG_SPINLOCK is not set 4.85 +# CONFIG_DEBUG_PAGEALLOC is not set 4.86 +# CONFIG_DEBUG_INFO is not set 4.87 # CONFIG_DEBUG_SPINLOCK_SLEEP is not set 4.88 # CONFIG_FRAME_POINTER is not set 4.89 # CONFIG_4KSTACKS is not set 4.90 @@ -152,88 +169,8 @@ CONFIG_BINFMT_ELF=y 4.91 # 4.92 # Generic Driver Options 4.93 # 4.94 - 4.95 -# 4.96 -# Block devices 4.97 -# 4.98 -# CONFIG_BLK_DEV_FD is not set 4.99 -# CONFIG_BLK_DEV_XD is not set 4.100 -# CONFIG_BLK_CPQ_DA is not set 4.101 -# CONFIG_BLK_CPQ_CISS_DA is not set 4.102 -# CONFIG_BLK_DEV_DAC960 is not set 4.103 -# CONFIG_BLK_DEV_UMEM is not set 4.104 -CONFIG_BLK_DEV_LOOP=y 4.105 -# CONFIG_BLK_DEV_CRYPTOLOOP is not set 4.106 -# CONFIG_BLK_DEV_NBD is not set 4.107 -# CONFIG_BLK_DEV_CARMEL is not set 4.108 -CONFIG_BLK_DEV_RAM=y 4.109 -CONFIG_BLK_DEV_RAM_SIZE=4096 4.110 -# CONFIG_BLK_DEV_INITRD is not set 4.111 -# CONFIG_LBD is not set 4.112 - 4.113 -# 4.114 -# ATA/ATAPI/MFM/RLL support 4.115 -# 4.116 -CONFIG_IDE=y 4.117 -CONFIG_BLK_DEV_IDE=y 4.118 - 4.119 -# 4.120 -# Please see Documentation/ide.txt for help/info on IDE drives 4.121 -# 4.122 -# CONFIG_BLK_DEV_HD_IDE is not set 4.123 -CONFIG_BLK_DEV_IDEDISK=y 4.124 -# CONFIG_IDEDISK_MULTI_MODE is not set 4.125 -CONFIG_BLK_DEV_IDECD=y 4.126 -# CONFIG_BLK_DEV_IDETAPE is not set 4.127 -# CONFIG_BLK_DEV_IDEFLOPPY is not set 4.128 -# CONFIG_BLK_DEV_IDESCSI is not set 4.129 -# CONFIG_IDE_TASK_IOCTL is not set 4.130 -# CONFIG_IDE_TASKFILE_IO is not set 4.131 - 4.132 -# 4.133 -# IDE chipset support/bugfixes 4.134 -# 4.135 -CONFIG_IDE_GENERIC=y 4.136 -# CONFIG_BLK_DEV_CMD640 is not set 4.137 -CONFIG_BLK_DEV_IDEPCI=y 4.138 -# CONFIG_IDEPCI_SHARE_IRQ is not set 4.139 -# CONFIG_BLK_DEV_OFFBOARD is not set 4.140 -CONFIG_BLK_DEV_GENERIC=y 4.141 -# CONFIG_BLK_DEV_OPTI621 is not set 4.142 -# CONFIG_BLK_DEV_RZ1000 is not set 4.143 -CONFIG_BLK_DEV_IDEDMA_PCI=y 4.144 -# CONFIG_BLK_DEV_IDEDMA_FORCED is not set 4.145 -CONFIG_IDEDMA_PCI_AUTO=y 4.146 -# CONFIG_IDEDMA_ONLYDISK is not set 4.147 -CONFIG_BLK_DEV_ADMA=y 4.148 -# CONFIG_BLK_DEV_AEC62XX is not set 4.149 -# CONFIG_BLK_DEV_ALI15X3 is not set 4.150 -# CONFIG_BLK_DEV_AMD74XX is not set 4.151 -# CONFIG_BLK_DEV_ATIIXP is not set 4.152 -# CONFIG_BLK_DEV_CMD64X is not set 4.153 -# CONFIG_BLK_DEV_TRIFLEX is not set 4.154 -# CONFIG_BLK_DEV_CY82C693 is not set 4.155 -# CONFIG_BLK_DEV_CS5520 is not set 4.156 -# CONFIG_BLK_DEV_CS5530 is not set 4.157 -# CONFIG_BLK_DEV_HPT34X is not set 4.158 -# CONFIG_BLK_DEV_HPT366 is not set 4.159 -# CONFIG_BLK_DEV_SC1200 is not set 4.160 -CONFIG_BLK_DEV_PIIX=y 4.161 -# CONFIG_BLK_DEV_NS87415 is not set 4.162 -# CONFIG_BLK_DEV_PDC202XX_OLD is not set 4.163 -# CONFIG_BLK_DEV_PDC202XX_NEW is not set 4.164 -CONFIG_BLK_DEV_SVWKS=y 4.165 -# CONFIG_BLK_DEV_SIIMAGE is not set 4.166 -# CONFIG_BLK_DEV_SIS5513 is not set 4.167 -# CONFIG_BLK_DEV_SLC90E66 is not set 4.168 -# CONFIG_BLK_DEV_TRM290 is not set 4.169 -# CONFIG_BLK_DEV_VIA82CXXX is not set 4.170 -# CONFIG_IDE_ARM is not set 4.171 -# CONFIG_IDE_CHIPSETS is not set 4.172 -CONFIG_BLK_DEV_IDEDMA=y 4.173 -# CONFIG_IDEDMA_IVB is not set 4.174 -CONFIG_IDEDMA_AUTO=y 4.175 -# CONFIG_BLK_DEV_HD is not set 4.176 +# CONFIG_FW_LOADER is not set 4.177 +# CONFIG_DEBUG_DRIVER is not set 4.178 4.179 # 4.180 # SCSI device support 4.181 @@ -344,14 +281,115 @@ CONFIG_SCSI_QLA2XXX=y 4.182 # CONFIG_SCSI_DEBUG is not set 4.183 4.184 # 4.185 -# Old CD-ROM drivers (not SCSI, not IDE) 4.186 +# PCMCIA SCSI adapter support 4.187 +# 4.188 +# CONFIG_PCMCIA_AHA152X is not set 4.189 +# CONFIG_PCMCIA_FDOMAIN is not set 4.190 +# CONFIG_PCMCIA_NINJA_SCSI is not set 4.191 +# CONFIG_PCMCIA_QLOGIC is not set 4.192 +# CONFIG_PCMCIA_SYM53C500 is not set 4.193 + 4.194 +# 4.195 +# Block devices 4.196 # 4.197 -# CONFIG_CD_NO_IDESCSI is not set 4.198 +# CONFIG_BLK_DEV_FD is not set 4.199 +# CONFIG_BLK_DEV_XD is not set 4.200 +# CONFIG_BLK_CPQ_DA is not set 4.201 +# CONFIG_BLK_CPQ_CISS_DA is not set 4.202 +# CONFIG_BLK_DEV_DAC960 is not set 4.203 +# CONFIG_BLK_DEV_UMEM is not set 4.204 +CONFIG_BLK_DEV_LOOP=y 4.205 +# CONFIG_BLK_DEV_CRYPTOLOOP is not set 4.206 +CONFIG_BLK_DEV_NBD=y 4.207 +# CONFIG_BLK_DEV_CARMEL is not set 4.208 +CONFIG_BLK_DEV_RAM=y 4.209 +CONFIG_BLK_DEV_RAM_SIZE=4096 4.210 +CONFIG_BLK_DEV_INITRD=y 4.211 +# CONFIG_LBD is not set 4.212 4.213 # 4.214 # Multi-device support (RAID and LVM) 4.215 # 4.216 -# CONFIG_MD is not set 4.217 +CONFIG_MD=y 4.218 +CONFIG_BLK_DEV_MD=m 4.219 +# CONFIG_MD_LINEAR is not set 4.220 +CONFIG_MD_RAID0=m 4.221 +CONFIG_MD_RAID1=m 4.222 +# CONFIG_MD_RAID5 is not set 4.223 +# CONFIG_MD_RAID6 is not set 4.224 +# CONFIG_MD_MULTIPATH is not set 4.225 +CONFIG_BLK_DEV_DM=y 4.226 +# CONFIG_DM_CRYPT is not set 4.227 + 4.228 +# 4.229 +# ATA/ATAPI/MFM/RLL support 4.230 +# 4.231 +CONFIG_IDE=y 4.232 +CONFIG_BLK_DEV_IDE=y 4.233 + 4.234 +# 4.235 +# Please see Documentation/ide.txt for help/info on IDE drives 4.236 +# 4.237 +# CONFIG_BLK_DEV_HD_IDE is not set 4.238 +CONFIG_BLK_DEV_IDEDISK=y 4.239 +# CONFIG_IDEDISK_MULTI_MODE is not set 4.240 +# CONFIG_BLK_DEV_IDECS is not set 4.241 +CONFIG_BLK_DEV_IDECD=y 4.242 +# CONFIG_BLK_DEV_IDETAPE is not set 4.243 +# CONFIG_BLK_DEV_IDEFLOPPY is not set 4.244 +# CONFIG_BLK_DEV_IDESCSI is not set 4.245 +# CONFIG_IDE_TASK_IOCTL is not set 4.246 +# CONFIG_IDE_TASKFILE_IO is not set 4.247 + 4.248 +# 4.249 +# IDE chipset support/bugfixes 4.250 +# 4.251 +CONFIG_IDE_GENERIC=y 4.252 +# CONFIG_BLK_DEV_CMD640 is not set 4.253 +CONFIG_BLK_DEV_IDEPCI=y 4.254 +# CONFIG_IDEPCI_SHARE_IRQ is not set 4.255 +# CONFIG_BLK_DEV_OFFBOARD is not set 4.256 +CONFIG_BLK_DEV_GENERIC=y 4.257 +# CONFIG_BLK_DEV_OPTI621 is not set 4.258 +# CONFIG_BLK_DEV_RZ1000 is not set 4.259 +CONFIG_BLK_DEV_IDEDMA_PCI=y 4.260 +# CONFIG_BLK_DEV_IDEDMA_FORCED is not set 4.261 +CONFIG_IDEDMA_PCI_AUTO=y 4.262 +# CONFIG_IDEDMA_ONLYDISK is not set 4.263 +CONFIG_BLK_DEV_ADMA=y 4.264 +# CONFIG_BLK_DEV_AEC62XX is not set 4.265 +# CONFIG_BLK_DEV_ALI15X3 is not set 4.266 +# CONFIG_BLK_DEV_AMD74XX is not set 4.267 +# CONFIG_BLK_DEV_ATIIXP is not set 4.268 +# CONFIG_BLK_DEV_CMD64X is not set 4.269 +# CONFIG_BLK_DEV_TRIFLEX is not set 4.270 +# CONFIG_BLK_DEV_CY82C693 is not set 4.271 +# CONFIG_BLK_DEV_CS5520 is not set 4.272 +# CONFIG_BLK_DEV_CS5530 is not set 4.273 +# CONFIG_BLK_DEV_HPT34X is not set 4.274 +# CONFIG_BLK_DEV_HPT366 is not set 4.275 +# CONFIG_BLK_DEV_SC1200 is not set 4.276 +CONFIG_BLK_DEV_PIIX=y 4.277 +# CONFIG_BLK_DEV_NS87415 is not set 4.278 +# CONFIG_BLK_DEV_PDC202XX_OLD is not set 4.279 +# CONFIG_BLK_DEV_PDC202XX_NEW is not set 4.280 +CONFIG_BLK_DEV_SVWKS=y 4.281 +# CONFIG_BLK_DEV_SIIMAGE is not set 4.282 +# CONFIG_BLK_DEV_SIS5513 is not set 4.283 +# CONFIG_BLK_DEV_SLC90E66 is not set 4.284 +# CONFIG_BLK_DEV_TRM290 is not set 4.285 +# CONFIG_BLK_DEV_VIA82CXXX is not set 4.286 +# CONFIG_IDE_ARM is not set 4.287 +# CONFIG_IDE_CHIPSETS is not set 4.288 +CONFIG_BLK_DEV_IDEDMA=y 4.289 +# CONFIG_IDEDMA_IVB is not set 4.290 +CONFIG_IDEDMA_AUTO=y 4.291 +# CONFIG_BLK_DEV_HD is not set 4.292 + 4.293 +# 4.294 +# Old CD-ROM drivers (not SCSI, not IDE) 4.295 +# 4.296 +# CONFIG_CD_NO_IDESCSI is not set 4.297 4.298 # 4.299 # Networking support 4.300 @@ -370,7 +408,7 @@ CONFIG_INET=y 4.301 # CONFIG_IP_MULTICAST is not set 4.302 # CONFIG_IP_ADVANCED_ROUTER is not set 4.303 CONFIG_IP_PNP=y 4.304 -# CONFIG_IP_PNP_DHCP is not set 4.305 +CONFIG_IP_PNP_DHCP=y 4.306 # CONFIG_IP_PNP_BOOTP is not set 4.307 # CONFIG_IP_PNP_RARP is not set 4.308 # CONFIG_NET_IPIP is not set 4.309 @@ -380,8 +418,60 @@ CONFIG_IP_PNP=y 4.310 # CONFIG_INET_AH is not set 4.311 # CONFIG_INET_ESP is not set 4.312 # CONFIG_INET_IPCOMP is not set 4.313 + 4.314 +# 4.315 +# IP: Virtual Server Configuration 4.316 +# 4.317 +# CONFIG_IP_VS is not set 4.318 # CONFIG_IPV6 is not set 4.319 -# CONFIG_NETFILTER is not set 4.320 +CONFIG_NETFILTER=y 4.321 +# CONFIG_NETFILTER_DEBUG is not set 4.322 +CONFIG_BRIDGE_NETFILTER=y 4.323 + 4.324 +# 4.325 +# IP: Netfilter Configuration 4.326 +# 4.327 +CONFIG_IP_NF_CONNTRACK=m 4.328 +CONFIG_IP_NF_FTP=m 4.329 +# CONFIG_IP_NF_IRC is not set 4.330 +# CONFIG_IP_NF_TFTP is not set 4.331 +# CONFIG_IP_NF_AMANDA is not set 4.332 +# CONFIG_IP_NF_QUEUE is not set 4.333 +CONFIG_IP_NF_IPTABLES=m 4.334 +# CONFIG_IP_NF_MATCH_LIMIT is not set 4.335 +# CONFIG_IP_NF_MATCH_IPRANGE is not set 4.336 +# CONFIG_IP_NF_MATCH_MAC is not set 4.337 +# CONFIG_IP_NF_MATCH_PKTTYPE is not set 4.338 +# CONFIG_IP_NF_MATCH_MARK is not set 4.339 +# CONFIG_IP_NF_MATCH_MULTIPORT is not set 4.340 +# CONFIG_IP_NF_MATCH_TOS is not set 4.341 +# CONFIG_IP_NF_MATCH_RECENT is not set 4.342 +# CONFIG_IP_NF_MATCH_ECN is not set 4.343 +# CONFIG_IP_NF_MATCH_DSCP is not set 4.344 +# CONFIG_IP_NF_MATCH_AH_ESP is not set 4.345 +# CONFIG_IP_NF_MATCH_LENGTH is not set 4.346 +# CONFIG_IP_NF_MATCH_TTL is not set 4.347 +# CONFIG_IP_NF_MATCH_TCPMSS is not set 4.348 +# CONFIG_IP_NF_MATCH_HELPER is not set 4.349 +# CONFIG_IP_NF_MATCH_STATE is not set 4.350 +# CONFIG_IP_NF_MATCH_CONNTRACK is not set 4.351 +# CONFIG_IP_NF_MATCH_OWNER is not set 4.352 +# CONFIG_IP_NF_MATCH_PHYSDEV is not set 4.353 +# CONFIG_IP_NF_FILTER is not set 4.354 +# CONFIG_IP_NF_NAT is not set 4.355 +# CONFIG_IP_NF_MANGLE is not set 4.356 +# CONFIG_IP_NF_TARGET_LOG is not set 4.357 +# CONFIG_IP_NF_TARGET_ULOG is not set 4.358 +# CONFIG_IP_NF_TARGET_TCPMSS is not set 4.359 +# CONFIG_IP_NF_ARPTABLES is not set 4.360 +# CONFIG_IP_NF_COMPAT_IPCHAINS is not set 4.361 +# CONFIG_IP_NF_COMPAT_IPFWADM is not set 4.362 +# CONFIG_IP_NF_RAW is not set 4.363 + 4.364 +# 4.365 +# Bridge: Netfilter Configuration 4.366 +# 4.367 +# CONFIG_BRIDGE_NF_EBTABLES is not set 4.368 4.369 # 4.370 # SCTP Configuration (EXPERIMENTAL) 4.371 @@ -459,6 +549,8 @@ CONFIG_TULIP=y 4.372 # CONFIG_DE4X5 is not set 4.373 # CONFIG_WINBOND_840 is not set 4.374 # CONFIG_DM9102 is not set 4.375 +# CONFIG_PCMCIA_XIRCOM is not set 4.376 +# CONFIG_PCMCIA_XIRTULIP is not set 4.377 # CONFIG_AT1700 is not set 4.378 # CONFIG_DEPCA is not set 4.379 # CONFIG_HP100 is not set 4.380 @@ -525,6 +617,11 @@ CONFIG_TIGON3=y 4.381 # CONFIG_NET_RADIO is not set 4.382 4.383 # 4.384 +# PCMCIA network device support 4.385 +# 4.386 +# CONFIG_NET_PCMCIA is not set 4.387 + 4.388 +# 4.389 # Wan interfaces 4.390 # 4.391 # CONFIG_WAN is not set 4.392 @@ -629,6 +726,11 @@ CONFIG_LEGACY_PTY_COUNT=256 4.393 # CONFIG_FTAPE is not set 4.394 # CONFIG_AGP is not set 4.395 # CONFIG_DRM is not set 4.396 + 4.397 +# 4.398 +# PCMCIA character devices 4.399 +# 4.400 +# CONFIG_SYNCLINK_CS is not set 4.401 # CONFIG_MWAVE is not set 4.402 # CONFIG_RAW_DRIVER is not set 4.403 # CONFIG_HANGCHECK_TIMER is not set 4.404 @@ -663,7 +765,10 @@ CONFIG_EXT3_FS_XATTR=y 4.405 CONFIG_JBD=y 4.406 # CONFIG_JBD_DEBUG is not set 4.407 CONFIG_FS_MBCACHE=y 4.408 -# CONFIG_REISERFS_FS is not set 4.409 +CONFIG_REISERFS_FS=y 4.410 +# CONFIG_REISERFS_CHECK is not set 4.411 +# CONFIG_REISERFS_PROC_INFO is not set 4.412 +# CONFIG_REISERFS_FS_XATTR is not set 4.413 # CONFIG_JFS_FS is not set 4.414 # CONFIG_XFS_FS is not set 4.415 # CONFIG_MINIX_FS is not set 4.416 @@ -675,13 +780,18 @@ CONFIG_FS_MBCACHE=y 4.417 # 4.418 # CD-ROM/DVD Filesystems 4.419 # 4.420 -# CONFIG_ISO9660_FS is not set 4.421 +CONFIG_ISO9660_FS=y 4.422 +CONFIG_JOLIET=y 4.423 +CONFIG_ZISOFS=y 4.424 +CONFIG_ZISOFS_FS=y 4.425 # CONFIG_UDF_FS is not set 4.426 4.427 # 4.428 # DOS/FAT/NT Filesystems 4.429 # 4.430 -# CONFIG_FAT_FS is not set 4.431 +CONFIG_FAT_FS=m 4.432 +CONFIG_MSDOS_FS=m 4.433 +CONFIG_VFAT_FS=m 4.434 # CONFIG_NTFS_FS is not set 4.435 4.436 # 4.437 @@ -721,11 +831,14 @@ CONFIG_NFS_FS=y 4.438 CONFIG_NFS_V3=y 4.439 # CONFIG_NFS_V4 is not set 4.440 # CONFIG_NFS_DIRECTIO is not set 4.441 -# CONFIG_NFSD is not set 4.442 +CONFIG_NFSD=m 4.443 +CONFIG_NFSD_V3=y 4.444 +# CONFIG_NFSD_V4 is not set 4.445 +CONFIG_NFSD_TCP=y 4.446 CONFIG_ROOT_NFS=y 4.447 CONFIG_LOCKD=y 4.448 CONFIG_LOCKD_V4=y 4.449 -# CONFIG_EXPORTFS is not set 4.450 +CONFIG_EXPORTFS=m 4.451 CONFIG_SUNRPC=y 4.452 # CONFIG_RPCSEC_GSS_KRB5 is not set 4.453 # CONFIG_SMB_FS is not set 4.454 @@ -791,10 +904,30 @@ CONFIG_NLS_ISO8859_1=y 4.455 # 4.456 # Cryptographic options 4.457 # 4.458 -# CONFIG_CRYPTO is not set 4.459 +CONFIG_CRYPTO=y 4.460 +CONFIG_CRYPTO_HMAC=y 4.461 +# CONFIG_CRYPTO_NULL is not set 4.462 +# CONFIG_CRYPTO_MD4 is not set 4.463 +CONFIG_CRYPTO_MD5=m 4.464 +CONFIG_CRYPTO_SHA1=m 4.465 +# CONFIG_CRYPTO_SHA256 is not set 4.466 +# CONFIG_CRYPTO_SHA512 is not set 4.467 +CONFIG_CRYPTO_DES=m 4.468 +# CONFIG_CRYPTO_BLOWFISH is not set 4.469 +# CONFIG_CRYPTO_TWOFISH is not set 4.470 +# CONFIG_CRYPTO_SERPENT is not set 4.471 +CONFIG_CRYPTO_AES=m 4.472 +# CONFIG_CRYPTO_CAST5 is not set 4.473 +# CONFIG_CRYPTO_CAST6 is not set 4.474 +# CONFIG_CRYPTO_ARC4 is not set 4.475 +# CONFIG_CRYPTO_DEFLATE is not set 4.476 +# CONFIG_CRYPTO_MICHAEL_MIC is not set 4.477 +CONFIG_CRYPTO_CRC32C=m 4.478 +# CONFIG_CRYPTO_TEST is not set 4.479 4.480 # 4.481 # Library routines 4.482 # 4.483 CONFIG_CRC32=y 4.484 CONFIG_LIBCRC32C=y 4.485 +CONFIG_ZLIB_INFLATE=y
5.1 --- a/linux-2.6.7-xen-sparse/arch/xen/configs/xenU_defconfig Fri Aug 20 09:40:30 2004 +0000 5.2 +++ b/linux-2.6.7-xen-sparse/arch/xen/configs/xenU_defconfig Sat Aug 21 10:28:38 2004 +0000 5.3 @@ -10,6 +10,7 @@ CONFIG_NO_IDLE_HZ=y 5.4 # 5.5 # CONFIG_XEN_PRIVILEGED_GUEST is not set 5.6 # CONFIG_XEN_PHYSDEV_ACCESS is not set 5.7 +# CONFIG_XEN_WRITABLE_PAGETABLES is not set 5.8 # CONFIG_FOREIGN_PAGES is not set 5.9 # CONFIG_PAGESIZED_SKBS is not set 5.10 CONFIG_X86=y 5.11 @@ -62,11 +63,6 @@ CONFIG_XENARCH="i386" 5.12 CONFIG_MMU=y 5.13 CONFIG_UID16=y 5.14 CONFIG_GENERIC_ISA_DMA=y 5.15 -# CONFIG_M386 is not set 5.16 -# CONFIG_M486 is not set 5.17 -# CONFIG_M586 is not set 5.18 -# CONFIG_M586TSC is not set 5.19 -# CONFIG_M586MMX is not set 5.20 # CONFIG_M686 is not set 5.21 # CONFIG_MPENTIUMII is not set 5.22 # CONFIG_MPENTIUMIII is not set 5.23 @@ -76,9 +72,6 @@ CONFIG_MPENTIUM4=y 5.24 # CONFIG_MK7 is not set 5.25 # CONFIG_MK8 is not set 5.26 # CONFIG_MCRUSOE is not set 5.27 -# CONFIG_MWINCHIPC6 is not set 5.28 -# CONFIG_MWINCHIP2 is not set 5.29 -# CONFIG_MWINCHIP3D is not set 5.30 # CONFIG_MCYRIXIII is not set 5.31 # CONFIG_MVIAC3_2 is not set 5.32 # CONFIG_X86_GENERIC is not set 5.33 @@ -105,7 +98,6 @@ CONFIG_X86_CPUID=y 5.34 # CONFIG_EDD is not set 5.35 CONFIG_NOHIGHMEM=y 5.36 # CONFIG_HIGHMEM4G is not set 5.37 -# CONFIG_HIGHMEM64G is not set 5.38 CONFIG_HAVE_DEC_LOCK=y 5.39 # CONFIG_REGPARM is not set 5.40 5.41 @@ -137,6 +129,59 @@ CONFIG_BINFMT_ELF=y 5.42 # 5.43 5.44 # 5.45 +# SCSI device support 5.46 +# 5.47 +CONFIG_SCSI=m 5.48 +CONFIG_SCSI_PROC_FS=y 5.49 + 5.50 +# 5.51 +# SCSI support type (disk, tape, CD-ROM) 5.52 +# 5.53 +CONFIG_BLK_DEV_SD=m 5.54 +# CONFIG_CHR_DEV_ST is not set 5.55 +# CONFIG_CHR_DEV_OSST is not set 5.56 +# CONFIG_BLK_DEV_SR is not set 5.57 +# CONFIG_CHR_DEV_SG is not set 5.58 + 5.59 +# 5.60 +# Some SCSI devices (e.g. CD jukebox) support multiple LUNs 5.61 +# 5.62 +# CONFIG_SCSI_MULTI_LUN is not set 5.63 +# CONFIG_SCSI_CONSTANTS is not set 5.64 +# CONFIG_SCSI_LOGGING is not set 5.65 + 5.66 +# 5.67 +# SCSI Transport Attributes 5.68 +# 5.69 +# CONFIG_SCSI_SPI_ATTRS is not set 5.70 +# CONFIG_SCSI_FC_ATTRS is not set 5.71 + 5.72 +# 5.73 +# SCSI low-level drivers 5.74 +# 5.75 +# CONFIG_SCSI_AIC7XXX_OLD is not set 5.76 +# CONFIG_SCSI_SATA is not set 5.77 +# CONFIG_SCSI_EATA_PIO is not set 5.78 +# CONFIG_SCSI_DEBUG is not set 5.79 + 5.80 +# 5.81 +# Block devices 5.82 +# 5.83 +# CONFIG_BLK_DEV_FD is not set 5.84 +CONFIG_BLK_DEV_LOOP=m 5.85 +# CONFIG_BLK_DEV_CRYPTOLOOP is not set 5.86 +CONFIG_BLK_DEV_NBD=m 5.87 +CONFIG_BLK_DEV_RAM=y 5.88 +CONFIG_BLK_DEV_RAM_SIZE=4096 5.89 +CONFIG_BLK_DEV_INITRD=y 5.90 +# CONFIG_LBD is not set 5.91 + 5.92 +# 5.93 +# Multi-device support (RAID and LVM) 5.94 +# 5.95 +# CONFIG_MD is not set 5.96 + 5.97 +# 5.98 # Networking support 5.99 # 5.100 CONFIG_NET=y 5.101 @@ -250,25 +295,33 @@ CONFIG_EXT3_FS_XATTR=y 5.102 CONFIG_JBD=y 5.103 # CONFIG_JBD_DEBUG is not set 5.104 CONFIG_FS_MBCACHE=y 5.105 -# CONFIG_REISERFS_FS is not set 5.106 +CONFIG_REISERFS_FS=y 5.107 +# CONFIG_REISERFS_CHECK is not set 5.108 +# CONFIG_REISERFS_PROC_INFO is not set 5.109 +# CONFIG_REISERFS_FS_XATTR is not set 5.110 # CONFIG_JFS_FS is not set 5.111 # CONFIG_XFS_FS is not set 5.112 # CONFIG_MINIX_FS is not set 5.113 # CONFIG_ROMFS_FS is not set 5.114 # CONFIG_QUOTA is not set 5.115 -# CONFIG_AUTOFS_FS is not set 5.116 -# CONFIG_AUTOFS4_FS is not set 5.117 +CONFIG_AUTOFS_FS=y 5.118 +CONFIG_AUTOFS4_FS=y 5.119 5.120 # 5.121 # CD-ROM/DVD Filesystems 5.122 # 5.123 -# CONFIG_ISO9660_FS is not set 5.124 +CONFIG_ISO9660_FS=y 5.125 +CONFIG_JOLIET=y 5.126 +CONFIG_ZISOFS=y 5.127 +CONFIG_ZISOFS_FS=y 5.128 # CONFIG_UDF_FS is not set 5.129 5.130 # 5.131 # DOS/FAT/NT Filesystems 5.132 # 5.133 -# CONFIG_FAT_FS is not set 5.134 +CONFIG_FAT_FS=m 5.135 +CONFIG_MSDOS_FS=m 5.136 +CONFIG_VFAT_FS=m 5.137 # CONFIG_NTFS_FS is not set 5.138 5.139 # 5.140 @@ -278,7 +331,8 @@ CONFIG_PROC_FS=y 5.141 CONFIG_PROC_KCORE=y 5.142 CONFIG_SYSFS=y 5.143 # CONFIG_DEVFS_FS is not set 5.144 -# CONFIG_DEVPTS_FS_XATTR is not set 5.145 +CONFIG_DEVPTS_FS_XATTR=y 5.146 +# CONFIG_DEVPTS_FS_SECURITY is not set 5.147 CONFIG_TMPFS=y 5.148 # CONFIG_HUGETLBFS is not set 5.149 # CONFIG_HUGETLB_PAGE is not set 5.150 @@ -378,10 +432,30 @@ CONFIG_NLS_ISO8859_1=y 5.151 # 5.152 # Cryptographic options 5.153 # 5.154 -# CONFIG_CRYPTO is not set 5.155 +CONFIG_CRYPTO=y 5.156 +# CONFIG_CRYPTO_HMAC is not set 5.157 +# CONFIG_CRYPTO_NULL is not set 5.158 +# CONFIG_CRYPTO_MD4 is not set 5.159 +CONFIG_CRYPTO_MD5=m 5.160 +# CONFIG_CRYPTO_SHA1 is not set 5.161 +# CONFIG_CRYPTO_SHA256 is not set 5.162 +# CONFIG_CRYPTO_SHA512 is not set 5.163 +# CONFIG_CRYPTO_DES is not set 5.164 +# CONFIG_CRYPTO_BLOWFISH is not set 5.165 +# CONFIG_CRYPTO_TWOFISH is not set 5.166 +# CONFIG_CRYPTO_SERPENT is not set 5.167 +# CONFIG_CRYPTO_AES is not set 5.168 +# CONFIG_CRYPTO_CAST5 is not set 5.169 +# CONFIG_CRYPTO_CAST6 is not set 5.170 +# CONFIG_CRYPTO_ARC4 is not set 5.171 +# CONFIG_CRYPTO_DEFLATE is not set 5.172 +# CONFIG_CRYPTO_MICHAEL_MIC is not set 5.173 +CONFIG_CRYPTO_CRC32C=m 5.174 +# CONFIG_CRYPTO_TEST is not set 5.175 5.176 # 5.177 # Library routines 5.178 # 5.179 -CONFIG_CRC32=y 5.180 -CONFIG_LIBCRC32C=y 5.181 +# CONFIG_CRC32 is not set 5.182 +CONFIG_LIBCRC32C=m 5.183 +CONFIG_ZLIB_INFLATE=y
6.1 --- a/linux-2.6.7-xen-sparse/arch/xen/kernel/reboot.c Fri Aug 20 09:40:30 2004 +0000 6.2 +++ b/linux-2.6.7-xen-sparse/arch/xen/kernel/reboot.c Sat Aug 21 10:28:38 2004 +0000 6.3 @@ -94,6 +94,13 @@ static void __do_suspend(void) 6.4 6.5 HYPERVISOR_suspend(virt_to_machine(suspend_record) >> PAGE_SHIFT); 6.6 6.7 + HYPERVISOR_vm_assist(VMASST_CMD_enable, 6.8 + VMASST_TYPE_4gb_segments); 6.9 +#ifdef CONFIG_XEN_WRITABLE_PAGETABLES 6.10 + HYPERVISOR_vm_assist(VMASST_CMD_enable, 6.11 + VMASST_TYPE_writeable_pagetables); 6.12 +#endif 6.13 + 6.14 shutting_down = -1; 6.15 6.16 memcpy(&start_info, &suspend_record->resume_info, sizeof(start_info));
7.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 7.2 +++ b/linux-2.6.7-xen-sparse/drivers/Makefile Sat Aug 21 10:28:38 2004 +0000 7.3 @@ -0,0 +1,54 @@ 7.4 +# 7.5 +# Makefile for the Linux kernel device drivers. 7.6 +# 7.7 +# 15 Sep 2000, Christoph Hellwig <hch@infradead.org> 7.8 +# Rewritten to use lists instead of if-statements. 7.9 +# 7.10 + 7.11 +obj-$(CONFIG_PCI) += pci/ 7.12 +obj-$(CONFIG_PARISC) += parisc/ 7.13 +obj-$(CONFIG_ACPI_BOOT) += acpi/ 7.14 +# PnP must come after ACPI since it will eventually need to check if acpi 7.15 +# was used and do nothing if so 7.16 +obj-$(CONFIG_PNP) += pnp/ 7.17 + 7.18 +# char/ comes before serial/ etc so that the VT console is the boot-time 7.19 +# default. 7.20 + 7.21 +obj-y += char/ 7.22 +obj-y += serial/ 7.23 +obj-$(CONFIG_PARPORT) += parport/ 7.24 +obj-y += base/ block/ misc/ net/ media/ 7.25 +obj-$(CONFIG_NUBUS) += nubus/ 7.26 +obj-$(CONFIG_ATM) += atm/ 7.27 +obj-$(CONFIG_PPC_PMAC) += macintosh/ 7.28 +obj-$(CONFIG_ARCH_XEN) += xen/ 7.29 +obj-$(CONFIG_IDE) += ide/ 7.30 +obj-$(CONFIG_FC4) += fc4/ 7.31 +obj-$(CONFIG_SCSI) += scsi/ 7.32 +obj-$(CONFIG_FUSION) += message/ 7.33 +obj-$(CONFIG_IEEE1394) += ieee1394/ 7.34 +obj-y += cdrom/ video/ 7.35 +obj-$(CONFIG_MTD) += mtd/ 7.36 +obj-$(CONFIG_PCMCIA) += pcmcia/ 7.37 +obj-$(CONFIG_DIO) += dio/ 7.38 +obj-$(CONFIG_SBUS) += sbus/ 7.39 +obj-$(CONFIG_ZORRO) += zorro/ 7.40 +obj-$(CONFIG_MAC) += macintosh/ 7.41 +obj-$(CONFIG_PARIDE) += block/paride/ 7.42 +obj-$(CONFIG_TC) += tc/ 7.43 +obj-$(CONFIG_USB) += usb/ 7.44 +obj-$(CONFIG_USB_GADGET) += usb/gadget/ 7.45 +obj-$(CONFIG_INPUT) += input/ 7.46 +obj-$(CONFIG_GAMEPORT) += input/gameport/ 7.47 +obj-$(CONFIG_SERIO) += input/serio/ 7.48 +obj-$(CONFIG_I2O) += message/ 7.49 +obj-$(CONFIG_I2C) += i2c/ 7.50 +obj-$(CONFIG_PHONE) += telephony/ 7.51 +obj-$(CONFIG_MD) += md/ 7.52 +obj-$(CONFIG_BT) += bluetooth/ 7.53 +obj-$(CONFIG_ISDN) += isdn/ 7.54 +obj-$(CONFIG_MCA) += mca/ 7.55 +obj-$(CONFIG_EISA) += eisa/ 7.56 +obj-$(CONFIG_CPU_FREQ) += cpufreq/ 7.57 +obj-y += firmware/
8.1 --- a/linux-2.6.7-xen-sparse/drivers/xen/blkfront/blkfront.c Fri Aug 20 09:40:30 2004 +0000 8.2 +++ b/linux-2.6.7-xen-sparse/drivers/xen/blkfront/blkfront.c Sat Aug 21 10:28:38 2004 +0000 8.3 @@ -1215,12 +1215,15 @@ int __init xlblk_init(void) 8.4 * for notifications before proceeding. For now we assume that we 8.5 * will be notified of exactly one interface. 8.6 */ 8.7 - while ( blkif_state != BLKIF_STATE_CONNECTED ) 8.8 + for ( i=0; (blkif_state != BLKIF_STATE_CONNECTED) && (i < 10*HZ); i++ ) 8.9 { 8.10 set_current_state(TASK_INTERRUPTIBLE); 8.11 schedule_timeout(1); 8.12 } 8.13 8.14 + if (blkif_state != BLKIF_STATE_CONNECTED) 8.15 + printk(KERN_INFO "Timeout connecting block device driver!\n"); 8.16 + 8.17 return 0; 8.18 } 8.19
9.1 --- a/linux-2.6.7-xen-sparse/drivers/xen/netback/netback.c Fri Aug 20 09:40:30 2004 +0000 9.2 +++ b/linux-2.6.7-xen-sparse/drivers/xen/netback/netback.c Sat Aug 21 10:28:38 2004 +0000 9.3 @@ -748,6 +748,7 @@ static int __init netback_init(void) 9.4 for ( i = 0; i < MAX_PENDING_REQS; i++ ) 9.5 { 9.6 page = virt_to_page(MMAP_VADDR(i)); 9.7 + set_page_count(page, 1); 9.8 SetPageForeign(page); 9.9 PageForeignDestructor(page) = netif_page_release; 9.10 }
10.1 --- a/linux-2.6.7-xen-sparse/drivers/xen/netfront/netfront.c Fri Aug 20 09:40:30 2004 +0000 10.2 +++ b/linux-2.6.7-xen-sparse/drivers/xen/netfront/netfront.c Sat Aug 21 10:28:38 2004 +0000 10.3 @@ -27,12 +27,15 @@ 10.4 #include <asm/page.h> 10.5 10.6 #if 0 10.7 -#define dprintf(fmt, args...) printk(KERN_INFO "[XEN] %s" fmt, __FUNCTION__, ##args) 10.8 +#define DPRINTK(fmt, args...) \ 10.9 + printk(KERN_INFO "[XEN] %s" fmt, __FUNCTION__, ##args) 10.10 #else 10.11 -#define dprintf(fmt, args...) do {} while(0) 10.12 +#define DPRINTK(fmt, args...) ((void)0) 10.13 #endif 10.14 10.15 -#define RX_BUF_SIZE ((PAGE_SIZE/2)+1) /* Fool the slab allocator :-) */ 10.16 +#ifndef __GFP_NOWARN 10.17 +#define __GFP_NOWARN 0 10.18 +#endif 10.19 10.20 static void network_tx_buf_gc(struct net_device *dev); 10.21 static void network_alloc_rx_buffers(struct net_device *dev); 10.22 @@ -163,11 +166,22 @@ static int netctrl_connected_count(void) 10.23 } 10.24 10.25 netctrl.connected_n = connected; 10.26 - dprintf("> connected_n=%d interface_n=%d\n", 10.27 + DPRINTK("> connected_n=%d interface_n=%d\n", 10.28 netctrl.connected_n, netctrl.interface_n); 10.29 return connected; 10.30 } 10.31 10.32 +static inline struct sk_buff *alloc_skb_page(void) 10.33 +{ 10.34 + struct sk_buff *skb; 10.35 + skb = __dev_alloc_skb((PAGE_SIZE/2)+1, GFP_ATOMIC|__GFP_NOWARN); 10.36 +#if 0 10.37 + if ( skb && unlikely(((unsigned long)skb->head & (PAGE_SIZE-1)) != 0) ) 10.38 + panic("alloc_skb needs to provide us page-aligned buffers."); 10.39 +#endif 10.40 + return skb; 10.41 +} 10.42 + 10.43 static int network_open(struct net_device *dev) 10.44 { 10.45 struct net_private *np = dev->priv; 10.46 @@ -246,15 +260,11 @@ static void network_alloc_rx_buffers(str 10.47 return; 10.48 10.49 do { 10.50 - skb = dev_alloc_skb(RX_BUF_SIZE); 10.51 - if ( unlikely(skb == NULL) ) 10.52 + if ( unlikely((skb = alloc_skb_page()) == NULL) ) 10.53 break; 10.54 10.55 skb->dev = dev; 10.56 10.57 - if ( unlikely(((unsigned long)skb->head & (PAGE_SIZE-1)) != 0) ) 10.58 - panic("alloc_skb needs to provide us page-aligned buffers."); 10.59 - 10.60 id = GET_ID_FROM_FREELIST(np->rx_skbs); 10.61 10.62 np->rx_skbs[id] = skb; 10.63 @@ -325,8 +335,8 @@ static int network_start_xmit(struct sk_ 10.64 if ( unlikely((((unsigned long)skb->data & ~PAGE_MASK) + skb->len) >= 10.65 PAGE_SIZE) ) 10.66 { 10.67 - struct sk_buff *new_skb = dev_alloc_skb(RX_BUF_SIZE); 10.68 - if ( unlikely(new_skb == NULL) ) 10.69 + struct sk_buff *new_skb; 10.70 + if ( unlikely((new_skb = alloc_skb_page()) == NULL) ) 10.71 return 1; 10.72 skb_put(new_skb, skb->len); 10.73 memcpy(new_skb->data, skb->data, skb->len); 10.74 @@ -628,8 +638,8 @@ static void netif_status_change(netif_fe 10.75 struct net_device *dev; 10.76 struct net_private *np; 10.77 10.78 - dprintf(">\n"); 10.79 - dprintf("> status=%d handle=%d mac=%02x:%02x:%02x:%02x:%02x:%02x\n", 10.80 + DPRINTK(">\n"); 10.81 + DPRINTK("> status=%d handle=%d mac=%02x:%02x:%02x:%02x:%02x:%02x\n", 10.82 status->status, 10.83 status->handle, 10.84 status->mac[0], status->mac[1], status->mac[2], 10.85 @@ -804,7 +814,7 @@ static void netif_driver_status_change( 10.86 int err = 0; 10.87 int i; 10.88 10.89 - dprintf("> nr_interfaces=%d\n", status->nr_interfaces); 10.90 + DPRINTK("> nr_interfaces=%d\n", status->nr_interfaces); 10.91 10.92 netctrl.interface_n = status->nr_interfaces; 10.93 netctrl.connected_n = 0; 10.94 @@ -856,20 +866,26 @@ static int wait_for_interfaces(void) 10.95 int err = 0, conn = 0; 10.96 int wait_i, wait_n = 100; 10.97 10.98 - dprintf(">\n"); 10.99 + DPRINTK(">\n"); 10.100 + 10.101 for ( wait_i = 0; wait_i < wait_n; wait_i++) 10.102 { 10.103 - dprintf("> wait_i=%d\n", wait_i); 10.104 + DPRINTK("> wait_i=%d\n", wait_i); 10.105 conn = netctrl_connected(); 10.106 if(conn) break; 10.107 set_current_state(TASK_INTERRUPTIBLE); 10.108 schedule_timeout(10); 10.109 } 10.110 - if(conn <= 0){ 10.111 + 10.112 + if ( conn <= 0 ) 10.113 + { 10.114 err = netctrl_err(-ENETDOWN); 10.115 - printk(KERN_WARNING "[XEN] Failed to connect all virtual interfaces: err=%d\n", err); 10.116 + printk(KERN_WARNING "[XEN] Failed to connect all virtual interfaces: " 10.117 + "err=%d\n", err); 10.118 } 10.119 - dprintf("< err=%d\n", err); 10.120 + 10.121 + DPRINTK("< err=%d\n", err); 10.122 + 10.123 return err; 10.124 } 10.125
11.1 --- a/tools/check/chk Fri Aug 20 09:40:30 2004 +0000 11.2 +++ b/tools/check/chk Sat Aug 21 10:28:38 2004 +0000 11.3 @@ -12,6 +12,8 @@ function usage { 11.4 exit 1 11.5 } 11.6 11.7 +export PATH=${PATH}:/sbin:/usr/sbin 11.8 + 11.9 case $1 in 11.10 build) 11.11 check="CHECK-BUILD" 11.12 @@ -67,4 +69,4 @@ if [ "$failed" == "1" ] ; then 11.13 else 11.14 echo "OK" >> ${info} 11.15 exit 0 11.16 -fi 11.17 \ No newline at end of file 11.18 +fi
12.1 --- a/tools/libxc/xc.h Fri Aug 20 09:40:30 2004 +0000 12.2 +++ b/tools/libxc/xc.h Sat Aug 21 10:28:38 2004 +0000 12.3 @@ -231,4 +231,11 @@ int xc_domain_setmaxmem(int xc_handle, 12.4 unsigned int max_memkb); 12.5 12.6 12.7 +void *xc_map_foreign_range(int xc_handle, u32 dom, 12.8 + int size, int prot, 12.9 + unsigned long mfn ); 12.10 + 12.11 +void *xc_map_foreign_batch(int xc_handle, u32 dom, int prot, 12.12 + unsigned long *arr, int num ); 12.13 + 12.14 #endif /* __XC_H__ */
13.1 --- a/tools/libxc/xc_linux_restore.c Fri Aug 20 09:40:30 2004 +0000 13.2 +++ b/tools/libxc/xc_linux_restore.c Sat Aug 21 10:28:38 2004 +0000 13.3 @@ -325,7 +325,7 @@ int xc_linux_restore(int xc_handle, XcIO 13.4 } 13.5 } 13.6 13.7 - if ( (region_base = mfn_mapper_map_batch( xc_handle, dom, 13.8 + if ( (region_base = xc_map_foreign_batch( xc_handle, dom, 13.9 PROT_WRITE, 13.10 region_mfn, 13.11 j )) == 0 ) 13.12 @@ -631,7 +631,7 @@ printf("XXXXXXXXXXXXXXX pin L2\n"); 13.13 } 13.14 13.15 if ( (live_pfn_to_mfn_table = 13.16 - mfn_mapper_map_batch(xc_handle, dom, 13.17 + xc_map_foreign_batch(xc_handle, dom, 13.18 PROT_WRITE, 13.19 pfn_to_mfn_frame_list, 13.20 (nr_pfns+1023)/1024 )) == 0 )
14.1 --- a/tools/libxc/xc_linux_save.c Fri Aug 20 09:40:30 2004 +0000 14.2 +++ b/tools/libxc/xc_linux_save.c Sat Aug 21 10:28:38 2004 +0000 14.3 @@ -30,18 +30,8 @@ 14.4 /* 14.5 * Returns TRUE if the given machine frame number has a unique mapping 14.6 * in the guest's pseudophysical map. 14.7 - * 0x80000000-3 mark the shared_info, and blk/net rings 14.8 */ 14.9 14.10 -#if 0 14.11 -#define MFN_IS_IN_PSEUDOPHYS_MAP(_mfn) \ 14.12 - (((_mfn) < (1024*1024)) && \ 14.13 - (((live_mfn_to_pfn_table[_mfn] < nr_pfns) && \ 14.14 - (live_pfn_to_mfn_table[live_mfn_to_pfn_table[_mfn]] == (_mfn))) || \ 14.15 - ((live_mfn_to_pfn_table[_mfn] >= 0x80000000) && \ 14.16 - (live_mfn_to_pfn_table[_mfn] <= 0x80000003)) || \ 14.17 - (live_pfn_to_mfn_table[live_mfn_to_pfn_table[_mfn]] == 0x80000004))) 14.18 -#endif 14.19 #define MFN_IS_IN_PSEUDOPHYS_MAP(_mfn) \ 14.20 (((_mfn) < (1024*1024)) && \ 14.21 ((live_mfn_to_pfn_table[_mfn] < nr_pfns) && \ 14.22 @@ -60,6 +50,8 @@ 14.23 _res; \ 14.24 }) 14.25 14.26 +#define is_mapped(pfn) (!((pfn) & 0x80000000UL)) 14.27 + 14.28 static inline int test_bit ( int nr, volatile void * addr) 14.29 { 14.30 return (((unsigned long*)addr)[nr/(sizeof(unsigned long)*8)] >> 14.31 @@ -384,7 +376,7 @@ int xc_linux_save(int xc_handle, XcIOCon 14.32 14.33 14.34 /* Map the shared info frame */ 14.35 - live_shinfo = mfn_mapper_map_single(xc_handle, domid, 14.36 + live_shinfo = xc_map_foreign_range(xc_handle, domid, 14.37 PAGE_SIZE, PROT_READ, 14.38 shared_info_frame); 14.39 14.40 @@ -395,7 +387,7 @@ int xc_linux_save(int xc_handle, XcIOCon 14.41 14.42 /* the pfn_to_mfn_frame_list fits in a single page */ 14.43 live_pfn_to_mfn_frame_list = 14.44 - mfn_mapper_map_single(xc_handle, domid, 14.45 + xc_map_foreign_range(xc_handle, domid, 14.46 PAGE_SIZE, PROT_READ, 14.47 live_shinfo->arch.pfn_to_mfn_frame_list ); 14.48 14.49 @@ -410,7 +402,7 @@ int xc_linux_save(int xc_handle, XcIOCon 14.50 (its not clear why it would want to change them, and we'll be OK 14.51 from a safety POV anyhow. */ 14.52 14.53 - live_pfn_to_mfn_table = mfn_mapper_map_batch(xc_handle, domid, 14.54 + live_pfn_to_mfn_table = xc_map_foreign_batch(xc_handle, domid, 14.55 PROT_READ, 14.56 live_pfn_to_mfn_frame_list, 14.57 (nr_pfns+1023)/1024 ); 14.58 @@ -421,12 +413,12 @@ int xc_linux_save(int xc_handle, XcIOCon 14.59 14.60 /* Setup the mfn_to_pfn table mapping */ 14.61 mfn_to_pfn_table_start_mfn = xc_get_m2p_start_mfn( xc_handle ); 14.62 - 14.63 +printf("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\n"); 14.64 live_mfn_to_pfn_table = 14.65 - mfn_mapper_map_single(xc_handle, DOMID_XEN, 14.66 + xc_map_foreign_range(xc_handle, DOMID_XEN, 14.67 PAGE_SIZE*1024, PROT_READ, 14.68 mfn_to_pfn_table_start_mfn ); 14.69 - 14.70 +printf("BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB\n"); 14.71 /* Canonicalise the pfn-to-mfn table frame-number list. */ 14.72 memcpy( pfn_to_mfn_frame_list, live_pfn_to_mfn_frame_list, PAGE_SIZE ); 14.73 14.74 @@ -530,7 +522,7 @@ printf("GO LIVE!!\n"); 14.75 { 14.76 mfn = live_pfn_to_mfn_table[i]; 14.77 14.78 - if( (live_mfn_to_pfn_table[mfn] != i) && (mfn != 0x80000001) ) 14.79 + if( (live_mfn_to_pfn_table[mfn] != i) && (mfn != 0xffffffffUL) ) 14.80 { 14.81 printf("i=0x%x mfn=%lx live_mfn_to_pfn_table=%lx\n", 14.82 i,mfn,live_mfn_to_pfn_table[mfn]); 14.83 @@ -629,7 +621,8 @@ printf("GO LIVE!!\n"); 14.84 pfn_batch[batch] = n; 14.85 pfn_type[batch] = live_pfn_to_mfn_table[n]; 14.86 14.87 - if( pfn_type[batch] == 0x80000001 ){ 14.88 + if( ! is_mapped(pfn_type[batch]) ) 14.89 + { 14.90 /* not currently in pusedo-physical map -- set bit 14.91 in to_fix that we must send this page in last_iter 14.92 unless its sent sooner anyhow */ 14.93 @@ -660,7 +653,7 @@ printf("GO LIVE!!\n"); 14.94 if ( batch == 0 ) 14.95 goto skip; /* vanishingly unlikely... */ 14.96 14.97 - if ( (region_base = mfn_mapper_map_batch(xc_handle, domid, 14.98 + if ( (region_base = xc_map_foreign_batch(xc_handle, domid, 14.99 PROT_READ, 14.100 pfn_type, 14.101 batch)) == 0 ){ 14.102 @@ -870,7 +863,7 @@ printf("type fail: page %i mfn %08lx\n", 14.103 14.104 for ( i = 0, j = 0; i < nr_pfns; i++ ) 14.105 { 14.106 - if ( live_pfn_to_mfn_table[i] >= 0x80000000UL ) 14.107 + if ( ! is_mapped(live_pfn_to_mfn_table[i]) ) 14.108 j++; 14.109 } 14.110 14.111 @@ -882,7 +875,7 @@ printf("type fail: page %i mfn %08lx\n", 14.112 14.113 for ( i = 0, j = 0; i < nr_pfns; ) 14.114 { 14.115 - if ( live_pfn_to_mfn_table[i] >= 0x80000000UL ) 14.116 + if ( ! is_mapped(live_pfn_to_mfn_table[i]) ) 14.117 { 14.118 pfntab[j++] = i; 14.119 } 14.120 @@ -901,7 +894,7 @@ printf("type fail: page %i mfn %08lx\n", 14.121 14.122 /* Map the suspend-record MFN to pin it. The page must be owned by 14.123 domid for this to succeed. */ 14.124 - p_srec = mfn_mapper_map_single(xc_handle, domid, 14.125 + p_srec = xc_map_foreign_range(xc_handle, domid, 14.126 sizeof(*p_srec), PROT_READ, 14.127 ctxt.cpu_ctxt.esi); 14.128 if (!p_srec){
15.1 --- a/tools/libxc/xc_private.c Fri Aug 20 09:40:30 2004 +0000 15.2 +++ b/tools/libxc/xc_private.c Sat Aug 21 10:28:38 2004 +0000 15.3 @@ -133,7 +133,7 @@ void unmap_pfn(void *pm_handle, void *va 15.4 15.5 /*******************/ 15.6 15.7 -void *mfn_mapper_map_batch(int xc_handle, domid_t dom, int prot, 15.8 +void *xc_map_foreign_batch(int xc_handle, u32 dom, int prot, 15.9 unsigned long *arr, int num ) 15.10 { 15.11 privcmd_mmapbatch_t ioctlx; 15.12 @@ -158,7 +158,7 @@ void *mfn_mapper_map_batch(int xc_handle 15.13 15.14 /*******************/ 15.15 15.16 -void *mfn_mapper_map_single(int xc_handle, domid_t dom, 15.17 +void *xc_map_foreign_range(int xc_handle, u32 dom, 15.18 int size, int prot, 15.19 unsigned long mfn ) 15.20 {
16.1 --- a/tools/libxc/xc_private.h Fri Aug 20 09:40:30 2004 +0000 16.2 +++ b/tools/libxc/xc_private.h Sat Aug 21 10:28:38 2004 +0000 16.3 @@ -220,23 +220,6 @@ typedef struct mfn_mapper { 16.4 16.5 } mfn_mapper_t; 16.6 16.7 -void * mfn_mapper_map_single(int xc_handle, domid_t dom, int size, int prot, 16.8 - unsigned long mfn ); 16.9 - 16.10 -void * mfn_mapper_map_batch(int xc_handle, domid_t dom, int prot, 16.11 - unsigned long *arr, int num ); 16.12 - 16.13 -mfn_mapper_t * mfn_mapper_init(int xc_handle, domid_t dom, int size, int prot); 16.14 - 16.15 -void * mfn_mapper_base(mfn_mapper_t *t); 16.16 - 16.17 -void mfn_mapper_close(mfn_mapper_t *t); 16.18 - 16.19 -int mfn_mapper_flush_queue(mfn_mapper_t *t); 16.20 - 16.21 -void * mfn_mapper_queue_entry(mfn_mapper_t *t, int offset, 16.22 - unsigned long mfn, int size ); 16.23 - 16.24 long long xc_domain_get_cpu_usage( int xc_handle, domid_t domid ); 16.25 16.26 #include "xc_io.h"
17.1 --- a/tools/python/xen/lowlevel/xu/xu.c Fri Aug 20 09:40:30 2004 +0000 17.2 +++ b/tools/python/xen/lowlevel/xu/xu.c Sat Aug 21 10:28:38 2004 +0000 17.3 @@ -679,11 +679,12 @@ static PyTypeObject xu_message_type = { 17.4 * *********************** PORT *********************** 17.5 */ 17.6 17.7 -static control_if_t *map_control_interface(int fd, unsigned long pfn) 17.8 +static control_if_t *map_control_interface(int fd, unsigned long pfn, 17.9 + u32 dom) 17.10 { 17.11 - char *vaddr = mmap(NULL, PAGE_SIZE, PROT_READ|PROT_WRITE, 17.12 - MAP_SHARED, fd, pfn * PAGE_SIZE); 17.13 - if ( vaddr == MAP_FAILED ) 17.14 + char *vaddr = xc_map_foreign_range( fd, dom, PAGE_SIZE, 17.15 + PROT_READ|PROT_WRITE, pfn ); 17.16 + if ( vaddr == NULL ) 17.17 return NULL; 17.18 return (control_if_t *)(vaddr + 2048); 17.19 } 17.20 @@ -695,8 +696,8 @@ static void unmap_control_interface(int 17.21 17.22 typedef struct xu_port_object { 17.23 PyObject_HEAD; 17.24 - int mem_fd; 17.25 int xc_handle; 17.26 + int connected; 17.27 u32 remote_dom; 17.28 int local_port, remote_port; 17.29 control_if_t *interface; 17.30 @@ -908,35 +909,25 @@ static int __xu_port_connect(xu_port_obj 17.31 { 17.32 xc_dominfo_t info; 17.33 17.34 - if ( xup->mem_fd != -1 ) 17.35 - return 0; 17.36 - 17.37 - if ( (xup->mem_fd = open("/dev/mem", O_RDWR)) == -1 ) 17.38 + if ( xup->connected ) 17.39 { 17.40 - PyErr_SetString(port_error, "Could not open '/dev/mem'"); 17.41 - return -1; 17.42 + return 0; 17.43 } 17.44 - set_cloexec(xup->mem_fd); 17.45 - 17.46 - /* Set the General-Purpose Subject whose page frame will be mapped. */ 17.47 - (void)ioctl(xup->mem_fd, _IO('M', 1), (unsigned long)xup->remote_dom); 17.48 17.49 if ( (xc_domain_getinfo(xup->xc_handle, xup->remote_dom, 1, &info) != 1) || 17.50 (info.domid != xup->remote_dom) ) 17.51 { 17.52 PyErr_SetString(port_error, "Failed to obtain domain status"); 17.53 - (void)close(xup->mem_fd); 17.54 - xup->mem_fd = -1; 17.55 return -1; 17.56 } 17.57 17.58 xup->interface = 17.59 - map_control_interface(xup->mem_fd, info.shared_info_frame); 17.60 + map_control_interface(xup->xc_handle, info.shared_info_frame, 17.61 + xup->remote_dom); 17.62 + 17.63 if ( xup->interface == NULL ) 17.64 { 17.65 PyErr_SetString(port_error, "Failed to map domain control interface"); 17.66 - (void)close(xup->mem_fd); 17.67 - xup->mem_fd = -1; 17.68 return -1; 17.69 } 17.70 17.71 @@ -946,16 +937,16 @@ static int __xu_port_connect(xu_port_obj 17.72 xup->rx_req_prod = xup->interface->rx_req_prod; 17.73 xup->rx_resp_cons = xup->interface->rx_resp_prod; 17.74 17.75 + xup->connected = 1; 17.76 + 17.77 return 0; 17.78 } 17.79 17.80 static void __xu_port_disconnect(xu_port_object *xup) 17.81 { 17.82 - if ( xup->mem_fd == -1 ) 17.83 - return; 17.84 - unmap_control_interface(xup->mem_fd, xup->interface); 17.85 - (void)close(xup->mem_fd); 17.86 - xup->mem_fd = -1; 17.87 + if ( xup->connected ) 17.88 + unmap_control_interface(xup->xc_handle, xup->interface); 17.89 + xup->connected = 0; 17.90 } 17.91 17.92 static PyObject *xu_port_connect(PyObject *self, PyObject *args) 17.93 @@ -1057,8 +1048,8 @@ static PyObject *xu_port_new(PyObject *s 17.94 17.95 xup = PyObject_New(xu_port_object, &xu_port_type); 17.96 17.97 + xup->connected = 0; 17.98 xup->remote_dom = dom; 17.99 - xup->mem_fd = -1; /* currently disconnected */ 17.100 17.101 if ( (xup->xc_handle = xc_interface_open()) == -1 ) 17.102 {
18.1 --- a/xen/arch/x86/domain.c Fri Aug 20 09:40:30 2004 +0000 18.2 +++ b/xen/arch/x86/domain.c Sat Aug 21 10:28:38 2004 +0000 18.3 @@ -472,13 +472,19 @@ void domain_relinquish_memory(struct dom 18.4 */ 18.5 destroy_gdt(d); 18.6 18.7 - /* Relinquish Xen-heap pages. Currently this can only be 'shared_info'. */ 18.8 - page = virt_to_page(d->shared_info); 18.9 - if ( test_and_clear_bit(_PGC_allocated, &page->u.inuse.count_info) ) 18.10 - put_page(page); 18.11 + /* Use a recursive lock, as we may enter 'free_domheap_page'. */ 18.12 + spin_lock_recursive(&d->page_alloc_lock); 18.13 + 18.14 + /* Relinquish Xen-heap pages. */ 18.15 + list_for_each_safe ( ent, tmp, &d->xenpage_list ) 18.16 + { 18.17 + page = list_entry(ent, struct pfn_info, list); 18.18 + 18.19 + if ( test_and_clear_bit(_PGC_allocated, &page->u.inuse.count_info) ) 18.20 + put_page(page); 18.21 + } 18.22 18.23 /* Relinquish all pages on the domain's allocation list. */ 18.24 - spin_lock_recursive(&d->page_alloc_lock); /* may enter free_domheap_page */ 18.25 list_for_each_safe ( ent, tmp, &d->page_list ) 18.26 { 18.27 page = list_entry(ent, struct pfn_info, list); 18.28 @@ -507,6 +513,7 @@ void domain_relinquish_memory(struct dom 18.29 } 18.30 while ( unlikely(y != x) ); 18.31 } 18.32 + 18.33 spin_unlock_recursive(&d->page_alloc_lock); 18.34 } 18.35
19.1 --- a/xen/arch/x86/memory.c Fri Aug 20 09:40:30 2004 +0000 19.2 +++ b/xen/arch/x86/memory.c Sat Aug 21 10:28:38 2004 +0000 19.3 @@ -864,12 +864,17 @@ static int do_extended_command(unsigned 19.4 case MMUEXT_SET_FOREIGNDOM: 19.5 domid = (domid_t)(val >> 16); 19.6 19.7 + if ( (e = percpu_info[cpu].foreign) != NULL ) 19.8 + put_domain(e); 19.9 + percpu_info[cpu].foreign = NULL; 19.10 + 19.11 if ( !IS_PRIV(d) ) 19.12 { 19.13 switch ( domid ) 19.14 { 19.15 case DOMID_IO: 19.16 - get_knownalive_domain(e = dom_io); 19.17 + get_knownalive_domain(dom_io); 19.18 + percpu_info[cpu].foreign = dom_io; 19.19 break; 19.20 default: 19.21 MEM_LOG("Dom %u cannot set foreign dom\n", d->domain); 19.22 @@ -879,19 +884,18 @@ static int do_extended_command(unsigned 19.23 } 19.24 else 19.25 { 19.26 - if ( (e = percpu_info[cpu].foreign) != NULL ) 19.27 - put_domain(e); 19.28 - 19.29 percpu_info[cpu].foreign = e = find_domain_by_id(domid); 19.30 if ( e == NULL ) 19.31 { 19.32 switch ( domid ) 19.33 { 19.34 case DOMID_XEN: 19.35 - get_knownalive_domain(e = dom_xen); 19.36 + get_knownalive_domain(dom_xen); 19.37 + percpu_info[cpu].foreign = dom_xen; 19.38 break; 19.39 case DOMID_IO: 19.40 - get_knownalive_domain(e = dom_io); 19.41 + get_knownalive_domain(dom_io); 19.42 + percpu_info[cpu].foreign = dom_io; 19.43 break; 19.44 default: 19.45 MEM_LOG("Unknown domain '%u'", domid);
20.1 --- a/xen/arch/x86/shadow.c Fri Aug 20 09:40:30 2004 +0000 20.2 +++ b/xen/arch/x86/shadow.c Sat Aug 21 10:28:38 2004 +0000 20.3 @@ -440,13 +440,10 @@ int shadow_mode_control(struct domain *d 20.4 unsigned int cmd = sc->op; 20.5 int rc = 0; 20.6 20.7 - if (d == current) 20.8 - printk("Attempt to control your _own_ shadow tables. I hope you know what you're doing!\n"); 20.9 + domain_pause(d); 20.10 + synchronise_pagetables(~0UL); 20.11 20.12 - domain_pause(d); 20.13 - synchronise_pagetables(d->processor); 20.14 - 20.15 - spin_lock(&d->mm.shadow_lock); 20.16 + spin_lock(&d->mm.shadow_lock); 20.17 20.18 if ( cmd == DOM0_SHADOW_CONTROL_OP_OFF ) 20.19 { 20.20 @@ -475,7 +472,7 @@ int shadow_mode_control(struct domain *d 20.21 20.22 spin_unlock(&d->mm.shadow_lock); 20.23 20.24 - domain_unpause(d); 20.25 + domain_unpause(d); 20.26 20.27 return rc; 20.28 }
21.1 --- a/xen/common/domain.c Fri Aug 20 09:40:30 2004 +0000 21.2 +++ b/xen/common/domain.c Sat Aug 21 10:28:38 2004 +0000 21.3 @@ -45,7 +45,7 @@ struct domain *do_createdomain(domid_t d 21.4 21.5 spin_lock_init(&d->page_alloc_lock); 21.6 INIT_LIST_HEAD(&d->page_list); 21.7 - d->max_pages = d->tot_pages = 0; 21.8 + INIT_LIST_HEAD(&d->xenpage_list); 21.9 21.10 /* Per-domain PCI-device list. */ 21.11 spin_lock_init(&d->pcidev_lock); 21.12 @@ -53,12 +53,13 @@ struct domain *do_createdomain(domid_t d 21.13 21.14 if ( d->domain != IDLE_DOMAIN_ID ) 21.15 { 21.16 - if ( init_event_channels(d) != 0 ) 21.17 + if ( (init_event_channels(d) != 0) || (grant_table_create(d) != 0) ) 21.18 { 21.19 + destroy_event_channels(d); 21.20 free_domain_struct(d); 21.21 return NULL; 21.22 } 21.23 - 21.24 + 21.25 /* We use a large intermediate to avoid overflow in sprintf. */ 21.26 sprintf(buf, "Domain-%u", dom_id); 21.27 strncpy(d->name, buf, MAX_DOMAIN_NAME); 21.28 @@ -256,6 +257,7 @@ void domain_destruct(struct domain *d) 21.29 write_unlock_irqrestore(&tasklist_lock, flags); 21.30 21.31 destroy_event_channels(d); 21.32 + grant_table_destroy(d); 21.33 21.34 free_perdomain_pt(d); 21.35 free_xenheap_page((unsigned long)d->shared_info);
22.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 22.2 +++ b/xen/common/grant_table.c Sat Aug 21 10:28:38 2004 +0000 22.3 @@ -0,0 +1,134 @@ 22.4 +/****************************************************************************** 22.5 + * common/grant_table.c 22.6 + * 22.7 + * Mechanism for granting foreign access to page frames, and receiving 22.8 + * page-ownership transfers. 22.9 + * 22.10 + * Copyright (c) 2004 K A Fraser 22.11 + * 22.12 + * This program is free software; you can redistribute it and/or modify 22.13 + * it under the terms of the GNU General Public License as published by 22.14 + * the Free Software Foundation; either version 2 of the License, or 22.15 + * (at your option) any later version. 22.16 + * 22.17 + * This program is distributed in the hope that it will be useful, 22.18 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 22.19 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22.20 + * GNU General Public License for more details. 22.21 + * 22.22 + * You should have received a copy of the GNU General Public License 22.23 + * along with this program; if not, write to the Free Software 22.24 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22.25 + */ 22.26 + 22.27 +#define __GRANT_TABLE_IMPLEMENTATION__ 22.28 +typedef struct grant_table grant_table_t; 22.29 + 22.30 +#include <xen/config.h> 22.31 +#include <xen/sched.h> 22.32 +#include <hypervisor-ifs/grant_table.h> 22.33 + 22.34 +/* Active grant entry - used for shadowing GTF_permit_access grants. */ 22.35 +typedef struct { 22.36 + u32 counts; /* Reference count information. */ 22.37 + u16 next; /* Mapping hash chain. */ 22.38 + domid_t domid; /* Domain being granted access. */ 22.39 + unsigned long frame; /* Frame being granted. */ 22.40 +} active_grant_entry_t; 22.41 + 22.42 +/* Bitfields in active_grant_entry_t:counts. */ 22.43 + /* Grant is pinned by 'domid' for read mappings and I/O. */ 22.44 +#define _GNTCNT_read_pinned (0) 22.45 +#define GNTCNT_read_pinned (1<<_GNTCNT_read_pinned) 22.46 + /* Grant is pinned by 'domid' for write mappings and I/O. */ 22.47 +#define _GNTCNT_write_pinned (1) 22.48 +#define GNTCNT_write_pinned (1<<_GNTCNT_write_pinned) 22.49 + /* Grant is pinned in IOMMU (read-only unless GNTCNT_write_pinned). */ 22.50 +#define _GNTCNT_io_pinned (2) 22.51 +#define GNTCNT_io_pinned (1<<_GNTCNT_io_pinned) 22.52 + /* Grant is mappable (read-only unless GNTCNT_write_pinned). */ 22.53 +#define _GNTCNT_mappable (3) 22.54 +#define GNTCNT_mappable (1<<_GNTCNT_mappable) 22.55 + /* Count of writable page mappings. (!GNTCNT_write_pinned => count==0). */ 22.56 +#define GNTCNT_wmap_shift (4) 22.57 +#define GNTCNT_wmap_mask (0x3FFFU << GNTCNT_wmap_shift) 22.58 + /* Count of read-only page mappings. */ 22.59 +#define GNTCNT_rmap_shift (18) 22.60 +#define GNTCNT_rmap_mask (0x3FFFU << GNTCNT_rmap_shift) 22.61 + 22.62 +#define MAPHASH_SZ (256) 22.63 +#define MAPHASH(_k) ((_k) & (MAPHASH_SZ-1)) 22.64 +#define MAPHASH_INVALID (0xFFFFU) 22.65 + 22.66 +#define NR_GRANT_ENTRIES (PAGE_SIZE / sizeof(grant_entry_t)) 22.67 + 22.68 +/* Per-domain grant information. */ 22.69 +struct grant_table { 22.70 + /* Shared grant table (see include/hypervisor-ifs/grant_table.h). */ 22.71 + grant_entry_t *shared; 22.72 + /* Active grant table. */ 22.73 + active_grant_entry_t *active; 22.74 + /* Lock protecting updates to maphash and shared grant table. */ 22.75 + spinlock_t lock; 22.76 + /* Hash table: frame -> active grant entry. */ 22.77 + u16 maphash[MAPHASH_SZ]; 22.78 +}; 22.79 + 22.80 +int grant_table_create(struct domain *d) 22.81 +{ 22.82 + grant_table_t *t; 22.83 + int i; 22.84 + 22.85 + if ( (t = xmalloc(sizeof(grant_table_t))) == NULL ) 22.86 + goto no_mem; 22.87 + 22.88 + /* Simple stuff. */ 22.89 + t->shared = NULL; 22.90 + t->active = NULL; 22.91 + spin_lock_init(&t->lock); 22.92 + for ( i = 0; i < MAPHASH_SZ; i++ ) 22.93 + t->maphash[i] = MAPHASH_INVALID; 22.94 + 22.95 + /* Active grant-table page. */ 22.96 + if ( (t->active = xmalloc(sizeof(active_grant_entry_t) * 22.97 + NR_GRANT_ENTRIES)) == NULL ) 22.98 + goto no_mem; 22.99 + 22.100 + /* Set up shared grant-table page. */ 22.101 + if ( (t->shared = (void *)alloc_xenheap_page()) == NULL ) 22.102 + goto no_mem; 22.103 + memset(t->shared, 0, PAGE_SIZE); 22.104 + SHARE_PFN_WITH_DOMAIN(virt_to_page(t->shared), d); 22.105 + 22.106 + /* Okay, install the structure. */ 22.107 + d->grant_table = t; 22.108 + return 0; 22.109 + 22.110 + no_mem: 22.111 + if ( t != NULL ) 22.112 + { 22.113 + if ( t->active != NULL ) 22.114 + xfree(t->active); 22.115 + xfree(t); 22.116 + } 22.117 + return -ENOMEM; 22.118 +} 22.119 + 22.120 +void grant_table_destroy(struct domain *d) 22.121 +{ 22.122 + grant_table_t *t; 22.123 + 22.124 + if ( (t = d->grant_table) != NULL ) 22.125 + { 22.126 + /* Free memory relating to this grant table. */ 22.127 + d->grant_table = NULL; 22.128 + free_xenheap_page((unsigned long)t->shared); 22.129 + xfree(t->active); 22.130 + xfree(t); 22.131 + } 22.132 +} 22.133 + 22.134 +void grant_table_init(void) 22.135 +{ 22.136 + /* Nothing. */ 22.137 +}
23.1 --- a/xen/common/kernel.c Fri Aug 20 09:40:30 2004 +0000 23.2 +++ b/xen/common/kernel.c Sat Aug 21 10:28:38 2004 +0000 23.3 @@ -304,6 +304,8 @@ void cmain(multiboot_info_t *mbi) 23.4 23.5 start_of_day(); 23.6 23.7 + grant_table_init(); 23.8 + 23.9 /* Create initial domain 0. */ 23.10 new_dom = do_createdomain(0, 0); 23.11 if ( new_dom == NULL )
24.1 --- a/xen/common/page_alloc.c Fri Aug 20 09:40:30 2004 +0000 24.2 +++ b/xen/common/page_alloc.c Sat Aug 21 10:28:38 2004 +0000 24.3 @@ -418,6 +418,8 @@ void free_domheap_pages(struct pfn_info 24.4 if ( unlikely(IS_XEN_HEAP_FRAME(pg)) ) 24.5 { 24.6 spin_lock_recursive(&d->page_alloc_lock); 24.7 + for ( i = 0; i < (1 << order); i++ ) 24.8 + list_del(&pg[i].list); 24.9 d->xenheap_pages -= 1 << order; 24.10 drop_dom_ref = (d->xenheap_pages == 0); 24.11 spin_unlock_recursive(&d->page_alloc_lock);
25.1 --- a/xen/include/asm-x86/mm.h Fri Aug 20 09:40:30 2004 +0000 25.2 +++ b/xen/include/asm-x86/mm.h Sat Aug 21 10:28:38 2004 +0000 25.3 @@ -109,6 +109,7 @@ struct pfn_info 25.4 (_pfn)->u.inuse.count_info = PGC_allocated | 1; \ 25.5 if ( unlikely((_dom)->xenheap_pages++ == 0) ) \ 25.6 get_knownalive_domain(_dom); \ 25.7 + list_add_tail(&(_pfn)->list, &(_dom)->xenpage_list); \ 25.8 spin_unlock(&(_dom)->page_alloc_lock); \ 25.9 } while ( 0 ) 25.10
26.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 26.2 +++ b/xen/include/xen/grant_table.h Sat Aug 21 10:28:38 2004 +0000 26.3 @@ -0,0 +1,38 @@ 26.4 +/****************************************************************************** 26.5 + * include/xen/grant_table.h 26.6 + * 26.7 + * Mechanism for granting foreign access to page frames, and receiving 26.8 + * page-ownership transfers. 26.9 + * 26.10 + * Copyright (c) 2004 K A Fraser 26.11 + * 26.12 + * This program is free software; you can redistribute it and/or modify 26.13 + * it under the terms of the GNU General Public License as published by 26.14 + * the Free Software Foundation; either version 2 of the License, or 26.15 + * (at your option) any later version. 26.16 + * 26.17 + * This program is distributed in the hope that it will be useful, 26.18 + * but WITHOUT ANY WARRANTY; without even the implied warranty of 26.19 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 26.20 + * GNU General Public License for more details. 26.21 + * 26.22 + * You should have received a copy of the GNU General Public License 26.23 + * along with this program; if not, write to the Free Software 26.24 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 26.25 + */ 26.26 + 26.27 +#ifndef __XEN_GRANT_H__ 26.28 +#define __XEN_GRANT_H__ 26.29 + 26.30 +#ifndef __GRANT_TABLE_IMPLEMENTATION__ 26.31 +typedef void grant_table_t; 26.32 +#endif 26.33 + 26.34 +/* Start-of-day system initialisation. */ 26.35 +void grant_table_init(void); 26.36 + 26.37 +/* Create/destroy per-domain grant table context. */ 26.38 +int grant_table_create(struct domain *d); 26.39 +void grant_table_destroy(struct domain *d); 26.40 + 26.41 +#endif /* __XEN_GRANT_H__ */
27.1 --- a/xen/include/xen/sched.h Fri Aug 20 09:40:30 2004 +0000 27.2 +++ b/xen/include/xen/sched.h Sat Aug 21 10:28:38 2004 +0000 27.3 @@ -4,16 +4,13 @@ 27.4 #include <xen/config.h> 27.5 #include <xen/types.h> 27.6 #include <xen/spinlock.h> 27.7 -#ifdef LINUX_2_6 27.8 -#include <linux/thread_info.h> 27.9 -#endif 27.10 #include <asm/ptrace.h> 27.11 #include <xen/smp.h> 27.12 #include <asm/page.h> 27.13 #include <asm/processor.h> 27.14 #include <hypervisor-ifs/hypervisor-if.h> 27.15 #include <hypervisor-ifs/dom0_ops.h> 27.16 - 27.17 +#include <xen/grant_table.h> 27.18 #include <xen/list.h> 27.19 #include <xen/time.h> 27.20 #include <xen/ac_timer.h> 27.21 @@ -95,6 +92,7 @@ struct domain 27.22 27.23 spinlock_t page_alloc_lock; /* protects all the following fields */ 27.24 struct list_head page_list; /* linked list, of size tot_pages */ 27.25 + struct list_head xenpage_list; /* linked list, of size xenheap_pages */ 27.26 unsigned int tot_pages; /* number of pages currently possesed */ 27.27 unsigned int max_pages; /* maximum value for tot_pages */ 27.28 unsigned int xenheap_pages; /* # pages allocated from Xen heap */ 27.29 @@ -121,6 +119,8 @@ struct domain 27.30 unsigned int max_event_channel; 27.31 spinlock_t event_channel_lock; 27.32 27.33 + grant_table_t *grant_table; 27.34 + 27.35 /* 27.36 * Interrupt to event-channel mappings. Updates should be protected by the 27.37 * domain's event-channel spinlock. Read accesses can also synchronise on