Initial x86_64 support#198
Draft
dreamliner787-9 wants to merge 37 commits intomainfrom
Draft
Conversation
8b68cec to
8aba050
Compare
28236b5 to
5a0f3dc
Compare
4f28839 to
2036786
Compare
Contributor
|
Can this be split up more / cleaned up more? A lot of the commits seem to be fixes for previous commits. It would be easier if say ACPI, were different PRs. There's too much to really look at it. |
Contributor
Author
Yep I'm still cleaning the code up, I'd imagine Ivan will want to squash everything before merging so I haven't really cleaned up the git history yet. |
b8f7f00 to
174216f
Compare
62bf9a9 to
71519f6
Compare
a5bda12 to
aed6135
Compare
Add virtualisation of x86 ACPI, APIC, CMOS, COM port, cpuid, guest memory, HPET, instruction decoding, Port I/O, MSRs and PCI. Currently, only booting raw Linux kernel and initial ramdisk is supported. UEFI, virtio, PCI passthrough, etc not yet supported as of this commit. See github.com/au-ts/libvmm/tree/x86_64_rebased for original development history. Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
See github.com/au-ts/libvmm/tree/x86_64_rebased for original development history. Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
Rather than hackily including the C header emitted by the AML compiler. Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
As it is not needed to boot bare Linux and Buildroot. Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
To prevent cases where users forgets to in VMM, and so that the library have more control over fault handling. As in certain cases for certain VM exits, we must inject a fault into the VCPU. Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
Rather than manually measuring it which is error prone and can cause Linux's timer watchdog to go off Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
Allow guests to properly use AVX extension if enabled by seL4. By default seL4 doesn't enable AVX so there isn't an immediate benefit from the commit. But if you enable AVX in seL4 then it will automatically be enabled for the guest. Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
To prevent undefined behaviours. Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
Mainly deduplicating port I/O fault handling code Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
So that we only need 1 timer driver channel. Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
Removed assumption that guest RAM starts from zero for ACPI tables construction. Added more checks to guard against buffer overflow. Made sure that all tables are naturally aligned. Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
It is working now, and would scale better in terms of multi core than relying on an external timer driver that's based on a global timer device. Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
aed6135 to
d343690
Compare
Signed-off-by: Bill Nguyen <bill.nguyen@unsw.edu.au>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR:
Depends on :
microkit_vcpu_x86_deferred_resume()call seL4/microkit#431The following aspects of a x86 PC have been emulated in software:
Note that power state transitions (sleep, etc) are not yet supported.
Currently we are using Intel's hardware accelerated APICv to improve performance, this is not yet supported by seL4. We are working on an RFC to add this feature to seL4 officially.
The following APICv features are used:
UEFI, virtio, PCI passthrough, etc are not included in this PR as they are being actively worked on.
See github.com/au-ts/libvmm/tree/x86_64_rebased for original development history.
An example boot sequence on an Intel® Xeon® W-1250 host: