rust-vmm / vmm-reference

A VMM implementation based of rust-vmm components
Apache License 2.0
146 stars 61 forks source link

Prepare gdt for upstream #184

Closed andreeaflorescu closed 2 years ago

andreeaflorescu commented 2 years ago

This PR improves the GDT code to make it ready to be upstreamed. The approach is to move the code from vm-vcpu (which will contain the product specific code) to vm-vcpu-ref (which is the crate that's going to be published). Then, future improvements are added directly in the vm-vcpu-ref code.

For some weird reason in tests I had to explicitly write the type of guest_memory to be GuestMemoryMmap because otherwise the tests will not compile with the error being that the B type corresponding to the Bitmap is missing.

andreeaflorescu commented 2 years ago

Note for reviewers: the PR is easier to review commit by commit because in the first commit I'm just moving the gdt from vm-vcpu to vm-vcpu-ref, and in the following commit I'm actually doing the work needed for publishing and some updates to the interface.