direct-io.hg

view xen/Rules.mk @ 10734:9b7e1ea4c4d2

[HVM] Sync p2m table across all vcpus on x86_32p xen.
We found VGA acceleration can not work on SMP VMX guests on x86_32p
xen, this is caused by the way we construct p2m table today: only the 1st
l2 page table slot that maps p2m table pages is copied to none-vcpu0 vcpu
monitor page table when VMX is created. But VGA acceleration will
create some p2m table entries beyond the 1st l2 page table slot after HVM is
created, so only vcpu0 can get these p2m entries, and other vcpu can
not do VGA acceleration.

Signed-off-by: Xin Li <xin.b.li@intel.com>
author kfraser@localhost.localdomain
date Wed Jul 26 11:34:12 2006 +0100 (2006-07-26)
parents 35a29c8f0bab
children b786bfb058eb
line source
2 #
3 # If you change any of these configuration options then you must
4 # 'make clean' before rebuilding.
5 #
6 verbose ?= n
7 perfc ?= n
8 perfc_arrays?= n
9 crash_debug ?= n
11 # Hardcoded configuration implications and dependencies.
12 # Do this is a neater way if it becomes unwieldy.
13 ifeq ($(debug),y)
14 verbose := y
15 endif
16 ifeq ($(perfc_arrays),y)
17 perfc := y
18 endif
20 XEN_ROOT=$(BASEDIR)/..
21 include $(XEN_ROOT)/Config.mk
23 # Set ARCH/SUBARCH appropriately.
24 override COMPILE_SUBARCH := $(XEN_COMPILE_ARCH)
25 override TARGET_SUBARCH := $(XEN_TARGET_ARCH)
26 override COMPILE_ARCH := $(shell echo $(XEN_COMPILE_ARCH) | \
27 sed -e 's/\(x86\|powerpc\).*/\1/')
28 override TARGET_ARCH := $(shell echo $(XEN_TARGET_ARCH) | \
29 sed -e 's/\(x86\|powerpc\).*/\1/')
31 TARGET := $(BASEDIR)/xen
33 HDRS := $(wildcard $(BASEDIR)/include/xen/*.h)
34 HDRS += $(wildcard $(BASEDIR)/include/public/*.h)
35 HDRS += $(wildcard $(BASEDIR)/include/asm-$(TARGET_ARCH)/*.h)
36 HDRS += $(wildcard $(BASEDIR)/include/asm-$(TARGET_ARCH)/$(TARGET_SUBARCH)/*.h)
38 INSTALL := install
39 INSTALL_DATA := $(INSTALL) -m0644
40 INSTALL_DIR := $(INSTALL) -d -m0755
42 include $(BASEDIR)/arch/$(TARGET_ARCH)/Rules.mk
44 # Do not depend on auto-generated header files.
45 HDRS := $(subst $(BASEDIR)/include/asm-$(TARGET_ARCH)/asm-offsets.h,,$(HDRS))
46 HDRS := $(subst $(BASEDIR)/include/xen/banner.h,,$(HDRS))
47 HDRS := $(subst $(BASEDIR)/include/xen/compile.h,,$(HDRS))
49 # Note that link order matters!
50 ALL_OBJS-y += $(BASEDIR)/common/built_in.o
51 ALL_OBJS-y += $(BASEDIR)/drivers/built_in.o
52 ALL_OBJS-$(ACM_SECURITY) += $(BASEDIR)/acm/built_in.o
53 ALL_OBJS-y += $(BASEDIR)/arch/$(TARGET_ARCH)/built_in.o
55 CFLAGS-y += -g -D__XEN__
56 CFLAGS-$(ACM_SECURITY) += -DACM_SECURITY
57 CFLAGS-$(verbose) += -DVERBOSE
58 CFLAGS-$(crash_debug) += -DCRASH_DEBUG
59 CFLAGS-$(perfc) += -DPERF_COUNTERS
60 CFLAGS-$(perfc_arrays) += -DPERF_ARRAYS
62 ifneq ($(max_phys_cpus),)
63 CFLAGS-y += -DMAX_PHYS_CPUS=$(max_phys_cpus)
64 endif
66 AFLAGS-y += -D__ASSEMBLY__
68 ALL_OBJS := $(ALL_OBJS-y)
69 CFLAGS := $(strip $(CFLAGS) $(CFLAGS-y))
70 AFLAGS := $(strip $(AFLAGS) $(AFLAGS-y))
72 include Makefile
74 # Ensure each subdirectory has exactly one trailing slash.
75 subdir-n := $(patsubst %,%/,$(patsubst %/,%,$(subdir-n)))
76 subdir-y := $(patsubst %,%/,$(patsubst %/,%,$(subdir-y)))
78 # Add explicitly declared subdirectories to the object list.
79 obj-y += $(patsubst %/,%/built_in.o,$(subdir-y))
81 # Add implicitly declared subdirectories (in the object list) to the
82 # subdirectory list, and rewrite the object-list entry.
83 subdir-y += $(filter %/,$(obj-y))
84 obj-y := $(patsubst %/,%/built-in.o,$(obj-y))
86 subdir-all := $(subdir-y) $(subdir-n)
88 built_in.o: $(obj-y)
89 $(LD) $(LDFLAGS) -r -o $@ $^
91 # Force execution of pattern rules (for which PHONY cannot be directly used).
92 .PHONY: FORCE
93 FORCE:
95 %/built_in.o: FORCE
96 $(MAKE) -f $(BASEDIR)/Rules.mk -C $* built_in.o
98 .PHONY: clean
99 clean:: $(addprefix _clean_, $(subdir-all))
100 rm -f *.o *~ core
101 _clean_%/: FORCE
102 $(MAKE) -f $(BASEDIR)/Rules.mk -C $* clean
104 %.o: %.c $(HDRS) Makefile
105 $(CC) $(CFLAGS) -c $< -o $@
107 %.o: %.S $(HDRS) Makefile
108 $(CC) $(CFLAGS) $(AFLAGS) -c $< -o $@