Skip to content

[x86_64] Fetch MMIO fault instructions across guest pages safely #405

Open

Description

@Solicey

When an x86_64 guest triggers an MMIO fault, hvisor translates the guest RIP to a host physical address and reads 15 consecutive bytes from that address for instruction decoding. This assumes that adjacent guest instruction pages are also adjacent in host memory. If the instruction crosses a page boundary, the decoder may read unrelated or unmapped host memory.

The MMIO instruction decoder should fetch only the bytes it needs, translating each guest page independently. If a required guest instruction page is not present, hvisor should inject a guest page fault with the correct fault address and leave RIP unchanged.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingx86_64

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions