LinuxKPI: Add asm/hypervisor.h header

Sponsored by:	Serenity Cyber Security, LLC
Obtained from:	OpenBSD
Reviewed by:	manu, bz
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D42802

(cherry picked from commit 206e9fea7502dccd126a721c30a1675bdef48633)
This commit is contained in:
Vladimir Kondratyev 2023-12-24 11:19:59 +03:00
parent 460a6c6a9f
commit a2decec200
2 changed files with 19 additions and 0 deletions

View file

@ -0,0 +1,19 @@
/* Public domain. */
#ifndef _LINUXKPI_ASM_HYPERVISOR_H
#define _LINUXKPI_ASM_HYPERVISOR_H
#if defined(__i386__) || defined(__amd64__)
#define X86_HYPER_NATIVE 1
#define X86_HYPER_MS_HYPERV 2
static inline bool
hypervisor_is_type(int type)
{
return (type == X86_HYPER_NATIVE);
}
#endif
#endif