[GSOC 2024] Hardware acceleration for Haiku's QEMU port

Hi everyone, I’m looking forward to apply for GSoC 2024 with the project “Hardware acceleration for Haiku’s QEMU port”, which is listed here.

I’m working on a draft of a proposal which I’ll be luckily able to share in a few days. I’ve submitted so far a dummy implementation of NVMM which simply checks for VMX support (this is the hardware I have) in the way that NVMM’s VMX backend does it. I would like to know if this a sufficient code contribution or not. See it here.

Any comments are appreciated. Thank you!

27 Likes

This tropic has a lot of interesting references:

4 Likes

Hardware acceleration has been on my wishlist for a long time! If it works from QEmu then that’s even better! I hope you get this rolling! I am not alone in wanting this either. I say go ahead and formalize your application so this can get started!

5 Likes

Great to hear that you want to work on this. I too have wanted hardware accelerated virtualization for years.

5 Likes

Having this would be awesome, it’s been on my wishlist for a long time.

1 Like

I’d be interested in making a game engine for Haiku if it gets hardware-acceleration, even if it’s only in a VM.

This is not what you think it is. It’s not 3d acceleration but support for hardware virtualization.

3 Likes

Ah, so not that kind of hardware acceleration, it’s the other kind.

2 Likes

I (finally) have a draft of my proposal to share:

Any comments are welcome. Thank you!

13 Likes

Hello,

This is a great proposal! It’s very complete and shows that you have done the needed research. I added two comments in the doc but it’s just some minor details.

I think your next step should be to look into the review comments in your patch submission on Gerrit and reply to them if you haven’t already done so. We can move part of the discussion into the forum if it gets too involved for Gerrit (which isn’t the best place to discuss design and development approaches).

6 Likes

This is a great proposal! It’s very complete and shows that you have done the needed research. I added two comments in the doc but it’s just some minor details.

Thank you !

I think your next step should be to look into the review comments in your patch submission on Gerrit and reply to them if you haven’t already done so. We can move part of the discussion into the forum if it gets too involved for Gerrit (which isn’t the best place to discuss design and development approaches).

Yesterday I pushed another patchset which essentially refactors the code to fit the more OS-independent DragonFlyBSD style of NVMM. I already replied to every comment, although I left 2 of them unresolved (since they may involve more debate).

I agree that moving part of the discussion here may be a good idea, if it gets too long.

1 Like

I suppose we should CC @KapiX here, because he was poking at porting NVMM at one point. I’m not sure how far he got (or if he ever published his code anywhere, I don’t see it if so.) Perhaps he might have some ideas or comments (or even some code to get you jump-started…)

1 Like

I never got anything usable. I have uploaded the code at my GitHub fork just now.

nvmm-old branch is my attempt with NetBSD code. I think this one was compiling, but a lot of things were missing.
nvmm2-old is a restart with DragonflyBSD code. (This one is IMO the way to go, its abstraction is better.)

5 Likes

The only thing I’ll point out here is you should get someone to give you an AMD machine… just to test on, its not much sense to leave out the svm code when you are probably already doing 99% of the work to implement it also.

Many people here would be happy to send you a test laptop etc… myself included. I have a stack of Lenovo Zacate based laptops that do have SVM if you want one.They are chunky durable machines I just toss around wherever I need a computer. They aren’t fast just cheap and durable.

In any case even if you don’t get around to SVM this will be a great addition to Haiku anyway!

2 Likes

Thank you ! Looks useful.

nvmm2-old is a restart with DragonflyBSD code. (This one is IMO the way to go, its abstraction is better.)

Yes, the proposal already states that we’re porting DragonFlyBSD version of nvmm.

The only thing I’ll point out here is you should get someone to give you an AMD machine… just to test on, its not much sense to leave out the svm code when you are probably already doing 99% of the work to implement it also.

I agree, that’s why I stated that if time and circumstances (that is, I can get my hands on a machine that supports SVM) allow this will get done. I still think that it’s better to get VMX+QEMU working first, and then add SVM.

Many people here would be happy to send you a test laptop etc… myself included. I have a stack of Lenovo Zacate based laptops that do have SVM if you want one.They are chunky durable machines I just toss around wherever I need a computer. They aren’t fast just cheap and durable.

Great to hear! If the project is selected for GSoC and things go well I hope it’ll get to the point of adding SVM support too. I would call for a SVM machine then, if needed.

1 Like

By the way what area of the world are you located in?

I live in Spain

Ah well if you end up wanting a laptop lets check for something from Europe first so we avoid shipping costs and such, but I’m still good to send you one if needed I’m located east coast USA.