aboutsummaryrefslogtreecommitdiffhomepage
path: root/guest/guest64.S
diff options
context:
space:
mode:
authorJohannes Stoelp <johannes.stoelp@gmail.com>2025-03-14 02:13:23 +0100
committerJohannes Stoelp <johannes.stoelp@gmail.com>2025-03-14 02:14:56 +0100
commit3ebd8b163dc8d5679d90927de1c2fcd639882362 (patch)
treef9a8c33265371606d93ddf5b350fe4e095afb3f8 /guest/guest64.S
parentb16851fb799b880c31cc65a9fa1aba592b4ce5b4 (diff)
downloadmini-kvm-rs-3ebd8b163dc8d5679d90927de1c2fcd639882362.tar.gz
mini-kvm-rs-3ebd8b163dc8d5679d90927de1c2fcd639882362.zip
guest: add 64bit guest to toy with msrHEADmain
Guest to toy with msr register and the swapgs instruction.
Diffstat (limited to 'guest/guest64.S')
-rw-r--r--guest/guest64.S4
1 files changed, 2 insertions, 2 deletions
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