-
Notifications
You must be signed in to change notification settings - Fork 12
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
Add hv headers directly in the repo #165
base: main
Are you sure you want to change the base?
Conversation
Could you pleas elaborate more details of the purpose?
|
So it doesn't have to live in kernel uapi, with all the baggage that carries.
Yes, although the copies need not contain all the same definitions; the interfaces we use in the kernel are not exactly the same as those we need in userspace.
Ideally these hypervisor interfaces don't need to change - they are backward compatible. Adding new things is easy; just add the definitions.
Any userspace library using our interface will need to know how to use the passthru interfaces. |
scripts/generate_binding.py
Outdated
@@ -47,13 +51,19 @@ def generate_unified_mshv_headers(kernel_hdr_path): | |||
fp.write("typedef _Bool bool;\n") | |||
data = "" | |||
|
|||
for header in hv_header_files: | |||
header_path = f"{hv_headers_path}/{header}" |
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.
What happens if someone runs the script from scripts directory?
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.
Isn't it better to use absolute path?
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 idea, i'll fix it
Note these are from the 6.6 kernel. There is no breaking change to the uapi from 5.15, however. Add defintion for __packed at the top of hvgdk_mini.h Signed-off-by: Nuno Das Neves <nunodasneves@linux.microsoft.com>
There are many many redundant definitions that are only used in the kernel. Remove most of these - further pruning is probably needed. Signed-off-by: Nuno Das Neves <nunodasneves@linux.microsoft.com>
Signed-off-by: Nuno Das Neves <nunodasneves@linux.microsoft.com>
MSHV_DEV_VFIO_GROUP-prefixed names have changed to MSHV_DEV_VFIO_FILE in the newly generated bindings. The values remain the same. Signed-off-by: Nuno Das Neves <nunodasneves@linux.microsoft.com>
Signed-off-by: Nuno Das Neves <nunodasneves@linux.microsoft.com>
c7a6534
to
9df6597
Compare
Could you please look into the clippy error? |
Summary of the PR
The hv headers are leaving the kernel uapi directory.
The goal is to only use these for 'passthrough' parts of the interface - i.e. the generic hypercall IOCTL and run vp IOCTL.