-
Couldn't load subscription status.
- Fork 152
Support mapping host memory into the guest #696
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
Conversation
Usually, an unknown HV message is the result of a double fault or similar: something going wrong in the guest. This commit ensures that a core file is generated when this happens and the crashdump feature is enabled. Signed-off-by: Lucy Menon <[email protected]> [hyperlight_host] Expose MemoryRegion structure It is a convenient tuple of information to use when mapping a new region into the sandbox. Signed-off-by: Lucy Menon <[email protected]>
9cc2cff to
59b8c0c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work, @syntactically!
Overall it looks good to me, but I think someone with more expertise on the guest paging setup should have a look.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Don't know if you want to wait for more reviews or not.
AFAICT this only adds functionality and doesn't change any existing behaviour, so I'm ok if you want to merge it.
It gives me confidence that all tests are passing :-)
Could you create an issue to add tests for it?
59b8c0c to
3fd4ca5
Compare
Signed-off-by: Lucy Menon <[email protected]>
Signed-off-by: Lucy Menon <[email protected]>
Because we don't presently switch stacks on interrupt entry, we cannot support a red zone in the ABI. rustc's x86_64-unknown-none target already does not use a redzone, but clang's x86_64-unknown-none-linux target, which we use for compiling C code, does use a red zone by default. This commit modifies the clang options that we use to remove uses of a red zone from generated code. Signed-off-by: Lucy Menon <[email protected]>
Previously, we did remove the error code from the stack before `iret`'ing, which resulted in the return failing. Signed-off-by: Lucy Menon <[email protected]>
We unfortunately don't have a good way of making sure that code run in exception contexts doesn't use floating point and SSE instructions. This commit simply always saves and restores the relevant registers as a workaround. We should at some point look into the alternative of ensuring that simd instructions aren't used in code reachable from an exception handler, and see if that actually improves performance. Signed-off-by: Lucy Menon <[email protected]>
This commit adds a simple mechanism for guests to register exception handlers. It does not support any kind of chaining, so there can only be one exception handler per exception per guest, which should probably be improved in the future. This will be used in hyperlight-wasm shortly. Signed-off-by: Lucy Menon <[email protected]>
3fd4ca5 to
ea6fa8f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice to see some tests or examples to verify the use of this new functionality
See #698, #699, and hyperlight-dev/hyperlight-wasm#102 |
Fixes #666