aboutsummaryrefslogtreecommitdiffhomepage
path: root/guest/guest64.S
diff options
context:
space:
mode:
Diffstat (limited to 'guest/guest64.S')
-rw-r--r--guest/guest64.S8
1 files changed, 7 insertions, 1 deletions
diff --git a/guest/guest64.S b/guest/guest64.S
index 6629273..533d186 100644
--- a/guest/guest64.S
+++ b/guest/guest64.S
@@ -9,9 +9,15 @@
// Trigger `KVM_EXIT_IO:KVM_EXIT_IO_IN` by reading byte to memory from input port.
mov dx, 0x1000 // Input port.
- lea di, [in_dest] // Destination address.
+ lea di, [rip + in_dest] // Destination address.
insb // Read byte from input port dx to ds:di.
+ // Write to allocated virtual addresses.
+ mov byte ptr ds:[0x2000], 0xaa
+ mov byte ptr ds:[0x2001], 0xbb
+ mov byte ptr ds:[0x2002], 0xcc
+ mov byte ptr ds:[0x2003], 0xdd
+
// Trigger `KVM_EXIT_HLT`.
hlt