diff options
| author | Louis Burda <quent.burda@gmail.com> | 2023-01-23 20:38:36 +0100 |
|---|---|---|
| committer | Louis Burda <quent.burda@gmail.com> | 2023-01-23 20:42:02 +0100 |
| commit | a554be1738d019e4b5d5b0b0ee9aac6b6ac302a6 (patch) | |
| tree | 014d2c1ddbe018c53e0cb1a6da30faae26f304b9 /test/kvm-step_guest.S | |
| parent | 769e05dd63ed0379e7325da6e82c0c46c151ef4e (diff) | |
| download | cachepc-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.S | 27 |
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: |
