git: 206e9fea7502 - main - LinuxKPI: Add asm/hypervisor.h header
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 24 Dec 2023 08:23:04 UTC
The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=206e9fea7502dccd126a721c30a1675bdef48633 commit 206e9fea7502dccd126a721c30a1675bdef48633 Author: Vladimir Kondratyev <wulf@FreeBSD.org> AuthorDate: 2023-12-24 08:19:59 +0000 Commit: Vladimir Kondratyev <wulf@FreeBSD.org> CommitDate: 2023-12-24 08:19:59 +0000 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 --- sys/compat/linuxkpi/common/include/asm/hypervisor.h | 19 +++++++++++++++++++ sys/compat/linuxkpi/dummy/include/asm/hypervisor.h | 0 2 files changed, 19 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/asm/hypervisor.h b/sys/compat/linuxkpi/common/include/asm/hypervisor.h new file mode 100644 index 000000000000..f344a2929359 --- /dev/null +++ b/sys/compat/linuxkpi/common/include/asm/hypervisor.h @@ -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 diff --git a/sys/compat/linuxkpi/dummy/include/asm/hypervisor.h b/sys/compat/linuxkpi/dummy/include/asm/hypervisor.h deleted file mode 100644 index e69de29bb2d1..000000000000