From f52d556e0e1bf2350b3b42cff198550a267ceb0b Mon Sep 17 00:00:00 2001 From: Johannes Stoelp Date: Wed, 15 Nov 2023 22:40:07 +0100 Subject: example/long_mode: demonstrate mmio exits for virtually mapped but not physically backed memory --- guest/guest64.S | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'guest') diff --git a/guest/guest64.S b/guest/guest64.S index 533d186..1ca91a5 100644 --- a/guest/guest64.S +++ b/guest/guest64.S @@ -18,6 +18,13 @@ mov byte ptr ds:[0x2002], 0xcc mov byte ptr ds:[0x2003], 0xdd + // Write to virtually mapped by not physically mapped address, this should + // trigger a `KVM_EXIT_MMIO (w)`. + mov byte ptr ds:[0x4000], 0x12 + mov byte ptr ds:[0x4001], 0x34 + mov byte ptr ds:[0x4002], 0x56 + mov byte ptr ds:[0x4003], 0x78 + // Trigger `KVM_EXIT_HLT`. hlt -- cgit v1.2.3