mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
This helper will eventually be the core "can a guest configured like this run on the CPU?" logic. For now, it is just enough of a stub to allow us to replace the hypercall interface while retaining the previous behaviour. It will be expanded as various other bits of CPUID handling get cleaned up. Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Reviewed-by: Jan Beulich <jbeulich@suse.com> Release-acked-by: Juergen Gross <jgross@suse.com>
46 lines
932 B
Makefile
46 lines
932 B
Makefile
XEN_ROOT = $(CURDIR)/../../..
|
|
include $(XEN_ROOT)/tools/Rules.mk
|
|
|
|
TARGET-y := test-cpu-policy
|
|
|
|
# For brevity, these tests make extensive use of designated initialisers in
|
|
# anonymous unions, but GCCs older than 4.6 can't cope. Ignore the test in
|
|
# this case.
|
|
ifneq ($(clang),y)
|
|
TARGET-$(call cc-ver,$(CC),lt,0x040600) :=
|
|
endif
|
|
|
|
ifeq ($(TARGET-y),)
|
|
$(warning Test harness not built, use newer compiler than "$(CC)" (version $(shell $(CC) -dumpversion)))
|
|
endif
|
|
|
|
.PHONY: all
|
|
all: $(TARGET-y)
|
|
|
|
.PHONY: run
|
|
run: $(TARGET-y)
|
|
./$(TARGET-y)
|
|
|
|
.PHONY: clean
|
|
clean:
|
|
$(RM) -f -- *.o .*.d .*.d2 test-cpu-policy
|
|
|
|
.PHONY: distclean
|
|
distclean: clean
|
|
$(RM) -f -- *~
|
|
|
|
.PHONY: install
|
|
install: all
|
|
|
|
.PHONY: uninstall
|
|
|
|
CFLAGS += -Werror $(CFLAGS_xeninclude) -D__XEN_TOOLS__ -O3
|
|
CFLAGS += $(APPEND_CFLAGS)
|
|
|
|
vpath %.c ../../../xen/lib/x86
|
|
|
|
test-cpu-policy: test-cpu-policy.o msr.o cpuid.o policy.o
|
|
$(CC) $(CFLAGS) $^ -o $@
|
|
|
|
-include $(DEPS_INCLUDE)
|