Xen 
 
Home About Xen.org Xen Xen Summit Wiki Mailing List Bug Tracker Xen Downloads
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] merge with xen-unstable.hg

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] merge with xen-unstable.hg
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 30 Aug 2006 22:10:29 +0000
Delivery-date: Wed, 30 Aug 2006 15:13:30 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User awilliam@xxxxxxxxxxx
# Node ID 79afceca906517b24cf9a94264a7f7ff97d9f458
# Parent  91169603a8e8dded9eba6cb6c3421b5d58a85a97
# Parent  0bb18319b8a0ee957ea9307ac3d9e40c31b456d4
merge with xen-unstable.hg
---
 extras/mini-os/include/hypercall-x86_32.h                                      
          |  326 
 extras/mini-os/include/hypercall-x86_64.h                                      
          |  326 
 extras/mini-os/include/os.h                                                    
          |  561 -
 extras/mini-os/include/spinlock.h                                              
          |  121 
 extras/mini-os/include/traps.h                                                 
          |   73 
 extras/mini-os/traps.c                                                         
          |  229 
 tools/ioemu/patches/qemu-fix-write-to-disk-synchronous                         
          |   66 
 tools/libxc/xc_ppc_linux_build.c                                               
          |  414 
 xen/arch/x86/audit.c                                                           
          |  984 --
 xen/arch/x86/shadow.c                                                          
          | 4199 ---------
 xen/arch/x86/shadow32.c                                                        
          | 3782 --------
 xen/arch/x86/shadow_guest32.c                                                  
          |   16 
 xen/arch/x86/shadow_guest32pae.c                                               
          |   16 
 xen/arch/x86/shadow_public.c                                                   
          | 2138 ----
 xen/include/asm-x86/shadow_64.h                                                
          |  587 -
 xen/include/asm-x86/shadow_ops.h                                               
          |  138 
 xen/include/asm-x86/shadow_public.h                                            
          |   61 
 .hgignore                                                                      
          |   17 
 buildconfigs/Rules.mk                                                          
          |    8 
 docs/src/user.tex                                                              
          |   13 
 extras/mini-os/Makefile                                                        
          |   53 
 extras/mini-os/arch/x86/traps.c                                                
          |  229 
 extras/mini-os/console/xencons_ring.c                                          
          |    8 
 extras/mini-os/include/hypervisor.h                                            
          |    3 
 extras/mini-os/include/types.h                                                 
          |    4 
 extras/mini-os/include/x86/os.h                                                
          |  561 +
 extras/mini-os/include/x86/spinlock.h                                          
          |  121 
 extras/mini-os/include/x86/traps.h                                             
          |   73 
 extras/mini-os/include/x86/x86_32/hypercall-x86_32.h                           
          |  326 
 extras/mini-os/include/x86/x86_64/hypercall-x86_64.h                           
          |  326 
 linux-2.6-xen-sparse/arch/i386/kernel/cpu/mtrr/main-xen.c                      
          |    2 
 linux-2.6-xen-sparse/arch/i386/kernel/io_apic-xen.c                            
          |    2 
 linux-2.6-xen-sparse/arch/i386/kernel/setup-xen.c                              
          |   55 
 linux-2.6-xen-sparse/arch/i386/kernel/swiotlb.c                                
          |    2 
 linux-2.6-xen-sparse/arch/i386/kernel/time-xen.c                               
          |    8 
 linux-2.6-xen-sparse/arch/i386/kernel/vmlinux.lds.S                            
          |   12 
 linux-2.6-xen-sparse/arch/i386/mm/init-xen.c                                   
          |    2 
 linux-2.6-xen-sparse/arch/i386/mm/ioremap-xen.c                                
          |    9 
 linux-2.6-xen-sparse/arch/i386/pci/irq-xen.c                                   
          |    6 
 linux-2.6-xen-sparse/arch/ia64/dig/setup.c                                     
          |  110 
 linux-2.6-xen-sparse/arch/ia64/kernel/setup.c                                  
          |    7 
 linux-2.6-xen-sparse/arch/ia64/xen/hypervisor.c                                
          |    2 
 linux-2.6-xen-sparse/arch/x86_64/kernel/entry-xen.S                            
          |   12 
 linux-2.6-xen-sparse/arch/x86_64/kernel/setup-xen.c                            
          |   74 
 linux-2.6-xen-sparse/arch/x86_64/mm/init-xen.c                                 
          |    8 
 linux-2.6-xen-sparse/drivers/char/tpm/tpm_xen.c                                
          |    8 
 linux-2.6-xen-sparse/drivers/xen/Kconfig                                       
          |    2 
 linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c                             
          |   35 
 linux-2.6-xen-sparse/drivers/xen/blkback/blkback.c                             
          |    4 
 linux-2.6-xen-sparse/drivers/xen/blkback/common.h                              
          |    8 
 linux-2.6-xen-sparse/drivers/xen/blkback/xenbus.c                              
          |   12 
 linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c                           
          |    3 
 linux-2.6-xen-sparse/drivers/xen/blktap/blktap.c                               
          |   12 
 linux-2.6-xen-sparse/drivers/xen/blktap/common.h                               
          |    4 
 linux-2.6-xen-sparse/drivers/xen/blktap/xenbus.c                               
          |    5 
 linux-2.6-xen-sparse/drivers/xen/console/console.c                             
          |   14 
 linux-2.6-xen-sparse/drivers/xen/console/xencons_ring.c                        
          |    8 
 linux-2.6-xen-sparse/drivers/xen/core/cpu_hotplug.c                            
          |    2 
 linux-2.6-xen-sparse/drivers/xen/core/evtchn.c                                 
          |    3 
 linux-2.6-xen-sparse/drivers/xen/core/gnttab.c                                 
          |   54 
 linux-2.6-xen-sparse/drivers/xen/core/reboot.c                                 
          |    3 
 linux-2.6-xen-sparse/drivers/xen/core/skbuff.c                                 
          |    3 
 linux-2.6-xen-sparse/drivers/xen/core/smpboot.c                                
          |   20 
 linux-2.6-xen-sparse/drivers/xen/netback/common.h                              
          |    9 
 linux-2.6-xen-sparse/drivers/xen/netback/loopback.c                            
          |    2 
 linux-2.6-xen-sparse/drivers/xen/netback/netback.c                             
          |  382 
 linux-2.6-xen-sparse/drivers/xen/netback/xenbus.c                              
          |   39 
 linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c                           
          |  682 -
 linux-2.6-xen-sparse/drivers/xen/pciback/xenbus.c                              
          |    1 
 linux-2.6-xen-sparse/drivers/xen/pcifront/xenbus.c                             
          |    1 
 linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c                             
          |   12 
 linux-2.6-xen-sparse/drivers/xen/tpmback/xenbus.c                              
          |    6 
 linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_client.c                        
          |    2 
 linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_comms.c                         
          |   15 
 linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_comms.h                         
          |    2 
 linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_dev.c                           
          |    6 
 linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c                         
          |  147 
 linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_xs.c                            
          |   10 
 linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/hypercall.h                 
          |   29 
 linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/hypervisor.h                
          |   15 
 linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/maddr.h                     
          |  160 
 linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/page.h                      
          |  129 
 linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/pgtable-2level.h            
          |    1 
 linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/pgtable-3level.h            
          |   12 
 linux-2.6-xen-sparse/include/asm-ia64/hypervisor.h                             
          |    2 
 linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/hypercall.h               
          |   29 
 linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/maddr.h                   
          |  139 
 linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/page.h                    
          |  122 
 linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/pgtable.h                 
          |   22 
 linux-2.6-xen-sparse/include/xen/balloon.h                                     
          |   10 
 linux-2.6-xen-sparse/include/xen/hvm.h                                         
          |   24 
 linux-2.6-xen-sparse/include/xen/xenbus.h                                      
          |    3 
 linux-2.6-xen-sparse/mm/memory.c                                               
          |    5 
 linux-2.6-xen-sparse/net/core/dev.c                                            
          |   10 
 patches/linux-2.6.16.13/net-gso-4-kill-warnon.patch                            
          |   28 
 patches/linux-2.6.16.13/series                                                 
          |   22 
 
patches/linux-2.6.16.13/x86-put-note-sections-into-a-pt_note-segment-in-vmlinux.patch
    |   70 
 
