From b8f40e776af1a82116a44ce8fac34f343194f033 Mon Sep 17 00:00:00 2001 From: Louis Burda Date: Wed, 11 Jan 2023 18:56:23 +0100 Subject: Fix kvm-eviction kvm & sev support --- Makefile | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 5d11bba..e7b04df 100755 --- a/Makefile +++ b/Makefile @@ -2,6 +2,7 @@ LINUX ?= linux CORES ?= $(shell ls /dev/cpu | wc -l) LOAD ?= $(CORES) JOBS ?= $(CORES) + PWD := $(shell pwd) BINS = test/eviction test/kvm-eviction # test/kvm-execstep @@ -9,7 +10,11 @@ BINS = test/eviction test/kvm-eviction # test/kvm-execstep # BINS += test/qemu-aes_guest test/qemu-aes_host BINS += util/svme util/debug util/reset -CFLAGS = -I . -I linux/usr/include -I test -Wunused-variable -Wunknown-pragmas +CFLAGS = -I . -I linux/usr/include -I test +CFLAGS += -g -Wunused-variable -Wunknown-pragmas +CFLAGS += -fsanitize=address + +CACHEPC_UAPI = cachepc/uapi.h cachepc/const.h all: build $(BINS) @@ -22,7 +27,7 @@ $(LINUX)/arch/x86/kvm/cachepc: ln -sf $(PWD)/cachepc $@ host: - # generate host kernel and Module.symvers for depmod + # build host kernel and Module.symvers for depmod cp extra/.config linux/.config git -C $(LINUX) add . git -C $(LINUX) stash @@ -50,10 +55,12 @@ freq: update: git -C $(LINUX) diff 0aaa1e599bee256b3b15643bbb95e80ce7aa9be5 -G. > patch.diff -test/%: test/%.c cachepc/uapi.h - clang -o $@ $< $(CFLAGS) -fsanitize=address +util/%: util/%.c $(CACHEPC_UAPI) + +test/%: test/%.c $(CACHEPC_UAPI) -util/%: util/%.c cachepc/uapi.h - clang -o $@ $< $(CFLAGS) -fsanitize=address +test/kvm-eviction: test/kvm-eviction.c test/kvm-eviction_guest.S \ + test/kvm-eviction.h $(CACHEPC_UAPI) + $(CC) -o $@ test/kvm-eviction.c test/kvm-eviction_guest.S $(CFLAGS) .PHONY: all clean host build load freq update -- cgit v1.2.3-71-gd317