From a554be1738d019e4b5d5b0b0ee9aac6b6ac302a6 Mon Sep 17 00:00:00 2001 From: Louis Burda Date: Mon, 23 Jan 2023 20:38:36 +0100 Subject: Use 16-bit realmode assembly for guests (!) --- test/kvm-step_guest.S | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) (limited to 'test/kvm-step_guest.S') 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: -- cgit v1.2.3-71-gd317