patches/linux-2.6.16.13/x86_64-put-note-sections-into-a-pt_note-segment-in-vmlinux.patch
 |   47 
 tools/blktap/lib/Makefile                                                      
          |    2 
 tools/examples/xen-network-common.sh                                           
          |    1 
 tools/examples/xend-config.sxp                                                 
          |    2 
 tools/examples/xmexample.hvm                                                   
          |    8 
 tools/examples/xmexample.vti                                                   
          |    4 
 tools/firmware/acpi/acpi_fadt.h                                                
          |    3 
 tools/firmware/hvmloader/Makefile                                              
          |    8 
 tools/firmware/hvmloader/hvmloader.c                                           
          |   22 
 tools/firmware/hvmloader/hypercall.h                                           
          |    2 
 tools/firmware/hvmloader/smbios.c                                              
          |  606 +
 tools/firmware/hvmloader/smbios.h                                              
          |   38 
 tools/firmware/hvmloader/smbios_types.h                                        
          |  182 
 tools/firmware/hvmloader/util.c                                                
          |   80 
 tools/firmware/hvmloader/util.h                                                
          |   12 
 tools/firmware/rombios/apmbios.S                                               
          |    3 
 tools/firmware/rombios/rombios.c                                               
          |   45 
 tools/firmware/vmxassist/head.S                                                
          |    5 
 tools/firmware/vmxassist/setup.c                                               
          |    8 
 tools/firmware/vmxassist/util.h                                                
          |   20 
 tools/firmware/vmxassist/vm86.c                                                
          |  103 
 tools/firmware/vmxassist/vmxassist.ld                                          
          |   12 
 tools/ioemu/Makefile.target                                                    
          |    1 
 tools/ioemu/block-bochs.c                                                      
          |    2 
 tools/ioemu/block-cloop.c                                                      
          |    2 
 tools/ioemu/block-cow.c                                                        
          |    2 
 tools/ioemu/block-qcow.c                                                       
          |    2 
 tools/ioemu/block-vmdk.c                                                       
          |    2 
 tools/ioemu/block.c                                                            
          |    2 
 tools/ioemu/hw/ide.c                                                           
          |   17 
 tools/ioemu/hw/pc.c                                                            
          |   72 
 tools/ioemu/hw/piix4acpi.c                                                     
          |    4 
 tools/ioemu/hw/piix_pci.c                                                      
          |    2 
 tools/ioemu/hw/xen_platform.c                                                  
          |  138 
 tools/ioemu/patches/acpi-poweroff-support                                      
          |    2 
 tools/ioemu/patches/acpi-support                                               
          |   50 
 tools/ioemu/patches/acpi-timer-support                                         
          |    6 
 tools/ioemu/patches/domain-destroy                                             
          |    8 
 tools/ioemu/patches/domain-reset                                               
          |   10 
 tools/ioemu/patches/domain-timeoffset                                          
          |   12 
 tools/ioemu/patches/hypervisor-pit                                             
          |    6 
 tools/ioemu/patches/ide-hd-multithread                                         
          |    2 
 tools/ioemu/patches/ioemu-ia64                                                 
          |   45 
 tools/ioemu/patches/qemu-allow-disable-sdl                                     
          |    2 
 tools/ioemu/patches/qemu-bootorder                                             
          |  124 
 tools/ioemu/patches/qemu-daemonize                                             
          |   16 
 tools/ioemu/patches/qemu-fix-memset-args                                       
          |    2 
 tools/ioemu/patches/qemu-tunable-ide-write-cache                               
          |   39 
 tools/ioemu/patches/serial-non-block                                           
          |    2 
 tools/ioemu/patches/series                                                     
          |    5 
 tools/ioemu/patches/shadow-vram                                                
          |    4 
 tools/ioemu/patches/shared-vram                                                
          |   14 
 tools/ioemu/patches/support-xm-console                                         
          |    2 
 tools/ioemu/patches/vnc-access-monitor-vt                                      
          |    2 
 tools/ioemu/patches/vnc-cleanup                                                
          |    4 
 tools/ioemu/patches/vnc-display-find-unused                                    
          |   10 
 tools/ioemu/patches/vnc-fixes                                                  
          |   10 
 tools/ioemu/patches/vnc-start-vncviewer                                        
          |   10 
 tools/ioemu/patches/vnc-title-domain-name                                      
          |    2 
 tools/ioemu/patches/xen-mm                                                     
          |   36 
 tools/ioemu/patches/xen-platform-device                                        
          |   37 
 tools/ioemu/patches/xen-support-buffered-ioreqs                                
          |   26 
 tools/ioemu/patches/xenstore-block-device-config                               
          |   23 
 tools/ioemu/patches/xenstore-write-vnc-port                                    
          |   10 
 tools/ioemu/target-i386-dm/exec-dm.c                                           
          |    6 
 tools/ioemu/vl.c                                                               
          |   95 
 tools/ioemu/vl.h                                                               
          |   11 
 tools/libaio/src/Makefile                                                      
          |    7 
 tools/libxc/Makefile                                                           
          |    7 
 tools/libxc/ia64/xc_ia64_linux_restore.c                                       
          |    4 
 tools/libxc/powerpc64/Makefile                                                 
          |    1 
 tools/libxc/powerpc64/xc_linux_build.c                                         
          |  408 
 tools/libxc/xc_domain.c                                                        
          |   13 
 tools/libxc/xc_evtchn.c                                                        
          |   11 
 tools/libxc/xc_hvm_build.c                                                     
          |  212 
 tools/libxc/xc_linux.c                                                         
          |   30 
 tools/libxc/xc_linux_build.c                                                   
          |   22 
 tools/libxc/xc_linux_restore.c                                                 
          |    7 
 tools/libxc/xc_linux_save.c                                                    
          |   26 
 tools/libxc/xenctrl.h                                                          
          |    9 
 tools/misc/xc_shadow.c                                                         
          |    2 
 tools/python/xen/lowlevel/xc/xc.c                                              
          |  184 
 tools/python/xen/util/xmlrpclib2.py                                            
          |   12 
 tools/python/xen/web/httpserver.py                                             
          |    7 
 tools/python/xen/xend/XendCheckpoint.py                                        
          |    4 
 tools/python/xen/xend/XendDomain.py                                            
          |   24 
 tools/python/xen/xend/XendDomainInfo.py                                        
          |   59 
 tools/python/xen/xend/XendLogging.py                                           
          |   28 
 tools/python/xen/xend/XendNode.py                                              
          |    6 
 tools/python/xen/xend/image.py                                                 
          |   29 
 tools/python/xen/xend/server/DevController.py                                  
          |   22 
 tools/python/xen/xend/server/XMLRPCServer.py                                   
          |    4 
 tools/python/xen/xend/server/blkif.py                                          
          |   19 
 tools/python/xen/xm/create.py                                                  
          |    9 
 tools/python/xen/xm/main.py                                                    
          |   82 
 tools/xcutils/xc_restore.c                                                     
          |   23 
 tools/xcutils/xc_save.c                                                        
          |   28 
 tools/xenmon/Makefile                                                          
          |   10 
 tools/xenmon/xenbaked.c                                                        
          |   19 
 tools/xenstore/Makefile                                                        
          |    2 
 tools/xenstore/xs.c                                                            
          |   22 
 tools/xentrace/Makefile                                                        
          |    4 
 tools/xentrace/xentrace.c                                                      
          |   21 
 tools/xm-test/lib/XmTestLib/XenDevice.py                                       
          |    1 
 unmodified_drivers/linux-2.6/Makefile                                          
          |    6 
 unmodified_drivers/linux-2.6/README                                            
          |    7 
 unmodified_drivers/linux-2.6/blkfront/Kbuild                                   
          |    5 
 unmodified_drivers/linux-2.6/mkbuildtree                                       
          |   49 
 unmodified_drivers/linux-2.6/netfront/Kbuild                                   
          |    4 
 unmodified_drivers/linux-2.6/overrides.mk                                      
          |   12 
 unmodified_drivers/linux-2.6/platform-pci/Kbuild                               
          |    7 
 unmodified_drivers/linux-2.6/platform-pci/evtchn.c                             
          |  173 
 unmodified_drivers/linux-2.6/platform-pci/platform-pci.c                       
          |  271 
 unmodified_drivers/linux-2.6/platform-pci/platform-pci.h                       
          |   45 
 unmodified_drivers/linux-2.6/platform-pci/xen_support.c                        
          |   43 
 unmodified_drivers/linux-2.6/xenbus/Kbuild                                     
          |   10 
 xen/Rules.mk                                                                   
          |    6 
 xen/acm/acm_core.c                                                             
          |    4 
 xen/acm/acm_simple_type_enforcement_hooks.c                                    
          |   28 
 xen/arch/ia64/Rules.mk                                                         
          |    1 
 xen/arch/ia64/vmx/mmio.c                                                       
          |    2 
 xen/arch/ia64/vmx/vlsapic.c                                                    
          |    2 
 xen/arch/ia64/vmx/vmx_init.c                                                   
          |    5 
 xen/arch/ia64/vmx/vmx_vcpu.c                                                   
          |    2 
 xen/arch/ia64/xen/domain.c                                                     
          |   25 
 xen/arch/ia64/xen/hyperprivop.S                                                
          |    2 
 xen/arch/ia64/xen/mm.c                                                         
          |   26 
 xen/arch/ia64/xen/vcpu.c                                                       
          |    2 
 xen/arch/ia64/xen/xenasm.S                                                     
          |    2 
 xen/arch/powerpc/Makefile                                                      
          |    7 
 xen/arch/powerpc/boot_of.c                                                     
          |   57 
 xen/arch/powerpc/dom0_ops.c                                                    
          |   43 
 xen/arch/powerpc/domain.c                                                      
          |   42 
 xen/arch/powerpc/domain_build.c                                                
          |    6 
 xen/arch/powerpc/htab.c                                                        
          |   13 
 xen/arch/powerpc/mm.c                                                          
          |   20 
 xen/arch/powerpc/of_handler/devtree.c                                          
          |    2 
 xen/arch/powerpc/ofd_fixup.c                                                   
          |    8 
 xen/arch/powerpc/papr/xlate.c                                                  
          |    2 
 xen/arch/powerpc/powerpc64/ppc970.c                                            
          |   12 
 xen/arch/powerpc/setup.c                                                       
          |   41 
 xen/arch/powerpc/usercopy.c                                                    
          |    4 
 xen/arch/x86/Makefile                                                          
          |   16 
 xen/arch/x86/Rules.mk                                                          
          |    1 
 xen/arch/x86/acpi/boot.c                                                       
          |    2 
 xen/arch/x86/apic.c                                                            
          |   12 
 xen/arch/x86/boot/x86_32.S                                                     
          |   28 
 xen/arch/x86/cpu/amd.c                                                         
          |    2 
 xen/arch/x86/cpu/cyrix.c                                                       
          |    2 
 xen/arch/x86/cpu/transmeta.c                                                   
          |    2 
 xen/arch/x86/delay.c                                                           
          |   14 
 xen/arch/x86/dmi_scan.c                                                        
          |   10 
 xen/arch/x86/dom0_ops.c                                                        
          |    4 
 xen/arch/x86/domain.c                                                          
          |  127 
 xen/arch/x86/domain_build.c                                                    
          |   32 
 xen/arch/x86/e820.c                                                            
          |   12 
 xen/arch/x86/extable.c                                                         
          |    4 
 xen/arch/x86/genapic/bigsmp.c                                                  
          |    2 
 xen/arch/x86/genapic/es7000.h                                                  
          |    4 
 xen/arch/x86/genapic/probe.c                                                   
          |    2 
 xen/arch/x86/hvm/hvm.c                                                         
          |  130 
 xen/arch/x86/hvm/i8254.c                                                       
          |    2 
 xen/arch/x86/hvm/i8259.c                                                       
          |   15 
 xen/arch/x86/hvm/intercept.c                                                   
          |    2 
 xen/arch/x86/hvm/io.c                                                          
          |   31 
 xen/arch/x86/hvm/platform.c                                                    
          |   12 
 xen/arch/x86/hvm/svm/emulate.c                                                 
          |    4 
 xen/arch/x86/hvm/svm/instrlen.c                                                
          |    2 
 xen/arch/x86/hvm/svm/intr.c                                                    
          |   61 
 xen/arch/x86/hvm/svm/svm.c                                                     
          | 1084 +-
 xen/arch/x86/hvm/svm/vmcb.c                                                    
          |  226 
 xen/arch/x86/hvm/svm/x86_32/exits.S                                            
          |   12 
 xen/arch/x86/hvm/svm/x86_64/exits.S                                            
          |   23 
 xen/arch/x86/hvm/vioapic.c                                                     
          |   18 
 xen/arch/x86/hvm/vlapic.c                                                      
          |   70 
 xen/arch/x86/hvm/vmx/io.c                                                      
          |   98 
 xen/arch/x86/hvm/vmx/vmcs.c                                                    
          |   31 
 xen/arch/x86/hvm/vmx/vmx.c                                                     
          |  310 
 xen/arch/x86/hvm/vmx/x86_32/exits.S                                            
          |    4 
 xen/arch/x86/hvm/vmx/x86_64/exits.S                                            
          |    4 
 xen/arch/x86/i387.c                                                            
          |    2 
 xen/arch/x86/io_apic.c                                                         
          |    2 
 xen/arch/x86/irq.c                                                             
          |   87 
 xen/arch/x86/microcode.c                                                       
          |    4 
 xen/arch/x86/mm.c                                                              
          | 1142 --
 xen/arch/x86/mpparse.c                                                         
          |    2 
 xen/arch/x86/nmi.c                                                             
          |    8 
 xen/arch/x86/oprofile/nmi_int.c                                                
          |    4 
 xen/arch/x86/oprofile/op_model_p4.c                                            
          |    2 
 xen/arch/x86/oprofile/xenoprof.c                                               
          |    6 
 xen/arch/x86/setup.c                                                           
          |   70 
 xen/arch/x86/shadow2-common.c                                                  
          | 3406 +++++++
 xen/arch/x86/shadow2.c                                                         
          | 4492 +++++++++
 xen/arch/x86/smpboot.c                                                         
          |    2 
 xen/arch/x86/traps.c                                                           
          |   78 
 xen/arch/x86/x86_32/asm-offsets.c                                              
          |    1 
 xen/arch/x86/x86_32/domain_page.c                                              
          |   66 
 xen/arch/x86/x86_32/entry.S                                                    
          |  105 
 xen/arch/x86/x86_32/mm.c                                                       
          |   12 
 xen/arch/x86/x86_32/traps.c                                                    
          |    9 
 xen/arch/x86/x86_64/asm-offsets.c                                              
          |    1 
 xen/arch/x86/x86_64/entry.S                                                    
          |   50 
 xen/arch/x86/x86_64/mm.c                                                       
          |   13 
 xen/arch/x86/x86_64/traps.c                                                    
          |   18 
 xen/common/acm_ops.c                                                           
          |    1 
 xen/common/dom0_ops.c                                                          
          |    9 
 xen/common/domain.c                                                            
          |    8 
 xen/common/elf.c                                                               
          |    1 
 xen/common/grant_table.c                                                       
          |  301 
 xen/common/keyhandler.c                                                        
          |   48 
 xen/common/memory.c                                                            
          |    3 
 xen/common/rangeset.c                                                          
          |    1 
 xen/common/sched_bvt.c                                                         
          |    3 
 xen/common/sched_credit.c                                                      
          |    2 
 xen/common/sched_sedf.c                                                        
          |   22 
 xen/common/schedule.c                                                          
          |    5 
 xen/common/timer.c                                                             
          |    6 
 xen/common/trace.c                                                             
          |    1 
 xen/drivers/Makefile                                                           
          |    1 
 xen/drivers/char/console.c                                                     
          |  239 
 xen/drivers/char/serial.c                                                      
          |    1 
 xen/drivers/video/Makefile                                                     
          |    4 
 xen/drivers/video/font.h                                                       
          |   22 
 xen/drivers/video/font_8x14.c                                                  
          | 4118 ++++++++
 xen/drivers/video/font_8x16.c                                                  
          | 4630 ++++++++++
 xen/drivers/video/font_8x8.c                                                   
          | 2582 +++++
 xen/drivers/video/vga.c                                                        
          |  690 +
 xen/include/acm/acm_core.h                                                     
          |    2 
 xen/include/asm-ia64/config.h                                                  
          |    2 
 xen/include/asm-ia64/domain.h                                                  
          |    2 
 xen/include/asm-ia64/event.h                                                   
          |    2 
 xen/include/asm-ia64/linux-null/asm/desc.h                                     
          |    1 
 xen/include/asm-ia64/linux-null/asm/ia32.h                                     
          |    1 
 xen/include/asm-ia64/linux-null/asm/mman.h                                     
          |    1 
 xen/include/asm-ia64/linux-null/asm/module.h                                   
          |    1 
 xen/include/asm-ia64/linux-null/asm/pdb.h                                      
          |    1 
 xen/include/asm-ia64/linux-null/asm/ptrace_offsets.h                           
          |    1 
 xen/include/asm-ia64/linux-null/asm/semaphore.h                                
          |    1 
 xen/include/asm-ia64/linux-null/asm/serial.h                                   
          |    1 
 xen/include/asm-ia64/linux-null/asm/sn/arch.h                                  
          |    1 
 xen/include/asm-ia64/linux-null/asm/sn/geo.h                                   
          |    1 
 xen/include/asm-ia64/linux-null/asm/sn/nodepda.h                               
          |    1 
 xen/include/asm-ia64/linux-null/asm/sn/sn_cpuid.h                              
          |    1 
 xen/include/asm-ia64/linux-null/asm/ustack.h                                   
          |    1 
 xen/include/asm-ia64/linux-null/linux/bootmem.h                                
          |    1 
 xen/include/asm-ia64/linux-null/linux/cpu.h                                    
          |    1 
 xen/include/asm-ia64/linux-null/linux/device.h                                 
          |    1 
 xen/include/asm-ia64/linux-null/linux/file.h                                   
          |    1 
 xen/include/asm-ia64/linux-null/linux/ioport.h                                 
          |    1 
 xen/include/asm-ia64/linux-null/linux/kallsyms.h                               
          |    1 
 xen/include/asm-ia64/linux-null/linux/kernel_stat.h                            
          |    1 
 xen/include/asm-ia64/linux-null/linux/mmzone.h                                 
          |    1 
 xen/include/asm-ia64/linux-null/linux/module.h                                 
          |    1 
 xen/include/asm-ia64/linux-null/linux/page-flags.h                             
          |    1 
 xen/include/asm-ia64/linux-null/linux/proc_fs.h                                
          |    1 
 xen/include/asm-ia64/linux-null/linux/profile.h                                
          |    1 
 xen/include/asm-ia64/linux-null/linux/ptrace.h                                 
          |    1 
 xen/include/asm-ia64/linux-null/linux/random.h                                 
          |    1 
 xen/include/asm-ia64/linux-null/linux/rtc.h                                    
          |    1 
 xen/include/asm-ia64/linux-null/linux/seq_file.h                               
          |    1 
 xen/include/asm-ia64/linux-null/linux/serial.h                                 
          |    1 
 xen/include/asm-ia64/linux-null/linux/serial_core.h                            
          |    1 
 xen/include/asm-ia64/linux-null/linux/signal.h                                 
          |    1 
 xen/include/asm-ia64/linux-null/linux/slab.h                                   
          |    1 
 xen/include/asm-ia64/linux-null/linux/smp_lock.h                               
          |    1 
 xen/include/asm-ia64/linux-null/linux/swap.h                                   
          |    1 
 xen/include/asm-ia64/linux-null/linux/threads.h                                
          |    1 
 xen/include/asm-ia64/linux-null/linux/tty.h                                    
          |    1 
 xen/include/asm-ia64/linux-null/linux/workqueue.h                              
          |    1 
 xen/include/asm-ia64/linux-xen/asm/ptrace.h                                    
          |    3 
 xen/include/asm-ia64/privop_stat.h                                             
          |    2 
 xen/include/asm-ia64/vcpu.h                                                    
          |    3 
 xen/include/asm-ia64/vmx_platform.h                                            
          |    1 
 xen/include/asm-ia64/vmx_vpd.h                                                 
          |    2 
 xen/include/asm-powerpc/config.h                                               
          |    1 
 xen/include/asm-powerpc/domain.h                                               
          |   13 
 xen/include/asm-powerpc/grant_table.h                                          
          |    2 
 xen/include/asm-powerpc/htab.h                                                 
          |    8 
 xen/include/asm-powerpc/mm.h                                                   
          |    4 
 xen/include/asm-powerpc/processor.h                                            
          |    1 
 xen/include/asm-powerpc/shadow.h                                               
          |   15 
 xen/include/asm-x86/acpi.h                                                     
          |    2 
 xen/include/asm-x86/bitops.h                                                   
          |   18 
 xen/include/asm-x86/config.h                                                   
          |   24 
 xen/include/asm-x86/domain.h                                                   
          |  116 
 xen/include/asm-x86/e820.h                                                     
          |   31 
 xen/include/asm-x86/genapic.h                                                  
          |    8 
 xen/include/asm-x86/grant_table.h                                              
          |    4 
 xen/include/asm-x86/hvm/domain.h                                               
          |    1 
 xen/include/asm-x86/hvm/hvm.h                                                  
          |   37 
 xen/include/asm-x86/hvm/io.h                                                   
          |    1 
 xen/include/asm-x86/hvm/support.h                                              
          |   15 
 xen/include/asm-x86/hvm/svm/svm.h                                              
          |   52 
 xen/include/asm-x86/hvm/svm/vmcb.h                                             
          |   32 
 xen/include/asm-x86/hvm/vcpu.h                                                 
          |   13 
 xen/include/asm-x86/hvm/vioapic.h                                              
          |    5 
 xen/include/asm-x86/hvm/vmx/vmcs.h                                             
          |    3 
 xen/include/asm-x86/hvm/vmx/vmx.h                                              
          |   74 
 xen/include/asm-x86/io.h                                                       
          |    1 
 xen/include/asm-x86/mach-es7000/mach_mpparse.h                                 
          |    2 
 xen/include/asm-x86/mach-generic/mach_mpparse.h                                
          |    4 
 xen/include/asm-x86/mm.h                                                       
          |  197 
 xen/include/asm-x86/msr.h                                                      
          |    6 
 xen/include/asm-x86/page-guest32.h                                             
          |    7 
 xen/include/asm-x86/page.h                                                     
          |   45 
 xen/include/asm-x86/perfc.h                                                    
          |   12 
 xen/include/asm-x86/perfc_defn.h                                               
          |   53 
 xen/include/asm-x86/processor.h                                                
          |   59 
 xen/include/asm-x86/shadow.h                                                   
          | 1791 ---
 xen/include/asm-x86/shadow2-multi.h                                            
          |  116 
 xen/include/asm-x86/shadow2-private.h                                          
          |  593 +
 xen/include/asm-x86/shadow2-types.h                                            
          |  705 +
 xen/include/asm-x86/shadow2.h                                                  
          |  626 +
 xen/include/asm-x86/string.h                                                   
          |    2 
 xen/include/asm-x86/system.h                                                   
          |    4 
 xen/include/asm-x86/uaccess.h                                                  
          |    6 
 xen/include/asm-x86/x86_32/page-2level.h                                       
          |    1 
 xen/include/asm-x86/x86_32/page-3level.h                                       
          |    3 
 xen/include/asm-x86/x86_64/page.h                                              
          |    5 
 xen/include/public/arch-ia64.h                                                 
          |    8 
 xen/include/public/arch-powerpc.h                                              
          |    6 
 xen/include/public/arch-x86_32.h                                               
          |   29 
 xen/include/public/arch-x86_64.h                                               
          |   29 
 xen/include/public/dom0_ops.h                                                  
          |   77 
 xen/include/public/grant_table.h                                               
          |   47 
 xen/include/public/hvm/e820.h                                                  
          |   32 
 xen/include/public/hvm/hvm_info_table.h                                        
          |    2 
 xen/include/public/xen-compat.h                                                
          |   23 
 xen/include/public/xen.h                                                       
          |   82 
 xen/include/xen/console.h                                                      
          |    3 
 xen/include/xen/domain_page.h                                                  
          |   37 
 xen/include/xen/gdbstub.h                                                      
          |   10 
 xen/include/xen/keyhandler.h                                                   
          |    6 
 xen/include/xen/lib.h                                                          
          |    6 
 xen/include/xen/list.h                                                         
          |   12 
 xen/include/xen/mm.h                                                           
          |    7 
 xen/include/xen/sched.h                                                        
          |    2 
 xen/include/xen/vga.h                                                          
          |   24 
 435 files changed, 32246 insertions(+), 20570 deletions(-)

