loader.efi: only reduce the size of the staging area on Hyper-V
authordexuan <dexuan@FreeBSD.org>
Thu, 9 Mar 2017 12:09:07 +0000 (12:09 +0000)
committerdexuan <dexuan@FreeBSD.org>
Thu, 9 Mar 2017 12:09:07 +0000 (12:09 +0000)
commitde5c1722f517367d749792ed46c8c464e151b069
tree6f3dbc65ce8738b0f66c35da517d11ff460daf9c
parent15b103e7915a1c1c4cb4c80884c71f70a76f6c89
loader.efi: only reduce the size of the staging area on Hyper-V

Doing this on physical hosts turns out to be problematic, e.g. see comment
24 and 28 in https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=211746.

To fix the real underlying issue correctly & thoroughly, IMO we need
a relocatable kernel, but that would require a lot of complicated long
term work:  https://reviews.freebsd.org/D9686?id=25414#inline-56969

For now, let's only apply efi_verify_staging_size() to VMs running on
Hyper-V, and restore the old behavior on physical machines since that
has been working for people for a long period of time, though that's
potentially unsafe...

MFC after: 2 weeks
Sponsored by: Microsoft
sys/boot/efi/loader/copy.c