summaryrefslogtreecommitdiffstats
path: root/test/kvm-step_guest.S
diff options
context:
space:
mode:
authorLouis Burda <quent.burda@gmail.com>2023-01-23 20:38:36 +0100
committerLouis Burda <quent.burda@gmail.com>2023-01-23 20:42:02 +0100
commita554be1738d019e4b5d5b0b0ee9aac6b6ac302a6 (patch)
tree014d2c1ddbe018c53e0cb1a6da30faae26f304b9 /test/kvm-step_guest.S
parent769e05dd63ed0379e7325da6e82c0c46c151ef4e (diff)
downloadcachepc-a554be1738d019e4b5d5b0b0ee9aac6b6ac302a6.tar.gz
cachepc-a554be1738d019e4b5d5b0b0ee9aac6b6ac302a6.zip
Use 16-bit realmode assembly for guests (!)
Diffstat (limited to 'test/kvm-step_guest.S')
-rw-r--r--test/kvm-step_guest.S27
1 files changed, 16 insertions, 11 deletions
diff --git a/test/kvm-step_guest.S b/test/kvm-step_guest.S
index 29c29f2..3d1b0e7 100644
--- a/test/kvm-step_guest.S
+++ b/test/kvm-step_guest.S
@@ -5,18 +5,23 @@
.global guest_start
.global guest_stop
+.align(16)
+.code16gcc
+
guest_start:
- mov $(L1_LINESIZE * (L1_SETS + 9)), %rbx
-# hlt
-# mov $(L1_LINESIZE * (L1_SETS + 10)), %rbx
- mov $(L1_LINESIZE * (L1_SETS + 11)), %rbx
-# hlt
-# mov $(L1_LINESIZE * (L1_SETS + 12)), %rbx
- mov $(L1_LINESIZE * (L1_SETS + 13)), %rbx
-# hlt
-# mov $(L1_LINESIZE * (L1_SETS + 14)), %rbx
- mov $(L1_LINESIZE * (L1_SETS + 15)), %rbx
+ mov $(L1_LINESIZE * (L1_SETS + 11)), %bx
+ movb (%bx), %bl
+ hlt
+
+ mov $(L1_LINESIZE * (L1_SETS + 13)), %bx
+ movb (%bx), %bl
hlt
- jmp guest_start
+
+ mov $(L1_LINESIZE * (L1_SETS + 15)), %bx
+ movb (%bx), %bl
+ hlt
+
+ mov $0x00, %ax
+ jmp *%ax
guest_stop: