Skip to content
Snippets Groups Projects
Commit 2e324e43 authored by Florent Gluck's avatar Florent Gluck
Browse files

Fixed typo in 02-KVM.md: run instead of kvm_run (thanks to Mr. Bach)

parent e630c106
No related branches found
No related tags found
No related merge requests found
......@@ -742,7 +742,7 @@ How does VMM retrieve an hypercall's parameters?
```{.c .tiny}
if (run->io.direction == KVM_EXIT_IO_OUT) { // See struct kvm_run in "(6) Create a vCPU"
uint8_t *addr = (uint8_t *)kvm_run + run->io.data_offset;
uint8_t *addr = (uint8_t *)run + run->io.data_offset;
uint32_t value;
switch (run->io.size) {
case 1: // Retrieve the 8-bit value written by the guest
......@@ -804,7 +804,7 @@ if (run->mmio.is_write) { // See struct kvm_run in "(6) Create a vCPU"
```{.c .tiny}
if (run->io.direction == KVM_EXIT_IO_IN) { // See struct kvm_run
uint8_t *addr = (uint8_t *)kvm_run + run->io.data_offset;
uint8_t *addr = (uint8_t *)run + run->io.data_offset;
switch (run->io.size) {
case 1: { // Guest is reading 8 bits from the port
*addr = 0x12; // 8-bit example value injected into the guest
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment