From nobody Sat Feb 17 21:32:58 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TchqH06txz59lDm; Sat, 17 Feb 2024 21:32:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TchqG4N8Kz4hTt; Sat, 17 Feb 2024 21:32:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708205578; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yOLGgdUoHfzxIqC3K3kjS68Cr0rJNzyNyTyJdl2tERg=; b=PiCEmv5QkrTTN9aRg3AvBhA2UXRofHx2x+l3OIcL/mWyFsZZ/VT8hf0/rlKKpmpGaohwF8 DNckdJM2CbvpqtwdZZgk7gcZHngvhdEO81uuFvdFruqzF64ECcoPFYvAtPo5m6rdlQgI/1 8P+HVjQSzMMwZPIHW4MdpSe4tbXli1l9McpmoI6d1OQmQ5nzFmPgGlMTtUXEOdwGLn470x srmsHpHD5/nBzg3foj9fc6RdqfMqeVmN8J0b+9JGmL0FjAvxrO6CkbsamEeV+bQJrAR0lG zeQg229loZUuzG5FkjgfrLNu7q2ajeUgX4CM6gV+BuMK7ZWSVtKpHyoYOmbDWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708205578; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yOLGgdUoHfzxIqC3K3kjS68Cr0rJNzyNyTyJdl2tERg=; b=eLwCpim6k/tOerD21JFOy7D2UmGJi4hD/afwPMiswMJrtQtD00bDPDL7TcYMN6NMRpOHgE iuRt+1kvs9BoWguL1+CzrNGGIOZIklKmlwMkRRe4JtfQnn/y22GEQlwjbpQwlgmpfClWJu +5BWJg0kyRREYR7PWSOtiFLmIA59R0l60laKUI1SArZnunnlRpdKdE9rJjMQaF5uh6VDZZ mzovnS2XKRWmpZHhVweJovsR9zrv9PTwtOyGP5lovcS7jmejXN04OZSasOm1eaDt3b2uUh lRguVYk35Q7NrSjPRd6DrOJeIioF0kGzNKcqH+hFt83NvUrwnEhFO+seh4ds9Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1708205578; a=rsa-sha256; cv=none; b=QU5NM2zOZZo+41IlOVLzrnuTET6NO1cFFXLGPBJmmTdFNf7NmDHRNe7qO5eLtNfsEBCT7b +iPklUsd85lRFbavA2jNrDF4qdQ6Pu2Eel+BzeKrxGAratzW7irpxdFrD/UPCWYxyuA4EL afjxosS6AHebvCtalZT18NvVrFp7FBrWm6w7NTlOsS/VizxzuHfbcH5GugtWYE3Bndfuci ZFUliZ27AdIT9fNHm9NxFiCYLHbE68GZTUOlotDhMbkdx2qzjT304zJSroT7HLvLNbu7kp UrMaRIBdj4HIAlm5z+wW18xNlJ+gGjh3y1sPfYjyaSpBhvYlbs9VQpsIHMKoZQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TchqG3TSqzPZX; Sat, 17 Feb 2024 21:32:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 41HLWwSg020697; Sat, 17 Feb 2024 21:32:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41HLWwRB020694; Sat, 17 Feb 2024 21:32:58 GMT (envelope-from git) Date: Sat, 17 Feb 2024 21:32:58 GMT Message-Id: <202402172132.41HLWwRB020694@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vladimir Kondratyev Subject: git: a2decec2008a - stable/14 - LinuxKPI: Add asm/hypervisor.h header List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: a2decec2008a6d7cb2ed082bbfc18bcc6f472d60 Auto-Submitted: auto-generated The branch stable/14 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=a2decec2008a6d7cb2ed082bbfc18bcc6f472d60 commit a2decec2008a6d7cb2ed082bbfc18bcc6f472d60 Author: Vladimir Kondratyev AuthorDate: 2023-12-24 08:19:59 +0000 Commit: Vladimir Kondratyev 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