summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorLouis Burda <quent.burda@gmail.com>2022-12-19 00:53:51 +0100
committerLouis Burda <quent.burda@gmail.com>2022-12-19 00:54:23 +0100
commitd63e7e7e8c8632d7c0b1a9e2d2f9532b4f4815ae (patch)
tree34471df766ec5ed29fe27b7fbf0093789b5089c1 /Makefile
parent5e99ea7f111134c7a1c7103590b711d59edafa9b (diff)
downloadcachepc-d63e7e7e8c8632d7c0b1a9e2d2f9532b4f4815ae.tar.gz
cachepc-d63e7e7e8c8632d7c0b1a9e2d2f9532b4f4815ae.zip
Fix page fault handling and investigate exec stepping with minimal vm
Diffstat (limited to 'Makefile')
-rwxr-xr-xMakefile22
1 files changed, 18 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index e245d79..e64e421 100755
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,9 @@
LINUX ?= linux
+JOBS ?= 15
PWD := $(shell pwd)
-BINS = test/eviction test/access test/kvm test/sev test/sev-es test/sevstep
+BINS = test/eviction test/access test/kvm test/sev test/sev-es
+BINS += test/fullstep test/execstep
BINS += test/aes-detect_guest test/aes-detect_host
BINS += test/access-detect_guest test/access-detect_host
BINS += test/readsvme util/debug util/reset
@@ -18,9 +20,21 @@ clean:
$(LINUX)/arch/x86/kvm/cachepc:
ln -sf $(PWD)/cachepc $@
+host:
+ # generate host kernel and Module.symvers for depmod
+ cp extra/.config linux/.config
+ git -C $(LINUX) add .
+ git -C $(LINUX) stash
+ git -C $(LINUX) checkout 0aaa1e5
+ $(MAKE) -C $(LINUX) oldconfig
+ $(MAKE) -C $(LINUX) prepare
+ $(MAKE) -C $(LINUX) -j $(JOBS) bindeb-pkg
+ git -C $(LINUX) checkout HEAD
+ git -C $(LINUX) stash pop
+
build: $(LINUX)/arch/x86/kvm/cachepc
- $(MAKE) -C $(LINUX) -j6 M=arch/x86/kvm
- $(MAKE) -C $(LINUX) -j6 M=crypto
+ $(MAKE) -C $(LINUX) -j $(JOBS) M=arch/x86/kvm modules
+ $(MAKE) -C $(LINUX) -j $(JOBS) M=crypto modules
load:
sudo rmmod kvm_amd || true
@@ -48,4 +62,4 @@ test/%: test/%.c cachepc/uapi.h
util/%: util/%.c cachepc/uapi.h
clang -o $@ $< $(CFLAGS) -fsanitize=address
-.PHONY: all clean build load freq update
+.PHONY: all clean host build load freq update