ia64/xen-unstable

changeset 2771:1b906236acc9

bitkeeper revision 1.1159.1.302 (41820056F4IoF8mF3QNQee_Ra_iXeg)

Merge maf46@ssh-relay1.cl.cam.ac.uk:/usr/groups/xeno/BK/xeno.bk
into fleming.research:/scratch/fleming/mafetter/xen.head
author mafetter@fleming.research
date Fri Oct 29 08:33:26 2004 +0000 (2004-10-29)
parents 52530182af7c 7f8159c0f9dc
children 2a16b903818f
files xen/Rules.mk xen/arch/x86/Rules.mk xen/arch/x86/domain.c
line diff
     1.1 --- a/xen/Rules.mk	Thu Oct 28 23:24:39 2004 +0000
     1.2 +++ b/xen/Rules.mk	Fri Oct 29 08:33:26 2004 +0000
     1.3 @@ -4,6 +4,7 @@ debug       ?= n
     1.4  debugger    ?= n
     1.5  perfc       ?= n
     1.6  trace       ?= n
     1.7 +optimize    ?= y
     1.8  
     1.9  # Currently supported architectures:
    1.10  #  {COMPILE,TARGET}_ARCH    := x86
    1.11 @@ -19,6 +20,7 @@ HDRS    := $(wildcard $(BASEDIR)/include
    1.12  HDRS    += $(wildcard $(BASEDIR)/include/scsi/*.h)
    1.13  HDRS    += $(wildcard $(BASEDIR)/include/hypervisor-ifs/*.h)
    1.14  HDRS    += $(wildcard $(BASEDIR)/include/asm-$(TARGET_ARCH)/*.h)
    1.15 +HDRS    += $(wildcard $(BASEDIR)/include/asm-$(TARGET_ARCH)/$(TARGET_SUBARCH)/*.h)
    1.16  # compile.h is always regenerated, but other files shouldn't be rebuilt
    1.17  HDRS    := $(subst $(BASEDIR)/include/xen/compile.h,,$(HDRS))
    1.18  
     2.1 --- a/xen/arch/x86/Rules.mk	Thu Oct 28 23:24:39 2004 +0000
     2.2 +++ b/xen/arch/x86/Rules.mk	Fri Oct 29 08:33:26 2004 +0000
     2.3 @@ -4,10 +4,17 @@
     2.4  CC := gcc
     2.5  LD := ld
     2.6  
     2.7 -CFLAGS  := -nostdinc -fno-builtin -fno-common -fno-strict-aliasing -O3
     2.8 -CFLAGS  += -iwithprefix include -Wall -Werror -fomit-frame-pointer -pipe
     2.9 +CFLAGS  := -nostdinc -fno-builtin -fno-common -fno-strict-aliasing
    2.10 +CFLAGS  += -iwithprefix include -Wall -Werror -pipe
    2.11  CFLAGS  += -I$(BASEDIR)/include -Wno-pointer-arith -Wredundant-decls
    2.12  
    2.13 +ifeq ($(optimize),y)
    2.14 +CFLAGS  += -O3 -fomit-frame-pointer
    2.15 +else
    2.16 +x86_32/usercopy.o: CFLAGS += -O1
    2.17 +endif
    2.18 +
    2.19 +
    2.20  # Prevent floating-point variables from creeping into Xen.
    2.21  CFLAGS  += -msoft-float
    2.22  
     3.1 --- a/xen/arch/x86/domain.c	Thu Oct 28 23:24:39 2004 +0000
     3.2 +++ b/xen/arch/x86/domain.c	Fri Oct 29 08:33:26 2004 +0000
     3.3 @@ -770,7 +770,14 @@ int construct_dom0(struct domain *p,
     3.4          {
     3.5              page->u.inuse.type_info &= ~PGT_type_mask;
     3.6              page->u.inuse.type_info |= PGT_l2_page_table;
     3.7 +
     3.8 +            /*
     3.9 +             * No longer writable: decrement the type_count.
    3.10 +             * Installed as CR3: increment both the ref_count and type_count.
    3.11 +             * Net: just increment the ref_count.
    3.12 +             */
    3.13              get_page(page, p); /* an extra ref because of readable mapping */
    3.14 +
    3.15              /* Get another ref to L2 page so that it can be pinned. */
    3.16              if ( !get_page_and_type(page, p, PGT_l2_page_table) )
    3.17                  BUG();
    3.18 @@ -783,6 +790,12 @@ int construct_dom0(struct domain *p,
    3.19  	    page->u.inuse.type_info |= 
    3.20  		((dsi.v_start>>L2_PAGETABLE_SHIFT)+(count-1))<<PGT_va_shift;
    3.21  
    3.22 +            /*
    3.23 +             * No longer writable: decrement the type_count.
    3.24 +             * This is an L1 page, installed in a validated L2 page:
    3.25 +             * increment both the ref_count and type_count.
    3.26 +             * Net: just increment the ref_count.
    3.27 +             */
    3.28              get_page(page, p); /* an extra ref because of readable mapping */
    3.29          }
    3.30          l1tab++;