DO NOT MERGE: refactor ukvm to add ukvm backend#150
DO NOT MERGE: refactor ukvm to add ukvm backend#150djwillia wants to merge 4 commits intoSolo5:masterfrom
Conversation
|
|
| * the default value (0x1f80). | ||
| */ | ||
| unsigned default_mxcsr = 0x1f80; | ||
| __asm__ __volatile__("ldmxcsr %0\n" : : "m"(default_mxcsr)); |
There was a problem hiding this comment.
The odd thing is that I can't find a similar workaround in xHyve for the mxcsr value... how does it deal with this idiosyncracy I wonder.
There was a problem hiding this comment.
I also looked (unsuccessfully) for some code in xHyve to give me a hint how to set the mxcsr from the hypervisor. I couldn't figure out how to write any value to that register in hypervisor context via Hypervisor.framework. My best guess at the moment is that this value is probably being initially set from within guest context, perhaps in some part of normal Linux boot.
|
Starting with the two main points in @djwillia's first comment:
General comments on the code (copied from paper notes, the diff is too big for me to comment on it directly on Github):
Apart from these comments, nice work! The Also, I think the changes should be split up somehow. Need to print out(!) the diff and stare at it for a while, will follow up. |
|
This has been superseded by #171, so I think we can close it? |
|
No one's complained and #171 is long since merged, so I'm closing this. |
This is the result of splitting ukvm into a top half and a bottom half in order to get a better understanding of the abstract ukvm interface and add another platform (MacOSX/Hypervisor.framework in addition to the original Linux/KVM). It works: I can run the same
.ukvmbinary with eitheruhvf-binorukvm-binfor the standalone tests and the Mirage tests I use (console, block, stackv4). It's still a bit rough, but I think it's high time to get some feedback now.@mato @hannes, I know you guys don't run MacOSX, but I would appreciate your feedback even if you can't run it on your systems :)
@ricarkol hopefully it works on your mac!
As the
ukvmdirectory was renamed tomonitors, there is a change needed in the mirage tool if building mirage unikernels (see djwillia/mirage@841a9b2)In addition to comments on the code itself, there are two major issues that we need to discuss:
What to do about PVCLOCK. Hypervisor.framework doesn't have it (and there are reasons that something "trappable" is preferable for e.g., deterministic replay). At the moment, I've switched things to
rdtscbut it's incomplete and hacky at the moment.What to do about the build tools.
uhvfneeds to be built on MacOSX to get the appropriate headers and link with the appropriate libraries. But most of the Mirage build typically happens (for me) using Docker for Mac, which means it's really happening in a Linux VM. I'm not sure what the best way is to make this happen seamlessly.If you'd like it partitioned into separate commits or something, let me know!