direct-io.hg

view extras/mini-os/Makefile @ 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 414dabe82a31
children ec4979587156
line source
1 debug ?= y
2 pae ?= n
4 XEN_ROOT = ../..
5 include $(XEN_ROOT)/Config.mk
7 # Set TARGET_ARCH
8 override TARGET_ARCH := $(XEN_TARGET_ARCH)
10 # NB. '-Wcast-qual' is nasty, so I omitted it.
11 CFLAGS := -fno-builtin -Wall -Werror -Wredundant-decls -Wno-format
12 CFLAGS += -Wstrict-prototypes -Wnested-externs -Wpointer-arith -Winline
14 override CPPFLAGS := -Iinclude $(CPPFLAGS)
15 ASFLAGS = -D__ASSEMBLY__
17 LDLIBS = -L. -lminios
18 LDFLAGS := -N -T minios-$(TARGET_ARCH).lds
20 ifeq ($(TARGET_ARCH),x86_32)
21 CFLAGS += -m32 -march=i686
22 LDFLAGS += -m elf_i386
23 endif
25 ifeq ($(TARGET_ARCH)$(pae),x86_32y)
26 CFLAGS += -DCONFIG_X86_PAE=1
27 ASFLAGS += -DCONFIG_X86_PAE=1
28 endif
30 ifeq ($(TARGET_ARCH),x86_64)
31 CFLAGS += -m64 -mno-red-zone -fpic -fno-reorder-blocks
32 CFLAGS += -fno-asynchronous-unwind-tables
33 LDFLAGS += -m elf_x86_64
34 endif
36 ifeq ($(debug),y)
37 CFLAGS += -g
38 else
39 CFLAGS += -O3
40 endif
42 TARGET := mini-os
44 HEAD := $(TARGET_ARCH).o
45 OBJS := $(patsubst %.c,%.o,$(wildcard *.c))
46 OBJS += $(patsubst %.c,%.o,$(wildcard lib/*.c))
47 OBJS += $(patsubst %.c,%.o,$(wildcard xenbus/*.c))
48 OBJS += $(patsubst %.c,%.o,$(wildcard console/*.c))
50 HDRS := $(wildcard include/*.h)
51 HDRS += $(wildcard include/xen/*.h)
53 .PHONY: default
54 default: $(TARGET)
56 .PHONY: links
57 links:
58 [ -e include/xen ] || ln -sf ../../../xen/include/public include/xen
60 libminios.a: links $(OBJS) $(HEAD)
61 $(AR) r libminios.a $(HEAD) $(OBJS)
63 $(TARGET): libminios.a $(HEAD)
64 $(LD) $(LDFLAGS) $(HEAD) $(LDLIBS) -o $@.elf
65 gzip -f -9 -c $@.elf >$@.gz
67 .PHONY: clean
68 clean:
69 find . -type f -name '*.o' | xargs rm -f
70 rm -f *.o *~ core $(TARGET).elf $(TARGET).raw $(TARGET) $(TARGET).gz
71 rm -f libminios.a
72 find . -type l | xargs rm -f
74 %.o: %.c $(HDRS) Makefile
75 $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
77 %.o: %.S $(HDRS) Makefile
78 $(CC) $(ASFLAGS) $(CPPFLAGS) -c $< -o $@
80 define all_sources
81 ( find . -follow -name SCCS -prune -o -name '*.[chS]' -print )
82 endef
84 .PHONY: cscope
85 cscope:
86 $(all_sources) > cscope.files
87 cscope -k -b -q