diff -r 91169603a8e8 -r 79afceca9065 .hgignore
--- a/.hgignore Tue Aug 22 14:45:49 2006 -0600
+++ b/.hgignore Wed Aug 23 11:11:27 2006 -0600
@@ -151,7 +151,7 @@
 ^tools/vtpm_manager/manager/vtpm_managerd$
 ^tools/xcutils/xc_restore$
 ^tools/xcutils/xc_save$
-^tools/xenmon/setmask$
+^tools/xenmon/xentrace_setmask$
 ^tools/xenmon/xenbaked$
 ^tools/xenstat/xentop/xentop$
 ^tools/xenstore/testsuite/tmp/.*$
@@ -172,7 +172,7 @@
 ^tools/xenstore/xs_tdb_dump$
 ^tools/xenstore/xs_test$
 ^tools/xenstore/xs_watch_stress$
-^tools/xentrace/setsize$
+^tools/xentrace/xentrace_setsize$
 ^tools/xentrace/tbctl$
 ^tools/xentrace/xenctx$
 ^tools/xentrace/xentrace$
@@ -197,7 +197,12 @@
 ^xen/xen$
 ^xen/xen-syms$
 ^xen/xen\..*$
-^xen/arch/ppc/dom0\.bin$
-^xen/arch/ppc/asm-offsets\.s$
-^xen/arch/ppc/firmware
-^xen/arch/ppc/firmware_image
+^xen/arch/powerpc/dom0\.bin$
+^xen/arch/powerpc/asm-offsets\.s$
+^xen/arch/powerpc/firmware$
+^xen/arch/powerpc/firmware_image$
+^xen/arch/powerpc/xen\.lds$
+^unmodified_drivers/linux-2.6/\.tmp_versions
+^unmodified_drivers/linux-2.6/.*\.cmd$
+^unmodified_drivers/linux-2.6/.*\.ko$
+^unmodified_drivers/linux-2.6/.*\.mod\.c$
diff -r 91169603a8e8 -r 79afceca9065 buildconfigs/Rules.mk
--- a/buildconfigs/Rules.mk     Tue Aug 22 14:45:49 2006 -0600
+++ b/buildconfigs/Rules.mk     Wed Aug 23 11:11:27 2006 -0600
@@ -63,8 +63,12 @@ ref-%/.valid-ref: pristine-%/.valid-pris
        set -e
        rm -rf $(@D)
        cp -al $(<D) $(@D)
-       if [ -d patches/$* ] ; then \
-           for i in patches/$*/*.patch ; do patch -d $(@D) -p1 <$$i || exit 1 
; done ; \
+       if [ -d patches/$* ] ; then                                    \
+           echo Applying patches from patches/$*... ;                 \
+           for i in $$(cat patches/$*/series) ; do                    \
+               echo ... $$i ;                                         \
+               patch -d $(@D) -p1 --quiet <patches/$*/$$i || exit 1 ; \
+            done ;                                                    \
        fi
        touch $@ # update timestamp to avoid rebuild
 endif
diff -r 91169603a8e8 -r 79afceca9065 docs/src/user.tex
--- a/docs/src/user.tex Tue Aug 22 14:45:49 2006 -0600
+++ b/docs/src/user.tex Wed Aug 23 11:11:27 2006 -0600
@@ -1089,6 +1089,9 @@ The \path{xm list} command also supports
 The \path{xm list} command also supports a long output format when the
 \path{-l} switch is used.  This outputs the full details of the
 running domains in \xend's SXP configuration format.
+
+If you want to know how long your domains have been running for, then 
+you can use the \verb_# xm uptime_ command.
 
 
 You can get access to the console of a particular domain using 
@@ -3126,8 +3129,8 @@ editing \path{grub.conf}.
 \item [ console=$<$specifier list$>$ ] Specify the destination for Xen
   console I/O.  This is a comma-separated list of, for example:
   \begin{description}
-  \item[ vga ] Use VGA console (only until domain 0 boots, unless {\bf
-  vga[keep] } is specified).
+  \item[ vga ] Use VGA console (until domain 0 boots, unless {\bf
+  vga=keep } is specified).
   \item[ com1 ] Use serial port com1.
   \item[ com2H ] Use serial port com2. Transmitted chars will have the
     MSB set. Received chars must have MSB set.
