Skip to content
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

Some files seem missing when trying to use scripts/generate_binding.py #117

Open
MouriNaruto opened this issue Oct 6, 2023 · 4 comments

Comments

@MouriNaruto
Copy link

In the latest scripts/generate_binding.py, we know we need the following files in Linux kernel source code to generate the bindings.

  • include/hyperv/hvgdk_mini.h
  • include/hyperv/hvgdk.h
  • include/hyperv/hvhdk_mini.h
  • include/hyperv/hvhdk.h
  • include/linux/mshv.h

I am confused because I cannot find these files in the latest mainline Linux kernel source code. So, I need some help.

Kenji Mouri

@liuw
Copy link
Member

liuw commented Oct 9, 2023

Please see here: https://lore.kernel.org/linux-hyperv/1696010501-24584-1-git-send-email-nunodasneves@linux.microsoft.com/T/#t

We're still in the process of usptreaming our code.

@MouriNaruto
Copy link
Author

MouriNaruto commented Oct 9, 2023

@liuw

Thanks, I have found them in the link you provided successfully. The original hvgdk and hvhdk headers in the link is MIT licensed. I am really excited about that because I am planning a book which talks about how to develop UEFI applications and Unikernel style OS for Hyper-V Gen 2 VMs.

But I also hope standalone version of hvgdk and hvhdk headers can be existed. (For example, use something portable headers like stdint.h to define integers, and keep the original Hyper-V header coding style instead of Linux kernel coding style.) I think it will help more Hyper-V users.

Kenji Mouri

@NunoDasNeves
Copy link
Collaborator

But I also hope standalone version of hvgdk and hvhdk headers can be existed. (For example, use something portable headers like stdint.h to define integers, and keep the original Hyper-V header coding style instead of Linux kernel coding style.) I think it will help more Hyper-V users.

Yes, we'd like that too, hoping to get there eventually - I don't have any info regarding timeframe unfortunately.
Right now we only have the "Linux-ized" versions of the headers.

@MouriNaruto
Copy link
Author

MouriNaruto commented Oct 29, 2024

Yes, we'd like that too, hoping to get there eventually - I don't have any info regarding timeframe unfortunately.
Right now we only have the "Linux-ized" versions of the headers.

@NunoDasNeves

I think it's the best news for me which I have ever heard for this domain in the current stage. But I want to add some notes may off-topic but necessary.

  • Thanks for the mshv patch which created and submitted by you. I have learned a lot from the MIT definitions provided in that patch. (I think the newest version I know for that patch should be https://github.com/microsoft/OHCL-Linux-Kernel/tree/e9017243ba9b424f6516c4b206f454a1c2585fd2/include/uapi/hyperv.)
  • Your explicit reply which provided here is the good start for the hope of that goal. I have created https://github.com/ProjectMile/Mile.HyperV to learn Microsoft's definitions for Hyper-V guest interfaces from several permissive license sources since last year because I don't want to see Hyper-V users who need that solution like me will be worry for no usable solutions like 2023's me. In the recently, the firmware for Hyper-V Generation 2 virtual machines (https://github.com/microsoft/mu_msvm) has been open-sourced. I have learned a lot and updated my headers. I am deeply grateful for that. I hope I can use 100% of Microsoft's official Hyper-V guest definitions instead my headers for the foreseeable future.
  • I hope I can create a lightweight HAL (H may mean the Hypervisor instead of Hardware, lol) library for the current sources and finally make these open-source for my book, my hobby, and more people be helped.

Kenji Mouri

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants