Wednesday, July 25, 2018

BIOS Cheat Code: SVM on Lenovo Legion Y720T

Occasionally I post things so specific I wonder if anybody but a future me will ever find them helpful or even mildly interesting.  This is perhaps the most esoteric one yet.

I recently got a nice new desktop computer.  Normally I wouldn't bother mentioning the make and model but it's relevant: this is a Lenovo Legion Y720T-34ASU.  It's a big beefy machine with much more plentiful and faster CPUs and GPUs than I've ever owned.  It's ridiculous how much computing power this thing has.

Also ridiculous is that the BIOS disables (and doesn't even surface an option for) virtualization.  KVM, SVM, AMD-V, whatever you call it, the tech is present in the CPUs but unable to be tapped due to an embarrassing and idiotic oversight by Lenovo.  For Lenovo's part, they claim that with Windows 10 Pro, virtualization can be enabled anyway.  I wouldn't know; the first thing I did with this computer was to put Linux on it so that it would actually be useful.  Regardless, omitting this BIOS setting in any modern computer borders on criminal neglect.

Now, I don't need to run VMs very often, so it took me a while to run into and trip over this oversight.  A flurry of posts and attempted support calls later, I had resigned to running VMs remotely on my old beater computer, and doing the old-fashioned X11 remote display routine.  Made me shake my head, but in a pinch, if I needed a virtual machine, I could deal with it.

Then, this morning, there was a reply on a BIOS hacking forum I'd posted to.  Some very clever and kind person figured out, somehow, a way to bypass the limited BIOS interface and enable SVM by force.  They'd done this sort of thing before, enabling locked-away features on various hardware.  I'm hoping this person can teach me to fish, so to speak, because I'd really love to know how they figured this out.

Here is the discussion where all this took place:
https://www.bios-mods.com/forum/Thread-Request-Bios-unlock-for-Lenovo-Legion-Y720T-34ASU

For the sake of multi-basket egg distribution, here are the steps:
  • use a Lenovo Legion Y720T-34ASU (AMD)!  (any other model is a risk I would not take!)
  • extract genius239's rar file to a FAT-formatted USB stick (most are already formatted this way)
    • verify the USB drive contains EFI/BOOT/BOOTX64.EFI folders and file
    • (if that rar becomes unavailable, search for how to make a GRUB EFI Shell bootdisk)
  • reboot and hit f12 at the Lenovo splash screen to enter the boot menu
  • choose your USB drive, UEFI mode (not legacy)
  • at the prompt, enter "setup_var 0x145 0x01" (no quotes, zeroes)
  • that's it!  ctrl+alt+del and boot normally.
And just like that, I could run 64-bit VMs at full speed.  (Or, you know, at all, in VirtualBox's case.)

It's still on Lenovo to deliver a BIOS update that fixes this properly.  Changing any BIOS setting or popping the CMOS battery will clear this change and it will have to be re-applied (which is actually good news to anyone who messes up and gets into trouble, but still).

No comments: