summaryrefslogtreecommitdiffstats
path: root/test/kvm-eviction_guest.S
diff options
context:
space:
mode:
authorLouis Burda <quent.burda@gmail.com>2023-01-11 18:56:23 +0100
committerLouis Burda <quent.burda@gmail.com>2023-01-11 18:56:23 +0100
commitb8f40e776af1a82116a44ce8fac34f343194f033 (patch)
treef2a0a531a6c99d74f18ae81cf6d9c2ceee243672 /test/kvm-eviction_guest.S
parentbca09eea299f162a27be3f6a59160afe86c8d525 (diff)
downloadcachepc-b8f40e776af1a82116a44ce8fac34f343194f033.tar.gz
cachepc-b8f40e776af1a82116a44ce8fac34f343194f033.zip
Fix kvm-eviction kvm & sev support
Diffstat (limited to 'test/kvm-eviction_guest.S')
-rw-r--r--test/kvm-eviction_guest.S24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/kvm-eviction_guest.S b/test/kvm-eviction_guest.S
new file mode 100644
index 0000000..7f6140d
--- /dev/null
+++ b/test/kvm-eviction_guest.S
@@ -0,0 +1,24 @@
+#include "kvm-eviction.h"
+#include "cachepc/const.h"
+
+#define TARGET_SET 15
+
+.global start_guest_with
+.global stop_guest_with
+
+.global start_guest_without
+.global stop_guest_without
+
+start_guest_with:
+ mov $(L1_LINESIZE * TARGET_SET), %rbx
+ mov (%rbx), %bl
+ mov $KVM_HC_CPC_VMMCALL_EXIT, %rax
+ vmmcall
+ jmp start_guest_with
+stop_guest_with:
+
+start_guest_without:
+ mov $KVM_HC_CPC_VMMCALL_EXIT, %rax
+ vmmcall
+ jmp start_guest_without
+stop_guest_without: