summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/kvm.c6
-rwxr-xr-xtest/sevstepbin0 -> 1287616 bytes
-rw-r--r--test/sevstep.c4
3 files changed, 3 insertions, 7 deletions
diff --git a/test/kvm.c b/test/kvm.c
index cd0dd4d..20ac005 100644
--- a/test/kvm.c
+++ b/test/kvm.c
@@ -46,12 +46,6 @@ extern uint8_t __stop_guest_with[];
extern uint8_t __start_guest_without[];
extern uint8_t __stop_guest_without[];
-static bool ready = false;
-static bool processed = false;
-
-static ssize_t sysret;
-static pid_t victim_pid;
-
static struct kvm kvm;
static struct kvm_run *kvm_run;
diff --git a/test/sevstep b/test/sevstep
new file mode 100755
index 0000000..b9fe9ea
--- /dev/null
+++ b/test/sevstep
Binary files differ
diff --git a/test/sevstep.c b/test/sevstep.c
index 3ca7f03..39b610d 100644
--- a/test/sevstep.c
+++ b/test/sevstep.c
@@ -4,6 +4,8 @@
#include <sys/ioctl.h>
#include <err.h>
+#include <unistd.h>
+#include <fcntl.h>
#include <stdlib.h>
#include <stdio.h>
@@ -13,7 +15,7 @@ main(int argc, const char **argv)
track_all_pages_t tracking;
int ret, fd;
- fd = open("/proc/cachepc");
+ fd = open("/proc/cachepc", O_RDONLY);
if (!fd) err(1, "open");
tracking.track_mode = KVM_PAGE_TRACK_ACCESS;