5 ms·
Not always. Cache speculation bugs for example I dont think are covered by emulations. (At least not explicitly. If the mmu model is the same and transparent en
by vetrom 7y ago
Not always. Cache speculation bugs for example I dont think are covered by emulations. (At least not explicitly. If the mmu model is the same and transparent enough I suppose those could 'pass through' but only if they're implemented on the same plat form.
- bonzini 7y agoYou can certainly exploit Meltdown from a VM. The hypervisor tries hard to stay out of the way, and on a properly configured VM the vmexits should be few enough while running compute-bound code that microarchitectural side channels are very well exploitable.
- inetknght 7y agoFor clarity, in this context I think @ vetrom was talking about emulation, not a virtual machine. A virtual machine makes use of the native instruction set (relying on the hardware) to create a machine within a machine and naturally can only create virtual machines of identical hardware capabilities (or a subset thereof). Emulation does all of that in software and could emulate even a completely different architecture.
- Dylan16807 7y agoOkay, but the original comment said VM and almost every desktop and server has a processor that can natively run x86 in a VM.
- eru 7y agoThough to get fast emulation, you can re-use techniques from virtual machines (and vice versa). Btw, emulation is how you can, in principle, run Linux on an 80286. (Normally you'd need a 80386 at least to get memory protection.) Of course, Linux on the 80286 is gonna be even slower than Linux in your browser. (https://bellard.org/jslinux/ https://bellard.org/jslinux/) Using the emulation idea you can go almost arbitrarily primitive. But the 286 is a nice target, because it was a sometimes requested feature in Linux's past.