Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dornerworks x64 VM patch #5

Merged
merged 4 commits into from
May 12, 2021

Conversation

JoonasOnatsu
Copy link
Collaborator

Merge Dornerworks' patch to our repo for dev purposes. There is an open PR on upstream for this patch, but it hasn't been merged yet. See seL4#16

This PR contains commits from Dornerworks' x64 VM patches for the VMM: https://github.com/dornerworks/camkes-vm/commits/open_source_release. Parts of Dornerworks' patches have been updated and/or changed slightly to match the newer VMM structure compared to what the patches originally targeted.

Damon Lee and others added 4 commits April 9, 2021 14:49
This large commit combines a number of smaller commits in order to add
64-bit VM support to the VMM. The commits do the following:

    * Load elfs of the same architecture size
    * Support reading 64-bit vaddrs from elf files
    * Create initial address space based on guest architecture
    * Allow instruction decoding of 4-level paging scheme
    * Do not exit VMX state based on CR3 load/store in 64-bit mode
    * Use seL4_Word for vmcs and user context fields
    * Handle additional general purpose registers
    * Handle 64-bit MSRs
    * Configure 64-bit guests to boot in long mode
    * Let guest know about 64-bit hardware features in 64-bit mode
    * Add FADT and DSDT tables
    * Track guest state for additional 64-bit registers
    * Add new function to print 64-bit guest context
    * Properly emulate 64-bit trampoline code
    * Define access rights macros for vmcs initialization
    * Hardcode FADT table information
    * Set an initial stack pointer before running guest
    * Handle fetching cross-page instructions
    * Add additional x86 instruction prefixes

CCDC-GVSC DISTRIBUTION A.  Approved for public release; distribution
unlimited. OPSEC#4481.

Co-authored-by: Chris Guikema <[email protected]>
Signed-off-by: Damon Lee <[email protected]>
As the comment in the file explains, optimisation level -O3 on gcc 8.4
is too aggressive and causes issues for the guest VM. The problem isn't
limited to a single function or group of functions but rather the entire
file for some reason that requires extra investigation (but is not worth
the time to do so).

Signed-off-by: Damon Lee <[email protected]>
Previously, the physical address of the ACPI tables were being
tracked. This caused a Linux error while parsing the ACPI tables. Since
Linux does not have access to those memory regions, they would appear
empty, causing an Invalid Table Length bug print. By tracking the
virtual address that Linux expects and placing the vaddr into the ACPI
tables, Linux can parse the tables properly.

Signed-off-by: Chris Guikema <[email protected]>
@JoonasOnatsu JoonasOnatsu merged commit 8aa16ba into tiiuae:dornerworks May 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants