News for hackers. Stuff that matters.
Re:Ubuntu successfully virtualized on M1 by legulere on Thursday November 26, 2020 @11:18AM (#25221244)
It seems like ARM created special instructions called NEVE for performant nested virtualization: https://www.cs.columbia.edu/~nieh/pubs/sosp2017_neve.pdf

It says it's added to ARMv8.4 and M1 seems to be ARMv8.6, but I found no information if the M1 has these extensions.

Re:Ubuntu successfully virtualized on M1 by londons_explore on Thursday November 26, 2020 @11:39AM (#25221417)
Nesting is a key part of any system to make it truly general purpose. It seems crazy that for years we lived with non-nestable VM's.

It goes hand in hand with the fact that an emulated or virtualized system shouldn't be able to tell that it is emulated (if the emulator doesn't want it to know). It should run as if on real hardware. Inability to do nested virtualization reveals immediately that emulation is in play.

Re:Ubuntu successfully virtualized on M1 by saati on Thursday November 26, 2020 @02:58PM (#25223088)
You just need access to precise timers to tell if you are virtualized. If you can measure how long a full TLB miss takes vs just a cache miss you should be able to tell how deeply is your page table nested.
Re:Ubuntu successfully virtualized on M1 by londons_explore on Thursday November 26, 2020 @04:09PM (#25223548)
An emulator can emulate timers however it likes...
Re:Ubuntu successfully virtualized on M1 by amelius on Thursday November 26, 2020 @04:28PM (#25223649)
Ok, but that means that you can't have accurate wall clock time inside your virtual machine. Also, it would make most games impossible as all physics is ultimately tied to a clock. And of course a connection to internet is impossible.
Re:Ubuntu successfully virtualized on M1 by my123 on Thursday November 26, 2020 @11:28AM (#25221315)
Nested virtualization including the ARMv8.4 improvements are present on Apple M1.

However, Apple's virtualization solution doesn't currently support those.