diff options
| author | Louis Burda <quent.burda@gmail.com> | 2023-02-03 11:59:43 -0600 |
|---|---|---|
| committer | Louis Burda <quent.burda@gmail.com> | 2023-02-03 11:59:43 -0600 |
| commit | 1715c9d6e1aa977b407081fb3164edbf1534fb5c (patch) | |
| tree | 1802d90d850164f2387098c238214641b75e86e9 /test/kvm-targetstep_guest.S | |
| parent | 0c825583fc20f1b91c56e1aaf450d6a753d24658 (diff) | |
| download | cachepc-1715c9d6e1aa977b407081fb3164edbf1534fb5c.tar.gz cachepc-1715c9d6e1aa977b407081fb3164edbf1534fb5c.zip | |
Properly implement target gfn stepping
Diffstat (limited to 'test/kvm-targetstep_guest.S')
| -rw-r--r-- | test/kvm-targetstep_guest.S | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/test/kvm-targetstep_guest.S b/test/kvm-targetstep_guest.S new file mode 100644 index 0000000..6625c54 --- /dev/null +++ b/test/kvm-targetstep_guest.S @@ -0,0 +1,40 @@ +#include "cachepc/const.h" + +#define TARGET_SET 15 + +.text +.align(16) +.code16gcc + +guest: +.rept L1_LINESIZE * L1_SETS * 2 + nop +.endr + + mov $0, %cx + mov $CPC_GUEST_START_TRACK, %bx + mov $KVM_HC_CPC_VMMCALL_SIGNAL, %ax + vmmcall + + mov $(L1_LINESIZE * (L1_SETS + 11)), %bx + movb (%bx), %bl + + mov $(L1_LINESIZE * (L1_SETS + 13)), %bx + movb (%bx), %bl + + mov $(L1_LINESIZE * (L1_SETS + 15)), %bx + movb (%bx), %bl + + # this should only be partially single-stepped if + # single-stepping is limited to the first page +.rept L1_LINESIZE * L1_SETS * 2 + nop +.endr + + mov $0, %cx + mov $CPC_GUEST_STOP_TRACK, %bx + mov $KVM_HC_CPC_VMMCALL_SIGNAL, %ax + vmmcall + + jmp guest + |
