Skip to content
Snippets Groups Projects
Commit b23c06bb 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 f48617a5
Branches
No related tags found
No related merge requests found
...@@ -742,7 +742,7 @@ How does VMM retrieve an hypercall's parameters? ...@@ -742,7 +742,7 @@ How does VMM retrieve an hypercall's parameters?
```{.c .tiny} ```{.c .tiny}
if (run->io.direction == KVM_EXIT_IO_OUT) { // See struct kvm_run in "(6) Create a vCPU" 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; uint32_t value;
switch (run->io.size) { switch (run->io.size) {
case 1: // Retrieve the 8-bit value written by the guest 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" ...@@ -804,7 +804,7 @@ if (run->mmio.is_write) { // See struct kvm_run in "(6) Create a vCPU"
```{.c .tiny} ```{.c .tiny}
if (run->io.direction == KVM_EXIT_IO_IN) { // See struct kvm_run 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) { switch (run->io.size) {
case 1: { // Guest is reading 8 bits from the port case 1: { // Guest is reading 8 bits from the port
*addr = 0x12; // 8-bit example value injected into the guest *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