@@ -3138,6 +3141,12 @@ editing \path{grub.conf}.
   subsystems (e.g.\ console and debugger). Sharing is controlled by
   MSB of each transmitted/received character.  [NB. Default for this
   option is `com1,vga']
+\item [ vga=$<$options$>$ ] This is a comma-separated list of options:
+  \begin{description}
+  \item[ text-$<$mode$>$ ] Select text-mode resolution, where mode is
+  one of 80x25, 80x28, 80x30, 80x34, 80x43, 80x50, 80x60.
+  \item[ keep ] Keep the VGA console even after domain 0 boots.
+  \end{description}
 \item [ sync\_console ] Force synchronous console output. This is
   useful if you system fails unexpectedly before it has sent all
   available output to the console. In most cases Xen will
diff -r 91169603a8e8 -r 79afceca9065 extras/mini-os/Makefile
--- a/extras/mini-os/Makefile   Tue Aug 22 14:45:49 2006 -0600
+++ b/extras/mini-os/Makefile   Wed Aug 23 11:11:27 2006 -0600
@@ -11,26 +11,54 @@ CFLAGS := -fno-builtin -Wall -Werror -Wr
 CFLAGS := -fno-builtin -Wall -Werror -Wredundant-decls -Wno-format
 CFLAGS += -Wstrict-prototypes -Wnested-externs -Wpointer-arith -Winline
 
-override CPPFLAGS := -Iinclude $(CPPFLAGS)
 ASFLAGS = -D__ASSEMBLY__
 
 LDLIBS =  -L. -lminios
 LDFLAGS := -N -T minios-$(TARGET_ARCH).lds
 
+# For possible special source directories.
+EXTRA_SRC =
+# For possible special header directories.
+EXTRA_INC =
+
+# Standard name for architecture specific subdirectories.
+TARGET_ARCH_DIR = $(TARGET_ARCH)
+# This is used for architecture specific links.
+ARCH_LINKS =
+
 ifeq ($(TARGET_ARCH),x86_32)
 CFLAGS += -m32 -march=i686
 LDFLAGS += -m elf_i386
+TARGET_ARCH_DIR = x86
+EXTRA_INC += $(TARGET_ARCH_DIR)/$(TARGET_ARCH)
+EXTRA_SRC += arch/$(EXTRA_INC)
 endif
 
 ifeq ($(TARGET_ARCH)$(pae),x86_32y)
 CFLAGS  += -DCONFIG_X86_PAE=1
 ASFLAGS += -DCONFIG_X86_PAE=1
+TARGET_ARCH_DIR = x86
+EXTRA_INC += $(TARGET_ARCH_DIR)/$(TARGET_ARCH)
+EXTRA_SRC += arch/$(EXTRA_INC)
 endif
 
 ifeq ($(TARGET_ARCH),x86_64)
 CFLAGS += -m64 -mno-red-zone -fpic -fno-reorder-blocks
 CFLAGS += -fno-asynchronous-unwind-tables
 LDFLAGS += -m elf_x86_64
+TARGET_ARCH_DIR = x86
+EXTRA_INC += $(TARGET_ARCH_DIR)/$(TARGET_ARCH)
+EXTRA_SRC += arch/$(EXTRA_INC)
+endif
+
+ifeq ($(TARGET_ARCH),ia64)
+CFLAGS += -mfixed-range=f12-f15,f32-f127
+ASFLAGS += -x assembler-with-cpp -ansi -Wall
+ASFLAGS += -mfixed-range=f12-f15,f32-f127
+ARCH_LINKS = IA64_LINKS                # Special link on ia64 needed
+define arch_links
+[ -e include/ia64/asm-xsi-offsets.h ] || ln -sf 
../../../../xen/include/asm-ia64/asm-xsi-offsets.h 
include/ia64/asm-xsi-offsets.h
+endef
 endif
 
 ifeq ($(debug),y)
@@ -39,6 +67,10 @@ CFLAGS += -O3
 CFLAGS += -O3
 endif
 
+# Add the special header directories to the include paths.
+extra_incl := $(foreach dir,$(EXTRA_INC),-Iinclude/$(dir))
+override CPPFLAGS := -Iinclude $(CPPFLAGS) -Iinclude/$(TARGET_ARCH_DIR)        
$(extra_incl)
+
 TARGET := mini-os
 
 HEAD := $(TARGET_ARCH).o
@@ -46,15 +78,32 @@ OBJS += $(patsubst %.c,%.o,$(wildcard li
 OBJS += $(patsubst %.c,%.o,$(wildcard lib/*.c))
 OBJS += $(patsubst %.c,%.o,$(wildcard xenbus/*.c))
 OBJS += $(patsubst %.c,%.o,$(wildcard console/*.c))
+OBJS += $(patsubst %.S,%.o,$(wildcard arch/$(TARGET_ARCH_DIR)/*.S))
+OBJS += $(patsubst %.c,%.o,$(wildcard arch/$(TARGET_ARCH_DIR)/*.c))
+# For special wanted source directories.
+extra_objs := $(foreach dir,$(EXTRA_SRC),$(patsubst %.c,%.o,$(wildcard 
$(dir)/*.c)))
+OBJS += $(extra_objs)
+extra_objs := $(foreach dir,$(EXTRA_SRC),$(patsubst %.S,%.o,$(wildcard 
$(dir)/*.S)))
+OBJS += $(extra_objs)
 
 HDRS := $(wildcard include/*.h)
 HDRS += $(wildcard include/xen/*.h)
+HDRS += $(wildcard include/$(TARGET_ARCH_DIR)/*.h)
+# For special wanted header directories.
+extra_heads := $(foreach dir,$(EXTRA_INC),$(wildcard $(dir)/*.h))
+HDRS += $(extra_heads)
 
 .PHONY: default
 default: $(TARGET)
 
+# Create special architecture specific links.
+ifneq ($(ARCH_LINKS),)
+$(ARCH_LINKS):
+       $(arch_links)
+endif
+
 .PHONY: links
-links:
+links: $(ARCH_LINKS)
        [ -e include/xen ] || ln -sf ../../../xen/include/public include/xen
 
 libminios.a: links $(OBJS) $(HEAD)
diff -r 91169603a8e8 -r 79afceca9065 extras/mini-os/console/xencons_ring.c
--- a/extras/mini-os/console/xencons_ring.c     Tue Aug 22 14:45:49 2006 -0600
+++ b/extras/mini-os/console/xencons_ring.c     Wed Aug 23 11:11:27 2006 -0600
@@ -14,13 +14,13 @@
 
 static inline struct xencons_interface *xencons_interface(void)
 {
-    return mfn_to_virt(start_info.console_mfn);
+    return mfn_to_virt(start_info.console.domU.mfn);
 }
 
 static inline void notify_daemon(void)
 {
     /* Use evtchn: this is called early, before irq is set up. */
-    notify_remote_via_evtchn(start_info.console_evtchn);
+    notify_remote_via_evtchn(start_info.console.domU.evtchn);
 }
 
 int xencons_ring_send_no_notify(const char *data, unsigned len)
@@ -80,10 +80,10 @@ int xencons_ring_init(void)
 {
        int err;
 
-       if (!start_info.console_evtchn)
+       if (!start_info.console.domU.evtchn)
                return 0;
 
-       err = bind_evtchn(start_info.console_evtchn, handle_input,
+       err = bind_evtchn(start_info.console.domU.evtchn, handle_input,
                          NULL);
        if (err <= 0) {
                printk("XEN console request chn bind failed %i\n", err);
diff -r 91169603a8e8 -r 79afceca9065 extras/mini-os/include/hypervisor.h
--- a/extras/mini-os/include/hypervisor.h       Tue Aug 22 14:45:49 2006 -0600
+++ b/extras/mini-os/include/hypervisor.h       Wed Aug 23 11:11:27 2006 -0600
@@ -7,6 +7,7 @@
  * Copyright (c) 2002, K A Fraser
  * Copyright (c) 2005, Grzegorz Milos
  * Updates: Aravindh Puthiyaparambil <aravindh.puthiyaparambil@xxxxxxxxxx>
+ * Updates: Dietmar Hahn <dietmar.hahn@xxxxxxxxxxxxxxxxxxx> for ia64
  */
 
 #ifndef _HYPERVISOR_H_
@@ -19,6 +20,8 @@
 #include <hypercall-x86_32.h>
 #elif defined(__x86_64__)
 #include <hypercall-x86_64.h>
+#elif defined(__ia64__)
+#include <hypercall-ia64.h>
 #else
 #error "Unsupported architecture"
 #endif
diff -r 91169603a8e8 -r 79afceca9065 extras/mini-os/include/types.h
--- a/extras/mini-os/include/types.h    Tue Aug 22 14:45:49 2006 -0600
+++ b/extras/mini-os/include/types.h    Wed Aug 23 11:11:27 2006 -0600
@@ -29,7 +29,7 @@ typedef unsigned int        u32;
 #ifdef __i386__
 typedef signed long long    s64;
 typedef unsigned long long  u64;
-#elif defined(__x86_64__)
+#elif defined(__x86_64__) || defined(__ia64__)
 typedef signed long         s64;
 typedef unsigned long       u64;
 #endif
@@ -49,7 +49,7 @@ typedef struct { unsigned long pte_low, 
 typedef struct { unsigned long pte_low, pte_high; } pte_t;
 #endif /* CONFIG_X86_PAE */
 
-#elif defined(__x86_64__)
+#elif defined(__x86_64__) || defined(__ia64__)
 typedef long                quad_t;
 typedef unsigned long       u_quad_t;
 typedef unsigned long       uintptr_t;
diff -r 91169603a8e8 -r 79afceca9065 
linux-2.6-xen-sparse/arch/i386/kernel/cpu/mtrr/main-xen.c
--- a/linux-2.6-xen-sparse/arch/i386/kernel/cpu/mtrr/main-xen.c Tue Aug 22 
14:45:49 2006 -0600
+++ b/linux-2.6-xen-sparse/arch/i386/kernel/cpu/mtrr/main-xen.c Wed Aug 23 
11:11:27 2006 -0600
@@ -178,7 +178,7 @@ static int __init mtrr_init(void)
 {
        struct cpuinfo_x86 *c = &boot_cpu_data;
 
-       if (!(xen_start_info->flags & SIF_PRIVILEGED))
+       if (!is_initial_xendomain())
                return -ENODEV;
 
        if ((!cpu_has(c, X86_FEATURE_MTRR)) &&
diff -r 91169603a8e8 -r 79afceca9065 
linux-2.6-xen-sparse/arch/i386/kernel/io_apic-xen.c
--- a/linux-2.6-xen-sparse/arch/i386/kernel/io_apic-xen.c       Tue Aug 22 
14:45:49 2006 -0600
+++ b/linux-2.6-xen-sparse/arch/i386/kernel/io_apic-xen.c       Wed Aug 23 
11:11:27 2006 -0600
@@ -2480,7 +2480,7 @@ static int __init io_apic_bug_finalize(v
 {
        if(sis_apic_bug == -1)
                sis_apic_bug = 0;
-       if (xen_start_info->flags & SIF_INITDOMAIN) {
+       if (is_initial_xendomain()) {
                dom0_op_t op = { .cmd = DOM0_PLATFORM_QUIRK };
                op.u.platform_quirk.quirk_id = sis_apic_bug ?
                        QUIRK_IOAPIC_BAD_REGSEL : QUIRK_IOAPIC_GOOD_REGSEL;
diff -r 91169603a8e8 -r 79afceca9065 
linux-2.6-xen-sparse/arch/i386/kernel/setup-xen.c
--- a/linux-2.6-xen-sparse/arch/i386/kernel/setup-xen.c Tue Aug 22 14:45:49 
2006 -0600
+++ b/linux-2.6-xen-sparse/arch/i386/kernel/setup-xen.c Wed Aug 23 11:11:27 
2006 -0600
@@ -184,7 +184,6 @@ static struct resource code_resource = {
        .flags  = IORESOURCE_BUSY | IORESOURCE_MEM
 };
 
-#ifdef CONFIG_XEN_PRIVILEGED_GUEST
 static struct resource system_rom_resource = {
        .name   = "System ROM",
        .start  = 0xf0000,
@@ -240,7 +239,6 @@ static struct resource video_rom_resourc
        .end    = 0xc7fff,
        .flags  = IORESOURCE_BUSY | IORESOURCE_READONLY | IORESOURCE_MEM
 };
-#endif
 
 static struct resource video_ram_resource = {
        .name   = "Video RAM area",
@@ -299,7 +297,6 @@ static struct resource standard_io_resou
 #define STANDARD_IO_RESOURCES \
        (sizeof standard_io_resources / sizeof standard_io_resources[0])
 
-#ifdef CONFIG_XEN_PRIVILEGED_GUEST
 #define romsignature(x) (*(unsigned short *)(x) == 0xaa55)
 
 static int __init romchecksum(unsigned char *rom, unsigned long length)
@@ -317,9 +314,11 @@ static void __init probe_roms(void)
        unsigned char *rom;
        int           i;
 
+#ifdef CONFIG_XEN
        /* Nothing to do if not running in dom0. */
-       if (!(xen_start_info->flags & SIF_INITDOMAIN))
+       if (!is_initial_xendomain())
                return;
+#endif
 
        /* video rom */
        upper = adapter_rom_resources[0].start;
@@ -379,7 +378,6 @@ static void __init probe_roms(void)
                start = adapter_rom_resources[i++].end & ~2047UL;
        }
 }
-#endif
 
 /*
  * Point at the empty zero page to start with. We map the real shared_info
@@ -1359,9 +1357,7 @@ legacy_init_iomem_resources(struct e820e
 {
        int i;
 
-#if defined(CONFIG_XEN_PRIVILEGED_GUEST) || !defined(CONFIG_XEN)
        probe_roms();
-#endif
 
        for (i = 0; i < nr_map; i++) {
                struct resource *res;
@@ -1458,7 +1454,7 @@ static void __init register_memory(void)
        int           i;
 
        /* Nothing to do if not running in dom0. */
-       if (!(xen_start_info->flags & SIF_INITDOMAIN)) {
+       if (!is_initial_xendomain()) {
                legacy_init_iomem_resources(e820.map, e820.nr_map,
                                            &code_resource, &data_resource);
                return;
@@ -1618,7 +1614,7 @@ void __init setup_arch(char **cmdline_p)
 
        /* Force a quick death if the kernel panics (not domain 0). */
        extern int panic_timeout;
-       if (!panic_timeout && !(xen_start_info->flags & SIF_INITDOMAIN))
+       if (!panic_timeout && !is_initial_xendomain())
                panic_timeout = 1;
 
        /* Register a call for panic conditions. */
@@ -1661,7 +1657,7 @@ void __init setup_arch(char **cmdline_p)
        }
        bootloader_type = LOADER_TYPE;
 
-       if (xen_start_info->flags & SIF_INITDOMAIN) {
+       if (is_initial_xendomain()) {
                /* This is drawn from a dump from vgacon:startup in
                 * standard Linux. */
                screen_info.orig_video_mode = 3; 
@@ -1670,6 +1666,35 @@ void __init setup_arch(char **cmdline_p)
                screen_info.orig_video_cols = 80;
                screen_info.orig_video_ega_bx = 3;
                screen_info.orig_video_points = 16;
+               if (xen_start_info->console.dom0.info_size >=
+                   sizeof(struct dom0_vga_console_info)) {
+                       const struct dom0_vga_console_info *info =
+                               (struct dom0_vga_console_info *)(
+                                       (char *)xen_start_info +
+                                       xen_start_info->console.dom0.info_off);
+                       screen_info.orig_video_mode = info->txt_mode;
+                       screen_info.orig_video_isVGA = info->video_type;
+                       screen_info.orig_video_lines = info->video_height;
+                       screen_info.orig_video_cols = info->video_width;
+                       screen_info.orig_video_points = info->txt_points;
+                       screen_info.lfb_width = info->video_width;
+                       screen_info.lfb_height = info->video_height;
+                       screen_info.lfb_depth = info->lfb_depth;
+                       screen_info.lfb_base = info->lfb_base;
+                       screen_info.lfb_size = info->lfb_size;
+                       screen_info.lfb_linelength = info->lfb_linelen;
+                       screen_info.red_size = info->red_size;
+                       screen_info.red_pos = info->red_pos;
+                       screen_info.green_size = info->green_size;
+                       screen_info.green_pos = info->green_pos;
+                       screen_info.blue_size = info->blue_size;
+                       screen_info.blue_pos = info->blue_pos;
+                       screen_info.rsvd_size = info->rsvd_size;
+                       screen_info.rsvd_pos = info->rsvd_pos;
+               }
+               screen_info.orig_y = screen_info.orig_video_lines - 1;
+               xen_start_info->console.domU.mfn = 0;
+               xen_start_info->console.domU.evtchn = 0;
        } else
                screen_info.orig_video_isVGA = 0;
 
@@ -1788,7 +1813,7 @@ void __init setup_arch(char **cmdline_p)
        }
 #endif
 
-       if (xen_start_info->flags & SIF_INITDOMAIN)
+       if (is_initial_xendomain())
                dmi_scan_machine();
 
 #ifdef CONFIG_X86_GENERICARCH
@@ -1805,7 +1830,7 @@ void __init setup_arch(char **cmdline_p)
 #endif
 
 #ifdef CONFIG_ACPI
-       if (!(xen_start_info->flags & SIF_INITDOMAIN)) {
+       if (!is_initial_xendomain()) {
                printk(KERN_INFO "ACPI in unprivileged domain disabled\n");
                acpi_disabled = 1;
                acpi_ht = 0;
@@ -1831,11 +1856,7 @@ void __init setup_arch(char **cmdline_p)
 
        register_memory();
 
-       if (xen_start_info->flags & SIF_INITDOMAIN) {
-               if (!(xen_start_info->flags & SIF_PRIVILEGED))
-                       panic("Xen granted us console access "
-                             "but not privileged status");
-
+       if (is_initial_xendomain()) {
 #ifdef CONFIG_VT
 #if defined(CONFIG_VGA_CONSOLE)
                if (!efi_enabled ||
diff -r 91169603a8e8 -r 79afceca9065 
linux-2.6-xen-sparse/arch/i386/kernel/swiotlb.c
--- a/linux-2.6-xen-sparse/arch/i386/kernel/swiotlb.c   Tue Aug 22 14:45:49 
2006 -0600
+++ b/linux-2.6-xen-sparse/arch/i386/kernel/swiotlb.c   Wed Aug 23 11:11:27 
2006 -0600
@@ -199,7 +199,7 @@ swiotlb_init(void)
                swiotlb = 1;
        } else if ((swiotlb_force != -1) &&
                   is_running_on_xen() &&
-                  (xen_start_info->flags & SIF_INITDOMAIN)) {
+                  is_initial_xendomain()) {
                /* Domain 0 always has a swiotlb. */
                ram_end = HYPERVISOR_memory_op(XENMEM_maximum_ram_page, NULL);
                if (ram_end <= 0x7ffff)
diff -r 91169603a8e8 -r 79afceca9065 
linux-2.6-xen-sparse/arch/i386/kernel/time-xen.c
--- a/linux-2.6-xen-sparse/arch/i386/kernel/time-xen.c  Tue Aug 22 14:45:49 
2006 -0600
+++ b/linux-2.6-xen-sparse/arch/i386/kernel/time-xen.c  Wed Aug 23 11:11:27 
2006 -0600
@@ -470,8 +470,7 @@ int do_settimeofday(struct timespec *tv)
        sec = tv->tv_sec;
        __normalize_time(&sec, &nsec);
 
-       if ((xen_start_info->flags & SIF_INITDOMAIN) &&
-           !independent_wallclock) {
+       if (is_initial_xendomain() && !independent_wallclock) {
                op.cmd = DOM0_SETTIME;
                op.u.settime.secs        = sec;
                op.u.settime.nsecs       = nsec;
@@ -502,8 +501,7 @@ static void sync_xen_wallclock(unsigned 
        s64 nsec;
        dom0_op_t op;
 
-       if (!ntp_synced() || independent_wallclock ||
-           !(xen_start_info->flags & SIF_INITDOMAIN))
+       if (!ntp_synced() || independent_wallclock || !is_initial_xendomain())
                return;
 
        write_seqlock_irq(&xtime_lock);
@@ -532,7 +530,7 @@ static int set_rtc_mmss(unsigned long no
 
        WARN_ON(irqs_disabled());
 
-       if (independent_wallclock || !(xen_start_info->flags & SIF_INITDOMAIN))
+       if (independent_wallclock || !is_initial_xendomain())
                return 0;
 
        /* gets recalled with irq locally disabled */
diff -r 91169603a8e8 -r 79afceca9065 
linux-2.6-xen-sparse/arch/i386/kernel/vmlinux.lds.S
--- a/linux-2.6-xen-sparse/arch/i386/kernel/vmlinux.lds.S       Tue Aug 22 
14:45:49 2006 -0600
+++ b/linux-2.6-xen-sparse/arch/i386/kernel/vmlinux.lds.S       Wed Aug 23 
11:11:27 2006 -0600
@@ -12,6 +12,12 @@ OUTPUT_ARCH(i386)
 OUTPUT_ARCH(i386)
 ENTRY(phys_startup_32)
 jiffies = jiffies_64;
+
+PHDRS {
+       text PT_LOAD FLAGS(5);  /* R_E */
+       data PT_LOAD FLAGS(7);  /* RWE */
+       note PT_NOTE FLAGS(4);  /* R__ */
+}
 SECTIONS
 {
   . = __KERNEL_START;
@@ -25,7 +31,7 @@ SECTIONS
        KPROBES_TEXT
        *(.fixup)
        *(.gnu.warning)
-       } = 0x9090
+       } :text = 0x9090
 
   _etext = .;                  /* End of text section */
 
@@ -47,7 +53,7 @@ SECTIONS
   .data : AT(ADDR(.data) - LOAD_OFFSET) {      /* Data */
        *(.data)
        CONSTRUCTORS
-       }
+       } :data
 
   . = ALIGN(4096);
   __nosave_begin = .;
@@ -154,4 +160,6 @@ SECTIONS
   STABS_DEBUG
 
   DWARF_DEBUG
+
+  NOTES
 }
diff -r 91169603a8e8 -r 79afceca9065 
linux-2.6-xen-sparse/arch/i386/mm/init-xen.c
--- a/linux-2.6-xen-sparse/arch/i386/mm/init-xen.c      Tue Aug 22 14:45:49 
2006 -0600
+++ b/linux-2.6-xen-sparse/arch/i386/mm/init-xen.c      Wed Aug 23 11:11:27 
2006 -0600
@@ -566,7 +566,7 @@ void __init paging_init(void)
 
        /* Setup mapping of lower 1st MB */
        for (i = 0; i < NR_FIX_ISAMAPS; i++)
-               if (xen_start_info->flags & SIF_PRIVILEGED)
+               if (is_initial_xendomain())
                        set_fixmap(FIX_ISAMAP_BEGIN - i, i * PAGE_SIZE);
                else
                        __set_fixmap(FIX_ISAMAP_BEGIN - i,
diff -r 91169603a8e8 -r 79afceca9065 
linux-2.6-xen-sparse/arch/i386/mm/ioremap-xen.c
--- a/linux-2.6-xen-sparse/arch/i386/mm/ioremap-xen.c   Tue Aug 22 14:45:49 
2006 -0600
+++ b/linux-2.6-xen-sparse/arch/i386/mm/ioremap-xen.c   Wed Aug 23 11:11:27 
2006 -0600
@@ -121,7 +121,7 @@ int direct_remap_pfn_range(struct vm_are
                           domid_t  domid)
 {
        /* Same as remap_pfn_range(). */
-       vma->vm_flags |= VM_IO | VM_RESERVED;
+       vma->vm_flags |= VM_IO | VM_RESERVED | VM_PFNMAP;
 
        if (domid == DOMID_SELF)
                return -EINVAL;
@@ -245,7 +245,7 @@ void __iomem * __ioremap(unsigned long p
        /*
         * Don't remap the low PCI/ISA area, it's always mapped..
         */
-       if (xen_start_info->flags & SIF_PRIVILEGED &&
+       if (is_initial_xendomain() &&
            phys_addr >= ISA_START_ADDRESS && last_addr < ISA_END_ADDRESS)
                return (void __iomem *) isa_bus_to_virt(phys_addr);
 
@@ -282,9 +282,6 @@ void __iomem * __ioremap(unsigned long p
        area->phys_addr = phys_addr;
        addr = (void __iomem *) area->addr;
        flags |= _PAGE_PRESENT | _PAGE_RW | _PAGE_DIRTY | _PAGE_ACCESSED;
-#ifdef __x86_64__
-       flags |= _PAGE_USER;
-#endif
        if (__direct_remap_pfn_range(&init_mm, (unsigned long)addr,
                                     phys_addr>>PAGE_SHIFT,
                                     size, __pgprot(flags), domid)) {
@@ -425,7 +422,7 @@ void __init *bt_ioremap(unsigned long ph
        /*
         * Don't remap the low PCI/ISA area, it's always mapped..
         */
-       if (xen_start_info->flags & SIF_PRIVILEGED &&
+       if (is_initial_xendomain() &&
            phys_addr >= ISA_START_ADDRESS && last_addr < ISA_END_ADDRESS)
                return isa_bus_to_virt(phys_addr);
 
diff -r 91169603a8e8 -r 79afceca9065 
linux-2.6-xen-sparse/arch/i386/pci/irq-xen.c
--- a/linux-2.6-xen-sparse/arch/i386/pci/irq-xen.c      Tue Aug 22 14:45:49 
2006 -0600
+++ b/linux-2.6-xen-sparse/arch/i386/pci/irq-xen.c      Wed Aug 23 11:11:27 
2006 -0600
@@ -95,7 +95,10 @@ static struct irq_routing_table * __init
        u8 *addr;
        struct irq_routing_table *rt;
 
-#ifdef CONFIG_XEN_PRIVILEGED_GUEST
+#ifdef CONFIG_XEN
+       if (!is_initial_xendomain())
+               return NULL;
+#endif
        if (pirq_table_addr) {
                rt = pirq_check_routing_table((u8 *) 
isa_bus_to_virt(pirq_table_addr));
                if (rt)
@@ -107,7 +110,6 @@ static struct irq_routing_table * __init
                if (rt)
                        return rt;
        }
-#endif
        
        return NULL;
 }
diff -r 91169603a8e8 -r 79afceca9065 
linux-2.6-xen-sparse/arch/ia64/kernel/setup.c
--- a/linux-2.6-xen-sparse/arch/ia64/kernel/setup.c     Tue Aug 22 14:45:49 
2006 -0600
+++ b/linux-2.6-xen-sparse/arch/ia64/kernel/setup.c     Wed Aug 23 11:11:27 
2006 -0600
@@ -545,12 +545,7 @@ setup_arch (char **cmdline_p)
                       "flags=0x%x\n", s->arch.start_info_pfn,
                       xen_start_info->nr_pages, xen_start_info->flags);
 
-               /* xen_start_info isn't setup yet, get the flags manually */
-               if (xen_start_info->flags & SIF_INITDOMAIN) {
-                       if (!(xen_start_info->flags & SIF_PRIVILEGED))
-                               panic("Xen granted us console access "
-                                     "but not privileged status");
-               } else {
+               if (!is_initial_xendomain()) {
                        extern int console_use_vt;
                        conswitchp = NULL;
                        console_use_vt = 0;
diff -r 91169603a8e8 -r 79afceca9065 
linux-2.6-xen-sparse/arch/ia64/xen/hypervisor.c
--- a/linux-2.6-xen-sparse/arch/ia64/xen/hypervisor.c   Tue Aug 22 14:45:49 
2006 -0600
+++ b/linux-2.6-xen-sparse/arch/ia64/xen/hypervisor.c   Wed Aug 23 11:11:27 
2006 -0600
@@ -82,7 +82,7 @@ ia64_xenmem_reservation_op(unsigned long
                        //    of a non-privileged domain, 
                        if ((op == XENMEM_increase_reservation ||
                             op == XENMEM_populate_physmap) &&
-                           !(xen_start_info->flags & SIF_PRIVILEGED) &&
+                           !is_initial_xendomain() &&
                            reservation.extent_order > 0)
                                return ret;
                }
diff -r 91169603a8e8 -r 79afceca9065 
linux-2.6-xen-sparse/arch/x86_64/kernel/entry-xen.S
--- a/linux-2.6-xen-sparse/arch/x86_64/kernel/entry-xen.S       Tue Aug 22 
14:45:49 2006 -0600
+++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/entry-xen.S       Wed Aug 23 
11:11:27 2006 -0600
@@ -271,7 +271,7 @@ sysret_careful:
        CFI_RESTORE_STATE
        bt $TIF_NEED_RESCHED,%edx
        jnc sysret_signal
-        XEN_BLOCK_EVENTS(%rsi)        
+       XEN_UNBLOCK_EVENTS(%rsi)
        pushq %rdi
        CFI_ADJUST_CFA_OFFSET 8
        call schedule
@@ -295,7 +295,7 @@ 1:  movl $_TIF_NEED_RESCHED,%edi
 1:     movl $_TIF_NEED_RESCHED,%edi
        /* Use IRET because user could have changed frame. This
           works because ptregscall_common has called FIXUP_TOP_OF_STACK. */
-       cli
+       XEN_BLOCK_EVENTS(%rsi)
        jmp int_with_check
        
 badsys:
@@ -377,7 +377,7 @@ int_careful:
        call schedule
        popq %rdi
        CFI_ADJUST_CFA_OFFSET -8
-       cli
+       XEN_BLOCK_EVENTS(%rsi)
        jmp int_with_check
 
        /* handle signals and tracing -- both require a full stack frame */
@@ -395,7 +395,7 @@ int_very_careful:
        popq %rdi
        CFI_ADJUST_CFA_OFFSET -8
        andl $~(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SINGLESTEP),%edi
-       cli
+       XEN_BLOCK_EVENTS(%rsi)
        jmp int_restore_rest
        
 int_signal:
@@ -407,7 +407,7 @@ 1:  movl $_TIF_NEED_RESCHED,%edi
 1:     movl $_TIF_NEED_RESCHED,%edi    
 int_restore_rest:
        RESTORE_REST
-       cli
+       XEN_BLOCK_EVENTS(%rsi)
        jmp int_with_check
        CFI_ENDPROC
                
@@ -535,8 +535,8 @@ retint_careful:
        call  schedule
        popq %rdi               
        CFI_ADJUST_CFA_OFFSET   -8
+       GET_THREAD_INFO(%rcx)
        XEN_BLOCK_EVENTS(%rsi)          
-       GET_THREAD_INFO(%rcx)
 /*     cli */
        jmp retint_check
        
diff -r 91169603a8e8 -r 79afceca9065 
linux-2.6-xen-sparse/arch/x86_64/kernel/setup-xen.c
--- a/linux-2.6-xen-sparse/arch/x86_64/kernel/setup-xen.c       Tue Aug 22 
14:45:49 2006 -0600
+++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/setup-xen.c       Wed Aug 23 
11:11:27 2006 -0600
@@ -189,7 +189,6 @@ struct resource code_resource = {
 
 #define IORESOURCE_ROM (IORESOURCE_BUSY | IORESOURCE_READONLY | IORESOURCE_MEM)
 
-#if defined(CONFIG_XEN_PRIVILEGED_GUEST) || !defined(CONFIG_XEN)
 static struct resource system_rom_resource = {
        .name = "System ROM",
        .start = 0xf0000,
@@ -218,19 +217,16 @@ static struct resource adapter_rom_resou
        { .name = "Adapter ROM", .start = 0, .end = 0,
                .flags = IORESOURCE_ROM }
 };
-#endif
 
 #define ADAPTER_ROM_RESOURCES \
        (sizeof adapter_rom_resources / sizeof adapter_rom_resources[0])
 
-#if defined(CONFIG_XEN_PRIVILEGED_GUEST) || !defined(CONFIG_XEN)
 static struct resource video_rom_resource = {
        .name = "Video ROM",
        .start = 0xc0000,
        .end = 0xc7fff,
        .flags = IORESOURCE_ROM,
 };
-#endif
 
 static struct resource video_ram_resource = {
        .name = "Video RAM area",
@@ -239,7 +235,6 @@ static struct resource video_ram_resourc
        .flags = IORESOURCE_RAM,
 };
 
-#if defined(CONFIG_XEN_PRIVILEGED_GUEST) || !defined(CONFIG_XEN)
 #define romsignature(x) (*(unsigned short *)(x) == 0xaa55)
 
 static int __init romchecksum(unsigned char *rom, unsigned long length)
@@ -256,6 +251,12 @@ static void __init probe_roms(void)
        unsigned long start, length, upper;
        unsigned char *rom;
        int           i;
+
+#ifdef CONFIG_XEN
+       /* Nothing to do if not running in dom0. */
+       if (!is_initial_xendomain())
+               return;
+#endif
 
        /* video rom */
        upper = adapter_rom_resources[0].start;
@@ -315,7 +316,6 @@ static void __init probe_roms(void)
                start = adapter_rom_resources[i++].end & ~2047UL;
        }
 }
-#endif
 
 static __init void parse_cmdline_early (char ** cmdline_p)
 {
@@ -625,11 +625,8 @@ void __init setup_arch(char **cmdline_p)
 void __init setup_arch(char **cmdline_p)
 {
        unsigned long kernel_end;
-
-#if defined(CONFIG_XEN_PRIVILEGED_GUEST)
        struct e820entry *machine_e820;
        struct xen_memory_map memmap;
-#endif
 
 #ifdef CONFIG_XEN
        /* Register a call for panic conditions. */
@@ -639,7 +636,7 @@ void __init setup_arch(char **cmdline_p)
        kernel_end = 0;         /* dummy */
        screen_info = SCREEN_INFO;
 
-       if (xen_start_info->flags & SIF_INITDOMAIN) {
+       if (is_initial_xendomain()) {
                /* This is drawn from a dump from vgacon:startup in
                 * standard Linux. */
                screen_info.orig_video_mode = 3;
@@ -648,6 +645,35 @@ void __init setup_arch(char **cmdline_p)
                screen_info.orig_video_cols = 80;
                screen_info.orig_video_ega_bx = 3;
                screen_info.orig_video_points = 16;
+               if (xen_start_info->console.dom0.info_size >=
+                   sizeof(struct dom0_vga_console_info)) {
+                       const struct dom0_vga_console_info *info =
+                               (struct dom0_vga_console_info *)(
+                                       (char *)xen_start_info +
+                                       xen_start_info->console.dom0.info_off);
+                       screen_info.orig_video_mode = info->txt_mode;
+                       screen_info.orig_video_isVGA = info->video_type;
+                       screen_info.orig_video_lines = info->video_height;
+                       screen_info.orig_video_cols = info->video_width;
+                       screen_info.orig_video_points = info->txt_points;
+                       screen_info.lfb_width = info->video_width;
+                       screen_info.lfb_height = info->video_height;
+                       screen_info.lfb_depth = info->lfb_depth;
+                       screen_info.lfb_base = info->lfb_base;
+                       screen_info.lfb_size = info->lfb_size;
+                       screen_info.lfb_linelength = info->lfb_linelen;
+                       screen_info.red_size = info->red_size;
+                       screen_info.red_pos = info->red_pos;
+                       screen_info.green_size = info->green_size;
+                       screen_info.green_pos = info->green_pos;
+                       screen_info.blue_size = info->blue_size;
+                       screen_info.blue_pos = info->blue_pos;
+                       screen_info.rsvd_size = info->rsvd_size;
+                       screen_info.rsvd_pos = info->rsvd_pos;
+               }
+               screen_info.orig_y = screen_info.orig_video_lines - 1;
+               xen_start_info->console.domU.mfn = 0;
+               xen_start_info->console.domU.evtchn = 0;
        } else
                screen_info.orig_video_isVGA = 0;
 
@@ -860,8 +886,7 @@ void __init setup_arch(char **cmdline_p)
 
        }
 
-       if ( ! (xen_start_info->flags & SIF_INITDOMAIN))
-       {
+       if (!is_initial_xendomain()) {
                acpi_disabled = 1;
 #ifdef  CONFIG_ACPI
                acpi_ht = 0;
@@ -908,9 +933,9 @@ void __init setup_arch(char **cmdline_p)
         * Request address space for all standard RAM and ROM resources
         * and also for regions reported as reserved by the e820.
         */
-#if defined(CONFIG_XEN_PRIVILEGED_GUEST)
        probe_roms();
-       if (xen_start_info->flags & SIF_INITDOMAIN) {
+#ifdef CONFIG_XEN
+       if (is_initial_xendomain()) {
                machine_e820 = alloc_bootmem_low_pages(PAGE_SIZE);
 
                memmap.nr_entries = E820MAX;
@@ -919,14 +944,9 @@ void __init setup_arch(char **cmdline_p)
                BUG_ON(HYPERVISOR_memory_op(XENMEM_machine_memory_map, 
&memmap));
 
                e820_reserve_resources(machine_e820, memmap.nr_entries);
-       } else if (!(xen_start_info->flags & SIF_INITDOMAIN))
-               e820_reserve_resources(e820.map, e820.nr_map);
-#elif defined(CONFIG_XEN)
+       } else
+#endif
        e820_reserve_resources(e820.map, e820.nr_map);
-#else
-       probe_roms();
-       e820_reserve_resources(e820.map, e820.nr_map);
-#endif
 
        request_resource(&iomem_resource, &video_ram_resource);
 
@@ -937,12 +957,12 @@ void __init setup_arch(char **cmdline_p)
                request_resource(&ioport_resource, &standard_io_resources[i]);
        }
 
-#if defined(CONFIG_XEN_PRIVILEGED_GUEST)
-       if (xen_start_info->flags & SIF_INITDOMAIN) {
+#ifdef CONFIG_XEN
+       if (is_initial_xendomain()) {
                e820_setup_gap(machine_e820, memmap.nr_entries);
                free_bootmem(__pa(machine_e820), PAGE_SIZE);
        }
-#elif !defined(CONFIG_XEN)
+#else
        e820_setup_gap(e820.map, e820.nr_map);
 #endif
 
@@ -957,11 +977,7 @@ void __init setup_arch(char **cmdline_p)
                set_iopl.iopl = 1;
                HYPERVISOR_physdev_op(PHYSDEVOP_set_iopl, &set_iopl);
 
-               if (xen_start_info->flags & SIF_INITDOMAIN) {
-                       if (!(xen_start_info->flags & SIF_PRIVILEGED))
-                               panic("Xen granted us console access "
-                                     "but not privileged status");
-                      
+               if (is_initial_xendomain()) {
 #ifdef CONFIG_VT
 #if defined(CONFIG_VGA_CONSOLE)
                        conswitchp = &vga_con;
diff -r 91169603a8e8 -r 79afceca9065 
linux-2.6-xen-sparse/arch/x86_64/mm/init-xen.c
--- a/linux-2.6-xen-sparse/arch/x86_64/mm/init-xen.c    Tue Aug 22 14:45:49 
2006 -0600
+++ b/linux-2.6-xen-sparse/arch/x86_64/mm/init-xen.c    Wed Aug 23 11:11:27 
2006 -0600
@@ -529,7 +529,7 @@ void __init xen_init_pt(void)
                mk_kernel_pgd(__pa_symbol(level3_kernel_pgt));
        level3_kernel_pgt[pud_index(__START_KERNEL_map)] = 
                __pud(__pa_symbol(level2_kernel_pgt) |
-                     _KERNPG_TABLE | _PAGE_USER);
+                     _KERNPG_TABLE);
        memcpy((void *)level2_kernel_pgt, page, PAGE_SIZE);
 
        early_make_page_readonly(init_level4_pgt,
@@ -578,7 +578,7 @@ void __init extend_init_mapping(unsigned
                        pte_page = alloc_static_page(&phys);
                        early_make_page_readonly(
                                pte_page, XENFEAT_writable_page_tables);
-                       set_pmd(pmd, __pmd(phys | _KERNPG_TABLE | _PAGE_USER));
+                       set_pmd(pmd, __pmd(phys | _KERNPG_TABLE));
                } else {
                        addr = page[pmd_index(va)];
                        addr_to_page(addr, pte_page);
@@ -587,7 +587,7 @@ void __init extend_init_mapping(unsigned
                if (pte_none(*pte)) {
                        new_pte = pfn_pte(
                                (va - __START_KERNEL_map) >> PAGE_SHIFT, 
-                               __pgprot(_KERNPG_TABLE | _PAGE_USER));
+                               __pgprot(_KERNPG_TABLE));
                        xen_l1_entry_update(pte, new_pte);
                }
                va += PAGE_SIZE;
@@ -789,7 +789,7 @@ void __init paging_init(void)
 
        /* Setup mapping of lower 1st MB */
        for (i = 0; i < NR_FIX_ISAMAPS; i++)
-               if (xen_start_info->flags & SIF_PRIVILEGED)
+               if (is_initial_xendomain())
                        set_fixmap(FIX_ISAMAP_BEGIN - i, i * PAGE_SIZE);
                else
                        __set_fixmap(FIX_ISAMAP_BEGIN - i,
diff -r 91169603a8e8 -r 79afceca9065 
linux-2.6-xen-sparse/drivers/char/tpm/tpm_xen.c
--- a/linux-2.6-xen-sparse/drivers/char/tpm/tpm_xen.c   Tue Aug 22 14:45:49 
2006 -0600
+++ b/linux-2.6-xen-sparse/drivers/char/tpm/tpm_xen.c   Wed Aug 23 11:11:27 
2006 -0600
@@ -343,7 +343,6 @@ static void backend_changed(struct xenbu
        case XenbusStateInitialising:
        case XenbusStateInitWait:
        case XenbusStateInitialised:
-       case XenbusStateUnknown:
                break;
 
        case XenbusStateConnected:
@@ -354,10 +353,10 @@ static void backend_changed(struct xenbu
                tpmif_set_connected_state(tp, 0);
                break;
 
+       case XenbusStateUnknown:
        case XenbusStateClosed:
-               if (tp->is_suspended == 0) {
+               if (tp->is_suspended == 0)
                        device_unregister(&dev->dev);
-               }
                xenbus_switch_state(dev, XenbusStateClosed);
                break;
        }
@@ -718,9 +717,8 @@ static int __init tpmif_init(void)
        long rc = 0;
        struct tpm_private *tp;
 
-       if ((xen_start_info->flags & SIF_INITDOMAIN)) {
+       if (is_initial_xendomain())
                return -EPERM;
-       }
 
        tp = tpm_private_get();
        if (!tp) {
diff -r 91169603a8e8 -r 79afceca9065 linux-2.6-xen-sparse/drivers/xen/Kconfig
--- a/linux-2.6-xen-sparse/drivers/xen/Kconfig  Tue Aug 22 14:45:49 2006 -0600
+++ b/linux-2.6-xen-sparse/drivers/xen/Kconfig  Wed Aug 23 11:11:27 2006 -0600
@@ -13,7 +13,7 @@ if XEN
 if XEN
 config XEN_INTERFACE_VERSION
        hex
-       default 0x00030202
+       default 0x00030203
 
 menu "XEN"
 
diff -r 91169603a8e8 -r 79afceca9065 
linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c
--- a/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c        Tue Aug 22 
14:45:49 2006 -0600
+++ b/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c        Wed Aug 23 
11:11:27 2006 -0600
@@ -76,7 +76,7 @@ static unsigned long target_pages;
 static unsigned long target_pages;
 
 /* We increase/decrease in batches which fit in a page */
-static unsigned long frame_list[PAGE_SIZE / sizeof(unsigned long)]; 
+static unsigned long frame_list[PAGE_SIZE / sizeof(unsigned long)];
 
 /* VM /proc information for memory */
 extern unsigned long totalram_pages;
@@ -440,20 +440,16 @@ static int balloon_read(char *page, char
                "Requested target:   %8lu kB\n"
                "Low-mem balloon:    %8lu kB\n"
                "High-mem balloon:   %8lu kB\n"
+               "Driver pages:       %8lu kB\n"
                "Xen hard limit:     ",
                PAGES2KB(current_pages), PAGES2KB(target_pages), 
-               PAGES2KB(balloon_low), PAGES2KB(balloon_high));
-
-       if (hard_limit != ~0UL) {
-               len += sprintf(
-                       page + len, 
-                       "%8lu kB (inc. %8lu kB driver headroom)\n",
-                       PAGES2KB(hard_limit), PAGES2KB(driver_pages));
-       } else {
-               len += sprintf(
-                       page + len,
-                       "     ??? kB\n");
-       }
+               PAGES2KB(balloon_low), PAGES2KB(balloon_high),
+               PAGES2KB(driver_pages));
+
+       if (hard_limit != ~0UL)
+               len += sprintf(page + len, "%8lu kB\n", PAGES2KB(hard_limit));
+       else
+               len += sprintf(page + len, "     ??? kB\n");
 
        *eof = 1;
        return len;
@@ -610,8 +606,21 @@ void balloon_dealloc_empty_page_range(
        schedule_work(&balloon_worker);
 }
 
+void balloon_release_driver_page(struct page *page)
+{
+       unsigned long flags;
+
+       balloon_lock(flags);
+       balloon_append(page);
+       driver_pages--;
+       balloon_unlock(flags);
+
+       schedule_work(&balloon_worker);
+}
+
 EXPORT_SYMBOL_GPL(balloon_update_driver_allowance);
 EXPORT_SYMBOL_GPL(balloon_alloc_empty_page_range);
 EXPORT_SYMBOL_GPL(balloon_dealloc_empty_page_range);
+EXPORT_SYMBOL_GPL(balloon_release_driver_page);
 
 MODULE_LICENSE("Dual BSD/GPL");
diff -r 91169603a8e8 -r 79afceca9065 
linux-2.6-xen-sparse/drivers/xen/blkback/blkback.c
--- a/linux-2.6-xen-sparse/drivers/xen/blkback/blkback.c        Tue Aug 22 
14:45:49 2006 -0600
+++ b/linux-2.6-xen-sparse/drivers/xen/blkback/blkback.c        Wed Aug 23 
11:11:27 2006 -0600
@@ -341,7 +341,7 @@ static void dispatch_rw_block_io(blkif_t
                                 blkif_request_t *req,
                                 pending_req_t *pending_req)
 {
-       extern void ll_rw_block(int rw, int nr, struct buffer_head * bhs[]); 
+       extern void ll_rw_block(int rw, int nr, struct buffer_head * bhs[]);
        int operation = (req->operation == BLKIF_OP_WRITE) ? WRITE : READ;
        struct gnttab_map_grant_ref map[BLKIF_MAX_SEGMENTS_PER_REQUEST];
        struct phys_req preq;
@@ -409,7 +409,7 @@ static void dispatch_rw_block_io(blkif_t
                DPRINTK("access denied: %s of [%llu,%llu] on dev=%04x\n", 
                        operation == READ ? "read" : "write",
                        preq.sector_number,
-                       preq.sector_number + preq.nr_sects, preq.dev); 
+                       preq.sector_number + preq.nr_sects, preq.dev);
                goto fail_flush;
        }
 
diff -r 91169603a8e8 -r 79afceca9065 
linux-2.6-xen-sparse/drivers/xen/blkback/common.h
--- a/linux-2.6-xen-sparse/drivers/xen/blkback/common.h Tue Aug 22 14:45:49 
2006 -0600
+++ b/linux-2.6-xen-sparse/drivers/xen/blkback/common.h Wed Aug 23 11:11:27 
2006 -0600
@@ -55,9 +55,9 @@ struct vbd {
        unsigned char  type;        /* VDISK_xxx */
        u32            pdevice;     /* phys device that this vbd maps to */
        struct block_device *bdev;
-}; 
+};
 
-struct backend_info; 
+struct backend_info;
 
 typedef struct blkif_st {
        /* Unique identifier for this interface. */
@@ -72,7 +72,7 @@ typedef struct blkif_st {
        /* The VBD attached to this interface. */
        struct vbd        vbd;
        /* Back pointer to the backend_info. */
-       struct backend_info *be; 
+       struct backend_info *be;
        /* Private fields. */
        spinlock_t       blk_ring_lock;
        atomic_t         refcnt;
@@ -122,7 +122,7 @@ struct phys_req {
        blkif_sector_t       sector_number;
 };
 
-int vbd_translate(struct phys_req *req, blkif_t *blkif, int operation); 
+int vbd_translate(struct phys_req *req, blkif_t *blkif, int operation);
 
 void blkif_interface_init(void);
 
diff -r 91169603a8e8 -r 79afceca9065 
linux-2.6-xen-sparse/drivers/xen/blkback/xenbus.c
--- a/linux-2.6-xen-sparse/drivers/xen/blkback/xenbus.c Tue Aug 22 14:45:49 
2006 -0600
+++ b/linux-2.6-xen-sparse/drivers/xen/blkback/xenbus.c Wed Aug 23 11:11:27 
2006 -0600
@@ -194,7 +194,7 @@ static int blkback_probe(struct xenbus_d
        }
 
        /* setup back pointer */
-       be->blkif->be = be; 
+       be->blkif->be = be;
 
        err = xenbus_watch_path2(dev, dev->nodename, "physical-device",
                                 &be->backend_watch, backend_changed);
@@ -287,7 +287,7 @@ static void backend_changed(struct xenbu
                }
 
                /* We're potentially connected now */
-               update_blkif_status(be->blkif); 
+               update_blkif_status(be->blkif);
        }
 }
 
@@ -305,6 +305,11 @@ static void frontend_changed(struct xenb
 
        switch (frontend_state) {
        case XenbusStateInitialising:
+               if (dev->state == XenbusStateClosing) {
+                       printk("%s: %s: prepare for reconnect\n",
+                              __FUNCTION__, dev->nodename);
+                       xenbus_switch_state(dev, XenbusStateInitWait);
+               }
                break;
 
        case XenbusStateInitialised:
@@ -326,12 +331,11 @@ static void frontend_changed(struct xenb
                xenbus_switch_state(dev, XenbusStateClosing);
                break;
 
+       case XenbusStateUnknown:
        case XenbusStateClosed:
                device_unregister(&dev->dev);
                break;
 
-       case XenbusStateUnknown:
-       case XenbusStateInitWait:
        default:
                xenbus_dev_fatal(dev, -EINVAL, "saw state %d at frontend",
                                 frontend_state);
diff -r 91169603a8e8 -r 79afceca9065 
linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c
--- a/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c      Tue Aug 22 
14:45:49 2006 -0600
+++ b/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c      Wed Aug 23 
11:11:27 2006 -0600
@@ -46,6 +46,7 @@
 #include <xen/interface/grant_table.h>
 #include <xen/gnttab.h>
 #include <asm/hypervisor.h>
+#include <asm/maddr.h>
 
 #define BLKIF_STATE_DISCONNECTED 0
 #define BLKIF_STATE_CONNECTED    1
@@ -255,10 +256,10 @@ static void backend_changed(struct xenbu
        DPRINTK("blkfront:backend_changed.\n");
 
        switch (backend_state) {
-       case XenbusStateUnknown:
        case XenbusStateInitialising:
        case XenbusStateInitWait:
        case XenbusStateInitialised:
+       case XenbusStateUnknown:
        case XenbusStateClosed:
                break;
 
diff -r 91169603a8e8 -r 79afceca9065 
linux-2.6-xen-sparse/drivers/xen/blktap/blktap.c
--- a/linux-2.6-xen-sparse/drivers/xen/blktap/blktap.c  Tue Aug 22 14:45:49 
2006 -0600
+++ b/linux-2.6-xen-sparse/drivers/xen/blktap/blktap.c  Wed Aug 23 11:11:27 
2006 -0600
@@ -157,7 +157,7 @@ typedef unsigned int PEND_RING_IDX;
 typedef unsigned int PEND_RING_IDX;
 
 static inline int MASK_PEND_IDX(int i) { 
-       return (i & (MAX_PENDING_REQS-1)); 
+       return (i & (MAX_PENDING_REQS-1));
 }
 
 static inline unsigned int RTN_PEND_IDX(pending_req_t *req, int idx) {
@@ -754,7 +754,7 @@ static int req_increase(void)
        if (!pending_reqs[mmap_alloc] || !pending_addrs[mmap_alloc]) {
                kfree(pending_reqs[mmap_alloc]);
                kfree(pending_addrs[mmap_alloc]);
-               WPRINTK("%s: out of memory\n", __FUNCTION__); 
+               WPRINTK("%s: out of memory\n", __FUNCTION__);
                ret = -ENOMEM;
                goto done;
        }
@@ -1051,7 +1051,7 @@ static int blktap_read_ufe_ring(int idx)
                        unsigned long kvaddr, uvaddr;
                        struct page **map = info->vma->vm_private_data;
                        struct page *pg;
-                       int offset; 
+                       int offset;
 
                        uvaddr  = MMAP_VADDR(info->user_vstart, usr_idx, j);
                        kvaddr = MMAP_VADDR(mmap_start[mmap_idx].start, 
@@ -1063,7 +1063,7 @@ static int blktap_read_ufe_ring(int idx)
                                >> PAGE_SHIFT;
                        map[offset] = NULL;
                }
-               fast_flush_area(pending_req, pending_idx, usr_idx, idx); 
+               fast_flush_area(pending_req, pending_idx, usr_idx, idx);
                make_response(blkif, pending_req->id, resp->operation,
                              resp->status);
                info->idx_map[usr_idx] = INVALID_REQ;
@@ -1118,7 +1118,7 @@ static int do_block_io_op(blkif_t *blkif
                               "ring does not exist!\n");
                        print_dbug = 0; /*We only print this message once*/
                }
-               return 1; 
+               return 1;
        }
 
        info = tapfds[blkif->dev_num];
@@ -1185,7 +1185,7 @@ static void dispatch_rw_block_io(blkif_t
                                 blkif_request_t *req,
                                 pending_req_t *pending_req)
 {
-       extern void ll_rw_block(int rw, int nr, struct buffer_head * bhs[]); 
+       extern void ll_rw_block(int rw, int nr, struct buffer_head * bhs[]);
        int op, operation = (req->operation == BLKIF_OP_WRITE) ? WRITE : READ;
        struct gnttab_map_grant_ref map[BLKIF_MAX_SEGMENTS_PER_REQUEST*2];
        unsigned int nseg;
diff -r 91169603a8e8 -r 79afceca9065 
linux-2.6-xen-sparse/drivers/xen/blktap/common.h
--- a/linux-2.6-xen-sparse/drivers/xen/blktap/common.h  Tue Aug 22 14:45:49 
2006 -0600
+++ b/linux-2.6-xen-sparse/drivers/xen/blktap/common.h  Wed Aug 23 11:11:27 
2006 -0600
@@ -49,7 +49,7 @@
 
 #define WPRINTK(fmt, args...) printk(KERN_WARNING "blk_tap: " fmt, ##args)
 
-struct backend_info; 
+struct backend_info;
 
 typedef struct blkif_st {
        /* Unique identifier for this interface. */
@@ -62,7 +62,7 @@ typedef struct blkif_st {
        blkif_back_ring_t blk_ring;
        struct vm_struct *blk_ring_area;
        /* Back pointer to the backend_info. */
-       struct backend_info *be; 
+       struct backend_info *be;
        /* Private fields. */
        spinlock_t       blk_ring_lock;
        atomic_t         refcnt;
diff -r 91169603a8e8 -r 79afceca9065 
linux-2.6-xen-sparse/drivers/xen/blktap/xenbus.c
--- a/linux-2.6-xen-sparse/drivers/xen/blktap/xenbus.c  Tue Aug 22 14:45:49 
2006 -0600
+++ b/linux-2.6-xen-sparse/drivers/xen/blktap/xenbus.c  Wed Aug 23 11:11:27 
2006 -0600
@@ -174,7 +174,7 @@ static int blktap_probe(struct xenbus_de
        }
 
        /* setup back pointer */
-       be->blkif->be = be; 
+       be->blkif->be = be;
        be->blkif->sectors = 0;
 
        /* set a watch on disk info, waiting for userspace to update details*/
@@ -267,12 +267,11 @@ static void tap_frontend_changed(struct 
                xenbus_switch_state(dev, XenbusStateClosing);
                break;
 
+       case XenbusStateUnknown:
        case XenbusStateClosed:
                device_unregister(&dev->dev);
                break;
 
-       case XenbusStateUnknown:
-       case XenbusStateInitWait:
        default:
                xenbus_dev_fatal(dev, -EINVAL, "saw state %d at frontend",
                                 frontend_state);
diff -r 91169603a8e8 -r 79afceca9065 
linux-2.6-xen-sparse/drivers/xen/console/console.c
--- a/linux-2.6-xen-sparse/drivers/xen/console/console.c        Tue Aug 22 
14:45:49 2006 -0600
+++ b/linux-2.6-xen-sparse/drivers/xen/console/console.c        Wed Aug 23 
11:11:27 2006 -0600
@@ -178,7 +178,7 @@ static struct tty_driver *kcons_device(s
 
 static struct console kcons_info = {
        .device = kcons_device,
-       .flags  = CON_PRINTBUFFER,
+       .flags  = CON_PRINTBUFFER | CON_ENABLED,
        .index  = -1,
 };
 
@@ -188,12 +188,10 @@ static int __init xen_console_init(void)
        if (!is_running_on_xen())
                return __RETCODE;
 
-       if (xen_start_info->flags & SIF_INITDOMAIN) {
+       if (is_initial_xendomain()) {
                if (xc_mode == XC_DEFAULT)
                        xc_mode = XC_SERIAL;
                kcons_info.write = kcons_write_dom0;
-               if (xc_mode == XC_SERIAL)
-                       kcons_info.flags |= CON_ENABLED;
        } else {
                if (xc_mode == XC_DEFAULT)
                        xc_mode = XC_TTY;
@@ -249,7 +247,7 @@ void xencons_force_flush(void)
        int sz;
 
        /* Emergency console is synchronous, so there's nothing to flush. */
-       if (xen_start_info->flags & SIF_INITDOMAIN)
+       if (is_initial_xendomain())
                return;
 
        /* Spin until console data is flushed through to the daemon. */
@@ -320,7 +318,7 @@ static void __xencons_tx_flush(void)
        int sent, sz, work_done = 0;
 
        if (x_char) {
-               if (xen_start_info->flags & SIF_INITDOMAIN)
+               if (is_initial_xendomain())
                        kcons_write_dom0(NULL, &x_char, 1);
                else
                        while (x_char)
@@ -334,7 +332,7 @@ static void __xencons_tx_flush(void)
                sz = wp - wc;
                if (sz > (wbuf_size - WBUF_MASK(wc)))
                        sz = wbuf_size - WBUF_MASK(wc);
-               if (xen_start_info->flags & SIF_INITDOMAIN) {
+               if (is_initial_xendomain()) {
                        kcons_write_dom0(NULL, &wbuf[WBUF_MASK(wc)], sz);
                        wc += sz;
                } else {
@@ -624,7 +622,7 @@ static int __init xencons_init(void)
                return rc;
        }
 
-       if (xen_start_info->flags & SIF_INITDOMAIN) {
+       if (is_initial_xendomain()) {
                xencons_priv_irq = bind_virq_to_irqhandler(
                        VIRQ_CONSOLE,
                        0,
diff -r 91169603a8e8 -r 79afceca9065 
linux-2.6-xen-sparse/drivers/xen/console/xencons_ring.c
--- a/linux-2.6-xen-sparse/drivers/xen/console/xencons_ring.c   Tue Aug 22 
14:45:49 2006 -0600
+++ b/linux-2.6-xen-sparse/drivers/xen/console/xencons_ring.c   Wed Aug 23 
11:11:27 2006 -0600
@@ -52,13 +52,13 @@ static int xencons_irq;
 
 static inline struct xencons_interface *xencons_interface(void)
 {
-       return mfn_to_virt(xen_start_info->console_mfn);
+       return mfn_to_virt(xen_start_info->console.domU.mfn);
 }
 
 static inline void notify_daemon(void)
 {
        /* Use evtchn: this is called early, before irq is set up. */
-       notify_remote_via_evtchn(xen_start_info->console_evtchn);
+       notify_remote_via_evtchn(xen_start_info->console.domU.evtchn);
 }
 
 int xencons_ring_send(const char *data, unsigned len)
@@ -116,11 +116,11 @@ int xencons_ring_init(void)
                unbind_from_irqhandler(xencons_irq, NULL);
        xencons_irq = 0;
 
-       if (!xen_start_info->console_evtchn)
+       if (!xen_start_info->console.domU.evtchn)
                return 0;
 
        err = bind_evtchn_to_irqhandler(
-               xen_start_info->console_evtchn,
+               xen_start_info->console.domU.evtchn,
                handle_input, 0, "xencons", NULL);
        if (err <= 0) {
                printk(KERN_ERR "XEN console request irq failed %i\n", err);
diff -r 91169603a8e8 -r 79afceca9065 
linux-2.6-xen-sparse/drivers/xen/core/cpu_hotplug.c
--- a/linux-2.6-xen-sparse/drivers/xen/core/cpu_hotplug.c       Tue Aug 22 
14:45:49 2006 -0600
+++ b/linux-2.6-xen-sparse/drivers/xen/core/cpu_hotplug.c       Wed Aug 23 
11:11:27 2006 -0600
@@ -92,7 +92,7 @@ static int setup_cpu_watcher(struct noti
                .flags = XBWF_new_thread };
        (void)register_xenbus_watch(&cpu_watch);
 
-       if (!(xen_start_info->flags & SIF_INITDOMAIN)) {
+       if (!is_initial_xendomain()) {
                for_each_cpu(i)
                        vcpu_hotplug(i);
                printk(KERN_INFO "Brought up %ld CPUs\n",
diff -r 91169603a8e8 -r 79afceca9065 
linux-2.6-xen-sparse/drivers/xen/core/evtchn.c
--- a/linux-2.6-xen-sparse/drivers/xen/core/evtchn.c    Tue Aug 22 14:45:49 
2006 -0600
+++ b/linux-2.6-xen-sparse/drivers/xen/core/evtchn.c    Wed Aug 23 11:11:27 
2006 -0600
@@ -840,8 +840,7 @@ void __init xen_init_IRQ(void)
 
 #ifdef RTC_IRQ
                /* If not domain 0, force our RTC driver to fail its probe. */
-               if ((i == RTC_IRQ) &&
-                   !(xen_start_info->flags & SIF_INITDOMAIN))
+               if ((i == RTC_IRQ) && !is_initial_xendomain())
                        continue;
 #endif
 
diff -r 91169603a8e8 -r 79afceca9065 
linux-2.6-xen-sparse/drivers/xen/core/gnttab.c
--- a/linux-2.6-xen-sparse/drivers/xen/core/gnttab.c    Tue Aug 22 14:45:49 
2006 -0600
+++ b/linux-2.6-xen-sparse/drivers/xen/core/gnttab.c    Wed Aug 23 11:11:27 
2006 -0600
@@ -41,6 +41,8 @@
 #include <asm/pgtable.h>
 #include <asm/uaccess.h>
 #include <asm/synch_bitops.h>
+#include <asm/io.h>
+#include <xen/interface/memory.h>
 
 /* External tools reserve first few grant table entries. */
 #define NR_RESERVED_ENTRIES 8
@@ -350,6 +352,8 @@ void gnttab_cancel_free_callback(struct 
 }
 EXPORT_SYMBOL_GPL(gnttab_cancel_free_callback);
 
+#ifdef CONFIG_XEN
+
 #ifndef __ia64__
 static int map_pte_fn(pte_t *pte, struct page *pmd_page,
                      unsigned long addr, void *data)
@@ -410,17 +414,53 @@ int gnttab_resume(void)
 
 int gnttab_suspend(void)
 {
-
 #ifndef __ia64__
        apply_to_page_range(&init_mm, (unsigned long)shared,
                            PAGE_SIZE * NR_GRANT_FRAMES,
                            unmap_pte_fn, NULL);
 #endif
-
-       return 0;
-}
-
-static int __init gnttab_init(void)
+       return 0;
+}
+
+#else /* !CONFIG_XEN */
+
+#include <platform-pci.h>
+
+int gnttab_resume(void)
+{
+       unsigned long frames;
+       struct xen_add_to_physmap xatp;
+       unsigned int i;
+
+       frames = alloc_xen_mmio(PAGE_SIZE * NR_GRANT_FRAMES);
+
+       for (i = 0; i < NR_GRANT_FRAMES; i++) {
+               xatp.domid = DOMID_SELF;
+               xatp.idx = i;
+               xatp.space = XENMAPSPACE_grant_table;
+               xatp.gpfn = (frames >> PAGE_SHIFT) + i;
+               if (HYPERVISOR_memory_op(XENMEM_add_to_physmap, &xatp))
+                       BUG();
+       }
+
+       shared = ioremap(frames, PAGE_SIZE * NR_GRANT_FRAMES);
+       if (shared == NULL) {
+               printk("error to ioremap gnttab share frames\n");
+               return -1;
+       }
+
+       return 0;
+}
+
+int gnttab_suspend(void)
+{
+       iounmap(shared);
+       return 0;
+}
+
+#endif /* !CONFIG_XEN */
+
+int __init gnttab_init(void)
 {
        int i;
 
@@ -439,4 +479,6 @@ static int __init gnttab_init(void)
        return 0;
 }
 
+#ifdef CONFIG_XEN
 core_initcall(gnttab_init);
+#endif
diff -r 91169603a8e8 -r 79afceca9065 
linux-2.6-xen-sparse/drivers/xen/core/reboot.c
--- a/linux-2.6-xen-sparse/drivers/xen/core/reboot.c    Tue Aug 22 14:45:49 
2006 -0600
+++ b/linux-2.6-xen-sparse/drivers/xen/core/reboot.c    Wed Aug 23 11:11:27 
2006 -0600
@@ -106,7 +106,8 @@ static void pre_suspend(void)
        clear_fixmap(FIX_SHARED_INFO);
 
        xen_start_info->store_mfn = mfn_to_pfn(xen_start_info->store_mfn);
-       xen_start_info->console_mfn = mfn_to_pfn(xen_start_info->console_mfn);
+       xen_start_info->console.domU.mfn =
+               mfn_to_pfn(xen_start_info->console.domU.mfn);
 }
 
 static void post_suspend(void)
diff -r 91169603a8e8 -r 79afceca9065 
linux-2.6-xen-sparse/drivers/xen/core/skbuff.c
--- a/linux-2.6-xen-sparse/drivers/xen/core/skbuff.c    Tue Aug 22 14:45:49 
2006 -0600
+++ b/linux-2.6-xen-sparse/drivers/xen/core/skbuff.c    Wed Aug 23 11:11:27 
2006 -0600
@@ -121,8 +121,7 @@ static int __init skbuff_init(void)
        for (order = 0; order <= MAX_SKBUFF_ORDER; order++) {
                size = PAGE_SIZE << order;
                sprintf(name[order], "xen-skb-%lu", size);
-               if (is_running_on_xen() &&
-                   (xen_start_info->flags & SIF_PRIVILEGED))
+               if (is_running_on_xen() && is_initial_xendomain())
                        skbuff_order_cachep[order] = kmem_cache_create(
                                name[order], size, size, 0,
                                skbuff_ctor, skbuff_dtor);
diff -r 91169603a8e8 -r 79afceca9065 
linux-2.6-xen-sparse/drivers/xen/core/smpboot.c
--- a/linux-2.6-xen-sparse/drivers/xen/core/smpboot.c   Tue Aug 22 14:45:49 
2006 -0600
+++ b/linux-2.6-xen-sparse/drivers/xen/core/smpboot.c   Wed Aug 23 11:11:27 
2006 -0600
@@ -255,7 +255,14 @@ void __init smp_prepare_cpus(unsigned in
 
        xen_smp_intr_init(0);
 
-       for_each_cpu_mask (cpu, cpu_possible_map) {
+       /* Restrict the possible_map according to max_cpus. */
+       while ((num_possible_cpus() > 1) && (num_possible_cpus() > max_cpus)) {
+               for (cpu = NR_CPUS-1; !cpu_isset(cpu, cpu_possible_map); cpu--)
+                       continue;
+               cpu_clear(cpu, cpu_possible_map);
+       }
+
+       for_each_cpu (cpu) {
                if (cpu == 0)
                        continue;
 
@@ -266,7 +273,8 @@ void __init smp_prepare_cpus(unsigned in
 #endif
                gdt_descr->address = get_zeroed_page(GFP_KERNEL);
                if (unlikely(!gdt_descr->address)) {
-                       printk(KERN_CRIT "CPU%d failed to allocate GDT\n", cpu);
+                       printk(KERN_CRIT "CPU%d failed to allocate GDT\n",
+                              cpu);
                        continue;
                }
                gdt_descr->size = GDT_SIZE;
@@ -294,7 +302,7 @@ void __init smp_prepare_cpus(unsigned in
                irq_ctx_init(cpu);
 
 #ifdef CONFIG_HOTPLUG_CPU
-               if (xen_start_info->flags & SIF_INITDOMAIN)
+               if (is_initial_xendomain())
                        cpu_set(cpu, cpu_present_map);
 #else
                cpu_set(cpu, cpu_present_map);
@@ -304,12 +312,6 @@ void __init smp_prepare_cpus(unsigned in
        }
 
        init_xenbus_allowed_cpumask();
-
-       /* Currently, Xen gives no dynamic NUMA/HT info. */
-       for (cpu = 1; cpu < NR_CPUS; cpu++) {
-               cpu_sibling_map[cpu] = cpumask_of_cpu(cpu);
-               cpu_core_map[cpu]    = cpumask_of_cpu(cpu);
-       }
 
 #ifdef CONFIG_X86_IO_APIC
        /*
diff -r 91169603a8e8 -r 79afceca9065 
linux-2.6-xen-sparse/drivers/xen/netback/common.h
--- a/linux-2.6-xen-sparse/drivers/xen/netback/common.h Tue Aug 22 14:45:49 
2006 -0600
+++ b/linux-2.6-xen-sparse/drivers/xen/netback/common.h Wed Aug 23 11:11:27 
2006 -0600
@@ -64,9 +64,9 @@ typedef struct netif_st {
 
        /* Physical parameters of the comms window. */
        grant_handle_t   tx_shmem_handle;
-       grant_ref_t      tx_shmem_ref; 
+       grant_ref_t      tx_shmem_ref;
        grant_handle_t   rx_shmem_handle;
-       grant_ref_t      rx_shmem_ref; 
+       grant_ref_t      rx_shmem_ref;
        unsigned int     evtchn;
        unsigned int     irq;
 
@@ -78,7 +78,10 @@ typedef struct netif_st {
 
        /* Set of features that can be turned on in dev->features. */
        int features;
-       int can_queue;
+
+       /* Internal feature information. */
+       int can_queue:1;        /* can queue packets for receiver? */
+       int copying_receiver:1; /* copy packets to receiver?       */
 
        /* Allow netif_be_start_xmit() to peek ahead in the rx request ring. */
        RING_IDX rx_req_cons_peek;
diff -r 91169603a8e8 -r 79afceca9065 
linux-2.6-xen-sparse/drivers/xen/netback/loopback.c
--- a/linux-2.6-xen-sparse/drivers/xen/netback/loopback.c       Tue Aug 22 
14:45:49 2006 -0600
+++ b/linux-2.6-xen-sparse/drivers/xen/netback/loopback.c       Wed Aug 23 
11:11:27 2006 -0600
@@ -218,7 +218,7 @@ static int __init make_loopback(int i)
        return err;
 }
 
-static void __init clean_loopback(int i)
+static void __exit clean_loopback(int i)
 {
        struct net_device *dev1, *dev2;
        char dev_name[IFNAMSIZ];
diff -r 91169603a8e8 -r 79afceca9065 
linux-2.6-xen-sparse/drivers/xen/netback/netback.c
--- a/linux-2.6-xen-sparse/drivers/xen/netback/netback.c        Tue Aug 22 
14:45:49 2006 -0600
+++ b/linux-2.6-xen-sparse/drivers/xen/netback/netback.c        Wed Aug 23 
11:11:27 2006 -0600
@@ -43,6 +43,7 @@ struct netbk_rx_meta {
 struct netbk_rx_meta {
        skb_frag_t frag;
        int id;
+       int copy:1;
 };
 
 static void netif_idx_release(u16 pending_idx);
@@ -68,13 +69,11 @@ static struct timer_list net_timer;
 #define MAX_PENDING_REQS 256
 
 static struct sk_buff_head rx_queue;
-static multicall_entry_t rx_mcl[NET_RX_RING_SIZE+1];
-static mmu_update_t rx_mmu[NET_RX_RING_SIZE];
-static gnttab_transfer_t grant_rx_op[NET_RX_RING_SIZE];
-static unsigned char rx_notify[NR_IRQS];
 
 static unsigned long mmap_vstart;
 #define MMAP_VADDR(_req) (mmap_vstart + ((_req) * PAGE_SIZE))
+
+static void *rx_mmap_area;
 
 #define PKT_PROT_LEN 64
 
@@ -147,6 +146,31 @@ static inline int is_xen_skb(struct sk_b
        return (cp == skbuff_cachep);
 }
 
+/*
+ * We can flip without copying the packet unless:
+ *  1. The data is not allocated from our special cache; or
+ *  2. The main data area is shared; or
+ *  3. One or more fragments are shared; or
+ *  4. There are chained fragments.
+ */
+static inline int is_flippable_skb(struct sk_buff *skb)
+{
+       int frag;
+
+       if (!is_xen_skb(skb) || skb_cloned(skb))
+               return 0;
+
+       for (frag = 0; frag < skb_shinfo(skb)->nr_frags; frag++) {
+               if (page_count(skb_shinfo(skb)->frags[frag].page) > 1)
+                       return 0;
+       }
+
+       if (skb_shinfo(skb)->frag_list != NULL)
+               return 0;
+
+       return 1;
+}
+
 static struct sk_buff *netbk_copy_skb(struct sk_buff *skb)
 {
        struct skb_shared_info *ninfo;
@@ -156,6 +180,8 @@ static struct sk_buff *netbk_copy_skb(st
        int len;
        int headlen;
 
+       BUG_ON(skb_shinfo(skb)->frag_list != NULL);
+
        nskb = alloc_skb(SKB_MAX_HEAD(0), GFP_ATOMIC);
        if (unlikely(!nskb))
                goto err;
@@ -254,13 +280,11 @@ int netif_be_start_xmit(struct sk_buff *
                goto drop;
        }
 
-       /*
-        * We do not copy the packet unless:
-        *  1. The data is shared; or
-        *  2. The data is not allocated from our special cache.
-        *  3. The data is fragmented.
-        */
-       if (skb_cloned(skb) || skb_is_nonlinear(skb) || !is_xen_skb(skb)) {
+       /* Copy the packet here if it's destined for a flipping
+          interface but isn't flippable (e.g. extra references to
+          data)
+       */
+       if (!netif->copying_receiver && !is_flippable_skb(skb)) {
                struct sk_buff *nskb = netbk_copy_skb(skb);
                if ( unlikely(nskb == NULL) )
                        goto drop;
@@ -306,7 +330,7 @@ static void xen_network_done_notify(void
 /* 
  * Add following to poll() function in NAPI driver (Tigon3 is example):
  *  if ( xen_network_done() )
- *      tg3_enable_ints(tp); 
+ *      tg3_enable_ints(tp);
  */
 int xen_network_done(void)
 {
@@ -314,66 +338,113 @@ int xen_network_done(void)
 }
 #endif
 
-static u16 netbk_gop_frag(netif_t *netif, struct page *page, int count, int i)
-{
-       multicall_entry_t *mcl = rx_mcl + count;
-       mmu_update_t *mmu = rx_mmu + count;
-       gnttab_transfer_t *gop = grant_rx_op + count;
+struct netrx_pending_operations {
+       unsigned trans_prod, trans_cons;
+       unsigned mmu_prod, mmu_cons;
+       unsigned mcl_prod, mcl_cons;
+       unsigned copy_prod, copy_cons;
+       unsigned meta_prod, meta_cons;
+       mmu_update_t *mmu;
+       gnttab_transfer_t *trans;
+       gnttab_copy_t *copy;
+       multicall_entry_t *mcl;
+       struct netbk_rx_meta *meta;
+};
+
+/* Set up the grant operations for this fragment.  If it's a flipping
+   interface, we also set up the unmap request from here. */
+static u16 netbk_gop_frag(netif_t *netif, struct netbk_rx_meta *meta,
+                         int i, struct netrx_pending_operations *npo,
+                         struct page *page, unsigned long size,
+                         unsigned long offset)
+{
+       mmu_update_t *mmu;
+       gnttab_transfer_t *gop;
+       gnttab_copy_t *copy_gop;
+       multicall_entry_t *mcl;
        netif_rx_request_t *req;
        unsigned long old_mfn, new_mfn;
 
        old_mfn = virt_to_mfn(page_address(page));
 
-       if (!xen_feature(XENFEAT_auto_translated_physmap)) {
-               new_mfn = alloc_mfn();
-
-               /*
-                * Set the new P2M table entry before reassigning
-                * the old data page. Heed the comment in
-                * pgtable-2level.h:pte_page(). :-)
-                */
-               set_phys_to_machine(page_to_pfn(page), new_mfn);
-
-               MULTI_update_va_mapping(mcl, (unsigned long)page_address(page),
-                                       pfn_pte_ma(new_mfn, PAGE_KERNEL), 0);
-
-               mmu->ptr = ((maddr_t)new_mfn << PAGE_SHIFT) |
-                       MMU_MACHPHYS_UPDATE;
-               mmu->val = page_to_pfn(page);
-       }
-
        req = RING_GET_REQUEST(&netif->rx, netif->rx.req_cons + i);
-       gop->mfn = old_mfn;
-       gop->domid = netif->domid;
-       gop->ref = req->gref;
+       if (netif->copying_receiver) {
+               /* The fragment needs to be copied rather than
+                  flipped. */
+               meta->copy = 1;
+               copy_gop = npo->copy + npo->copy_prod++;
+               copy_gop->source.domid = DOMID_SELF;
+               copy_gop->source.offset = offset;
+               copy_gop->source.u.gmfn = old_mfn;
+               copy_gop->dest.domid = netif->domid;
+               copy_gop->dest.offset = 0;
+               copy_gop->dest.u.ref = req->gref;
+               copy_gop->len = size;
+               copy_gop->flags = GNTCOPY_dest_gref;
+       } else {
+               meta->copy = 0;
+               if (!xen_feature(XENFEAT_auto_translated_physmap)) {
+                       new_mfn = alloc_mfn();
+
+                       /*
+                        * Set the new P2M table entry before
+                        * reassigning the old data page. Heed the
+                        * comment in pgtable-2level.h:pte_page(). :-)
+                        */
+                       set_phys_to_machine(page_to_pfn(page), new_mfn);
+
+                       mcl = npo->mcl + npo->mcl_prod++;
+                       MULTI_update_va_mapping(mcl,
+                                            (unsigned long)page_address(page),
+                                            pfn_pte_ma(new_mfn, PAGE_KERNEL),
+                                            0);
+
+                       mmu = npo->mmu + npo->mmu_prod++;
+                       mmu->ptr = ((maddr_t)new_mfn << PAGE_SHIFT) |
+                               MMU_MACHPHYS_UPDATE;
+                       mmu->val = page_to_pfn(page);
+               }
+
+               gop = npo->trans + npo->trans_prod++;
+               gop->mfn = old_mfn;
+               gop->domid = netif->domid;
+               gop->ref = req->gref;
+       }
        return req->id;
 }
 
-static void netbk_gop_skb(struct sk_buff *skb, struct netbk_rx_meta *meta,
-                         int count)
+static void netbk_gop_skb(struct sk_buff *skb,
+                         struct netrx_pending_operations *npo)
 {
        netif_t *netif = netdev_priv(skb->dev);
        int nr_frags = skb_shinfo(skb)->nr_frags;
        int i;
        int extra;
-
-       meta[count].frag.page_offset = skb_shinfo(skb)->gso_type;
-       meta[count].frag.size = skb_shinfo(skb)->gso_size;
-       extra = !!meta[count].frag.size + 1;
+       struct netbk_rx_meta *head_meta, *meta;
+
+       head_meta = npo->meta + npo->meta_prod++;
+       head_meta->frag.page_offset = skb_shinfo(skb)->gso_type;
+       head_meta->frag.size = skb_shinfo(skb)->gso_size;
+       extra = !!head_meta->frag.size + 1;
 
        for (i = 0; i < nr_frags; i++) {
-               meta[++count].frag = skb_shinfo(skb)->frags[i];
-               meta[count].id = netbk_gop_frag(netif, meta[count].frag.page,
-                                               count, i + extra);
+               meta = npo->meta + npo->meta_prod++;
+               meta->frag = skb_shinfo(skb)->frags[i];
+               meta->id = netbk_gop_frag(netif, meta, i + extra, npo,
+                                         meta->frag.page,
+                                         meta->frag.size,
+                                         meta->frag.page_offset);
        }
 
        /*
         * This must occur at the end to ensure that we don't trash
         * skb_shinfo until we're done.
         */
-       meta[count - nr_frags].id = netbk_gop_frag(netif,
-                                                  virt_to_page(skb->data),
-                                                  count - nr_frags, 0);
+       head_meta->id = netbk_gop_frag(netif, head_meta, 0, npo,
+                                      virt_to_page(skb->data),
+                                      skb_headlen(skb),
+                                      offset_in_page(skb->data));
+
        netif->rx.req_cons += nr_frags + extra;
 }
 
@@ -385,32 +456,48 @@ static inline void netbk_free_pages(int 
                put_page(meta[i].frag.page);
 }
 
-static int netbk_check_gop(int nr_frags, domid_t domid, int count)
-{
-       multicall_entry_t *mcl = rx_mcl + count;
-       gnttab_transfer_t *gop = grant_rx_op + count;
+/* This is a twin to netbk_gop_skb.  Assume that netbk_gop_skb was
+   used to set up the operations on the top of
+   netrx_pending_operations, which have since been done.  Check that
+   they didn't give any errors and advance over them. */
+static int netbk_check_gop(int nr_frags, domid_t domid,
+                          struct netrx_pending_operations *npo)
+{
+       multicall_entry_t *mcl;
+       gnttab_transfer_t *gop;
+       gnttab_copy_t     *copy_op;
        int status = NETIF_RSP_OKAY;
        int i;
 
        for (i = 0; i <= nr_frags; i++) {
-               if (!xen_feature(XENFEAT_auto_translated_physmap)) {
-                       /* The update_va_mapping() must not fail. */
-                       BUG_ON(mcl->result != 0);
-                       mcl++;
-               }
-
-               /* Check the reassignment error code. */
-               if (gop->status != 0) { 
-                       DPRINTK("Bad status %d from grant transfer to DOM%u\n",
-                               gop->status, domid);
-                       /*
-                        * Page no longer belongs to us unless GNTST_bad_page,
-                        * but that should be a fatal error anyway.
-                        */
-                       BUG_ON(gop->status == GNTST_bad_page);
-                       status = NETIF_RSP_ERROR; 
-               }
-               gop++;
+               if (npo->meta[npo->meta_cons + i].copy) {
+                       copy_op = npo->copy + npo->copy_cons++;
+                       if (copy_op->status != GNTST_okay) {
+                               DPRINTK("Bad status %d from copy to DOM%d.\n",
+                                       gop->status, domid);
+                               status = NETIF_RSP_ERROR;
+                       }
+               } else {
+                       if (!xen_feature(XENFEAT_auto_translated_physmap)) {
+                               mcl = npo->mcl + npo->mcl_cons++;
+                               /* The update_va_mapping() must not fail. */
+                               BUG_ON(mcl->result != 0);
+                       }
+
+                       gop = npo->trans + npo->trans_cons++;
+                       /* Check the reassignment error code. */
+                       if (gop->status != 0) {
+                               DPRINTK("Bad status %d from grant transfer to 
DOM%u\n",
+                                       gop->status, domid);
+                               /*
+                                * Page no longer belongs to us unless
+                                * GNTST_bad_page, but that should be
+                                * a fatal error anyway.
+                                */
+                               BUG_ON(gop-