direct-io.hg

view xen/Rules.mk @ 11750:d845c9522d9e

[HVM][SVM] Check if SVM is disabled by the BIOS before enabling it.

Newer BIOS implementations will be able to disable the SVM feature,
although an additional test of an MSR (VMCR 0xC0010114 bit 4) is
necessary (set equals disabled). Bit 4 of MSR 0xc0010114 returns 0
(SVM enabled) on machines with older BIOS' without the SVM disable
feature support.

Signed-off-by: Wei Huang <wei.huang2@amd.com>=20
Signed-off-by: Tom Woller <thomas.woller@amd.com>=20
author kfraser@localhost.localdomain
date Thu Oct 12 16:12:10 2006 +0100 (2006-10-12)
parents d40dfbef8e5d
children edf0e488ea2a
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 XEN_ROOT=$(BASEDIR)/..
12 include $(XEN_ROOT)/Config.mk
14 # Hardcoded configuration implications and dependencies.
15 # Do this is a neater way if it becomes unwieldy.
16 ifeq ($(debug),y)
17 verbose := y
18 endif
19 ifeq ($(perfc_arrays),y)
20 perfc := y
21 endif
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/compile.h,,$(HDRS))
48 # Note that link order matters!
49 ALL_OBJS-y += $(BASEDIR)/common/built_in.o
50 ALL_OBJS-y += $(BASEDIR)/drivers/built_in.o
51 ALL_OBJS-$(ACM_SECURITY) += $(BASEDIR)/acm/built_in.o
52 ALL_OBJS-y += $(BASEDIR)/arch/$(TARGET_ARCH)/built_in.o
54 CFLAGS-y += -g -D__XEN__
55 CFLAGS-$(ACM_SECURITY) += -DACM_SECURITY
56 CFLAGS-$(verbose) += -DVERBOSE
57 CFLAGS-$(crash_debug) += -DCRASH_DEBUG
58 CFLAGS-$(perfc) += -DPERF_COUNTERS
59 CFLAGS-$(perfc_arrays) += -DPERF_ARRAYS
61 ifneq ($(max_phys_cpus),)
62 CFLAGS-y += -DMAX_PHYS_CPUS=$(max_phys_cpus)
63 endif
65 AFLAGS-y += -D__ASSEMBLY__
67 ALL_OBJS := $(ALL_OBJS-y)
68 CFLAGS := $(strip $(CFLAGS) $(CFLAGS-y))
69 AFLAGS := $(strip $(AFLAGS) $(AFLAGS-y))
71 include Makefile
73 # Ensure each subdirectory has exactly one trailing slash.
74 subdir-n := $(patsubst %,%/,$(patsubst %/,%,$(subdir-n)))
75 subdir-y := $(patsubst %,%/,$(patsubst %/,%,$(subdir-y)))
77 # Add explicitly declared subdirectories to the object list.
78 obj-y += $(patsubst %/,%/built_in.o,$(subdir-y))
80 # Add implicitly declared subdirectories (in the object list) to the
81 # subdirectory list, and rewrite the object-list entry.
82 subdir-y += $(filter %/,$(obj-y))
83 obj-y := $(patsubst %/,%/built-in.o,$(obj-y))
85 subdir-all := $(subdir-y) $(subdir-n)
87 built_in.o: $(obj-y)
88 $(LD) $(LDFLAGS) -r -o $@ $^
90 # Force execution of pattern rules (for which PHONY cannot be directly used).
91 .PHONY: FORCE
92 FORCE:
94 %/built_in.o: FORCE
95 $(MAKE) -f $(BASEDIR)/Rules.mk -C $* built_in.o
97 .PHONY: clean
98 clean:: $(addprefix _clean_, $(subdir-all))
99 rm -f *.o *~ core
100 _clean_%/: FORCE
101 $(MAKE) -f $(BASEDIR)/Rules.mk -C $* clean
103 %.o: %.c $(HDRS) Makefile
104 $(CC) $(CFLAGS) -c $< -o $@
106 %.o: %.S $(HDRS) Makefile
107 $(CC) $(CFLAGS) $(AFLAGS) -c $< -o $@
109 %.i: %.c $(HDRS) Makefile
110 $(CPP) $(CFLAGS) $< -o $@
112 %.s: %.S $(HDRS) Makefile
113 $(CPP) $(CFLAGS) $(AFLAGS) $< -o $@