Date: Sat, 17 Feb 2024 21:32:58 GMT From: Vladimir Kondratyev <wulf@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: a2decec2008a - stable/14 - LinuxKPI: Add asm/hypervisor.h header Message-ID: <202402172132.41HLWwRB020694@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=a2decec2008a6d7cb2ed082bbfc18bcc6f472d60 commit a2decec2008a6d7cb2ed082bbfc18bcc6f472d60 Author: Vladimir Kondratyev <wulf@FreeBSD.org> AuthorDate: 2023-12-24 08:19:59 +0000 Commit: Vladimir Kondratyev <wulf@FreeBSD.org> CommitDate: 2024-02-17 20:58:37 +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 (cherry picked from commit 206e9fea7502dccd126a721c30a1675bdef48633) --- 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202402172132.41HLWwRB020694>