4 ms·
If you go into to the ISA for hardware assisted virtualization, they just drop all semblance of compatibility. The memory models just work completely differentl
by Locke1689 15y ago
If you go into to the ISA for hardware assisted virtualization, they just drop all semblance of compatibility. The memory models just work completely differently. When you're writing a VMM you'll need to write two separate submodules -- one for Intel and one for AMD.
I wrote the Intel and part of the AMD for an HPC VMM. I also wrote the Intel emulation code for an unmerged QEMU patch.
Is this lack of standardization a big deal? I don't know. Kind of. Software developers generally don't have to deal with this kind of stuff and, to be honest, wouldn't know what to do if they had to. I think the major problem seems to be that compilers are a lot shittier than they should be. I'm not really surprised though because I'd love to do compiler development but that's just not a practical career choice. No one gets paid to do compiler development, so compilers suck. Is anyone surprised?
- 1amzave 15y agoI'm curious what you mean by your comments about the state of compilers. In what ways do current compilers suck? I assume you're not speaking in terms of utilizing virtualization instructions, since I'm having a hard time imagining a situation in which a compiler would be generating those. As for people not getting paid to work on compilers -- I'm not sure what you mean here, either. Intel employs people to work on ICC, I think Red Hat employs some GCC devs, Microsoft pays people to work on VC++ (a friend of mine is currently doing an internship on that team, actually), Apple employs LLVM folks, Nvidia does too for their CUDA toolchain, AMD has people working on Open64, I see job postings from Sony and various other companies in comp.compilers...is that "no one"?
- Locke1689 15y agoIt's just practically no one. Yeah, there are a few people here and there but they just don't mean much. I think the biggest single compiler dev team right now is the .NET team and they're hiring, I guess. It's not really a thriving market. You spoke about VC++ -- last summer I worked on MS SQL Server and the optimization query engine that I built required that I be able to construct optimized tail calls in C/C++. Of course, this turned into a major weeks long discussion with the VC++ team about this peephole optimization. Yes, the x86 architecture sucks and no you can't do the perfect thing, but doing the simple thing just to avoid blowing the stack would have been definitely reasonable -- about 5 years ago. Hell, I wasn't even asking for trampolining. Ugh, you get my point. Compiler development is either fragmented or stagnated or both in most projects. Right now I'm placing my hopes with LLVM, but we'll see. In what ways do current compilers suck? I assume you're not speaking in terms of utilizing virtualization instructions, since I'm having a hard time imagining a situation in which a compiler would be generating those. Well, the entire debate is about generating architecture-independent code, so that's a good example. It should be possible to generate optimized code for AMD and Intel using the same compiler. In practice, it doesn't really happen. GCC is a compiler implemented in C. In C. Anyone who took their undergrad Compiler Construction course should know what I mean here. I mean seriously, tossing around ASTs in C? I'd bet it takes 10 times the amount of concentration and time to implement an optimization in GCC than it would in ML.
- 1amzave 15y ago> Well, the entire debate is about generating architecture-independent code, so that's a good example. It should be possible to generate optimized code for AMD and Intel using the same compiler. In practice, it doesn't really happen. Wait, that's a good example? I still don't see how a compiler would (or should) care about VMM-acceleration ISA extensions. If I were writing a VMM and wanted to use those, how could I possibly express that without dropping into assembly?
- Locke1689 15y agoNo not VM code. Architecture independent arbitrary code. For any given C code your compiler should be able to generate optimized code for the Intel and AMD architectures. This doesn't actually happen. Sorry about the wording, I wrote that comment last night at 4 am.
- WalterBright 15y agoIf you do decide you want to work on compiler optimization, the D programming language compiler could use your help in improving its optimizations. https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd