Add Intel VT support to QEMU?
Hello Everyone
I'm a part of a school group, and we are looking at adding Intel VT
support to QEMU for a class project. We would be implementing support for VT guests, so that other VMMs that rely on VT could be run/debugged using QEMU. We are not familiar with QEMU code (yet!), so we are looking for some feedback from all of you experts.
1. Has this been attempted before, or is there any existing code for this? I saw some posts about a year ago that perhaps someone started on it, but nothing after that.
2. What would be required to implement this? Any suggestions on where to start looking would be appreciated. Obviously, the Intel VT docs are going to be necessary. Are there other things that you recommend we look at before we start?
Thanks,
Jason Martens
Quoted 3 lines · Jason Martens
1. Has this been attempted before, or is there any existing code for this? I saw some posts about a year ago that perhaps someone started on it, but nothing after that.
AMD SVM guest support was added recently, although the change note suggests it needs to run on an SVM host.
Intel VT would be a great addition alongside it, and might be able to share some of the code.
-- Jamie
Quoted 5 lines · Jamie Lokier
Quoted 3 lines · Jason Martens
1. Has this been attempted before, or is there any existing code for this? I saw some posts about a year ago that perhaps someone started on it, but nothing after that.
Quoted 7 lines
AMD SVM guest support was added recently, although the change note suggests it needs to run on an SVM host.
Intel VT would be a great addition alongside it, and might be able to share some of the code.
-- Jamie
People I don't really understand it -- but maybe it is easier for you to make KVM more portable (i.e. port it to Windows) and better integrate with Qemu ?
instead of writing from scratch
Signature · 1 line
-Alexey Eromenko "Technologov"
Quoted 6 lines · Jason Martens
Hello Everyone
I'm a part of a school group, and we are looking at adding Intel VT
support to QEMU for a class project. We would be implementing support for VT guests, so that other VMMs that rely on VT could be run/debugged using QEMU. We are not familiar with QEMU code (yet!), so we are looking for some feedback from all of you experts.
Now that's good news :-). I would really love to see this implemented.
Quoted 3 lines
1. Has this been attempted before, or is there any existing code for this? I saw some posts about a year ago that perhaps someone started on it, but nothing after that.
Well - yes and no. I implemented SVM emulation support quite some time ago, so you can base on that. It should be possible to reuse some of that logic and the basic approach is the same anyways.
Quoted 4 lines
2. What would be required to implement this? Any suggestions on where to start looking would be appreciated. Obviously, the Intel VT docs are going to be necessary. Are there other things that you recommend we look at before we start?
If I were you I'd start with the instructions themselves. Look through the docs and see what each instruction does. Implement the easy ones first (VMXON and the CR4 bit), then go forward to VMENTER and implement the world switch. As soon as you are running code fine in the guest (check using -d in_asm,cpu) you can try and go for intercepts.
By the time you have these working, you should be pretty much done.
Good luck!
Alex
Quoted 10 lines · Jason Martens
Hello Everyone
I'm a part of a school group, and we are looking at adding Intel VT
support to QEMU for a class project. We would be implementing support for VT guests, so that other VMMs that rely on VT could be run/debugged using QEMU. We are not familiar with QEMU code (yet!), so we are looking for some feedback from all of you experts.1. Has this been attempted before, or is there any existing code for this? I saw some posts about a year ago that perhaps someone started on it, but nothing after that.
I've started to implement it once, but haven't come very far. The very basic instructions are implemented, but that's it. IIRC you could load the KVM modules but it wouldn't run anything.
If you like I can try to rebase my code on the current SVN version and send you a patch series.
Quoted 4 lines
2. What would be required to implement this? Any suggestions on where to start looking would be appreciated. Obviously, the Intel VT docs are going to be necessary. Are there other things that you recommend we look at before we start?
What I used was only the Intel docs and partly the KVM sources.
Kevin
Quoted 14 lines · Kevin Wolf
Quoted 11 lines · Jason Martens
Hello Everyone
I'm a part of a school group, and we are looking at adding Intel VT
support to QEMU for a class project. We would be implementing support for VT guests, so that other VMMs that rely on VT could be run/debugged using QEMU. We are not familiar with QEMU code (yet!), so we are looking for some feedback from all of you experts.1. Has this been attempted before, or is there any existing code for this? I saw some posts about a year ago that perhaps someone started on it, but nothing after that.
Quoted 7 lines
I've started to implement it once, but haven't come very far. The very basic instructions are implemented, but that's it. IIRC you could load the KVM modules but it wouldn't run anything.
If you like I can try to rebase my code on the current SVN version and send you a patch series.
Sure, that would be great. Or, if you don't have any time just send me what you have and we can use it for reference/starting point.
Thanks,
Jason Martens