]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[cpuid] Allow reading hypervisor CPUID leaves
authorMichael Brown <mcb30@ipxe.org>
Wed, 31 Jul 2024 15:35:31 +0000 (16:35 +0100)
committerMichael Brown <mcb30@ipxe.org>
Thu, 1 Aug 2024 11:49:48 +0000 (12:49 +0100)
commit121d96b903b221e2c63fa0fc5a8901dc24645a47
tree78a922651fadcc5c70218b7fd89ced8934c6452d
parentc117e6a4811efa057dc70426d58a8dab75245862
[cpuid] Allow reading hypervisor CPUID leaves

Hypervisors typically intercept CPUID leaves in the range 0x40000000
to 0x400000ff, with leaf 0x40000000 returning the maximum supported
function within this range in register %eax.

iPXE currently masks off bit 30 from the requested CPUID leaf when
checking to see if a function is supported, which causes this check to
read from leaf 0x00000000 instead of 0x40000000.

Fix by including bit 30 within the mask.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/arch/x86/core/cpuid.c
src/arch/x86/include/ipxe/cpuid.h