Skip to content

RFC: Add Windows Hypervisor Platform APIs#767

Draft
benpye wants to merge 1 commit intoretep998:0.3from
benpye:whvp
Draft

RFC: Add Windows Hypervisor Platform APIs#767
benpye wants to merge 1 commit intoretep998:0.3from
benpye:whvp

Conversation

@benpye
Copy link
Copy Markdown

@benpye benpye commented May 6, 2019

I'm looking to get some advice on how to get this merged. This adds the Windows Hypervisor Platform APIs.

There is one type that has been especially troublesome, WHV_UINT128. It represents a 128 bit integer. I have had to manually specify the alignment on it and all unions using it to ensure it has the correct 16 byte alignment. Unfortunately u128 in Rust is not stable over the FFI boundary and in any case, it currently has the wrong alignment, see rust-lang/rust#54341

It seems to me that at least the following still need doing:

  • Structs/unions should have tests to at least ensure they are the expected size/alignment
  • .def file needs writing for non msvc platform - only x86_64 is supported by WHVP.

@retep998 retep998 added the waiting on author Waiting for author to update PR based on feedback label Aug 28, 2019
@retep998
Copy link
Copy Markdown
Owner

Because WHV_UINT128 does require #[repr(align(16))] I will likely be unable to merge this until work on winapi 0.4 commences.

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

Labels

waiting on author Waiting for author to update PR based on feedback

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants