-
Notifications
You must be signed in to change notification settings - Fork 13
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
Introduce generic hypercall ioctl #128
Conversation
4ec6798
to
5b8f112
Compare
Please update the subject line of the PR with more meaningful one. |
cd9e047
to
ee0cfa7
Compare
ee0cfa7
to
af04ea1
Compare
Overall looks good functionally. Those macros are a bit hard to understand, If you could provide some example with data it would be good for the reviewers. |
af04ea1
to
fc82497
Compare
30759b3
to
1719d70
Compare
ee8b081
to
dc67278
Compare
dc67278
to
77d4f14
Compare
04731d9
to
2c3696d
Compare
Don't use "EIO" as a special code for determining whether there is a hypercall error. Simply check if there is a hypercall error code. Signed-off-by: Nuno Das Neves <[email protected]>
Signed-off-by: Nuno Das Neves <[email protected]>
Signed-off-by: Nuno Das Neves <[email protected]>
Signed-off-by: Nuno Das Neves <[email protected]>
This will be used with the generic hvcall ioctl for vcpus. Signed-off-by: Nuno Das Neves <[email protected]>
2c3696d
to
9ead785
Compare
@jinankjain @russell-islam @liuw This PR is reworked and ready for another round of review. |
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. Minor typos
While leaving existing implementations untouched. Add: - VmFd::hvcall_set_partition_property - VcpuFd::hvcall_translate_gva - VcpuFd::hvcall_get_cpuid_values - VcpuFd::hvcall_get_reg - VcpuFd::hvcall_set_reg Add tests for the above. Signed-off-by: Nuno Das Neves <[email protected]>
9ead785
to
c03ec9c
Compare
Summary of the PR
This PR introduces the generic hypercall IOCTL - MSHV_ROOT_HVCALL.
It can be used on both the partition and vp fds.
This IOCTL reduces the number of IOCTLs needed in the kernel interface, reducing maintenance and making the kernel code more upstreamable.
This PR introduces the IOCTL and implements some use-cases for it, but it doesn't replace the default implementations so it won't affect downstream.
Requirements
Before submitting your PR, please make sure you addressed the following
requirements:
git commit -s
), and the commitmessage has max 60 characters for the summary and max 75 characters for each
description line.
test.
Release" section of CHANGELOG.md (if no such section exists, please create one).
unsafe
code is properly documented.