From 3ebd8b163dc8d5679d90927de1c2fcd639882362 Mon Sep 17 00:00:00 2001 From: Johannes Stoelp Date: Fri, 14 Mar 2025 02:13:23 +0100 Subject: guest: add 64bit guest to toy with msr Guest to toy with msr register and the swapgs instruction. --- guest/guest64.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'guest/guest64.S') diff --git a/guest/guest64.S b/guest/guest64.S index 1ca91a5..dc3e986 100644 --- a/guest/guest64.S +++ b/guest/guest64.S @@ -2,7 +2,7 @@ .section .boot, "ax", @progbits // Trigger `KVM_EXIT_IO:KVM_EXIT_IO_OUT` by writing string to output port. - mov rdx, 0x1000 // Output port. + mov rdx, 0x42 // Output port (magic for string fmt). lea rsi, [rip + msg] // Address of string. mov rcx, [rip + msg_len] // Len of string. rep outsb // Write ds:rsi to output port rdx. @@ -30,7 +30,7 @@ .section .rodata, "a", @progbits msg: - .asciz "Hello from Long Mode!\n" + .ascii "Hello from Long Mode!\n" msg_len: .byte .-msg -- cgit v1.2.3