From nobody Thu Jul 28 21:37:46 2022 X-Original-To: dev-commits-src-all@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 4Lv3sQ55mRz4X123; Thu, 28 Jul 2022 21:37:46 +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 4Lv3sQ4Xwwz3rSh; Thu, 28 Jul 2022 21:37:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1659044266; 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=mBccaH9/kARdDUyh6kC+nAa2DMfGUuv+XbRriaxrN2M=; b=m2necky6K3toS2Ar/VBxbQicK+GYKjQaImOl91WIqh4GaTlxYLqkk/eyXny1qLep8gpib/ jzYgVwHlgY35nF9DMEsTSyfaXffsFFzrOS6gxOdoNVy69i07zyBHHB3xNs3ABJObs3IwtD Q9plcrXEkCmF0fV/eVeVaar4wiJELPVkxsalApS/NYNvva8KNsdmSZRmNeLE/NiUu5UJNQ q8bCQ8kQsMyPPpUaRk2jlJ/HEJYWNurtoyxqwrF37l8zc/jyf5++Go8tiqC//Q9X82PmGO wIxDQJWv2JrcytHV6sJS7CxMjIMopb8YIHBepysHOVfveLJH6wD3fyKpnCgYDw== 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 4Lv3sQ3gDqz19kB; Thu, 28 Jul 2022 21:37:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 26SLbkDp001714; Thu, 28 Jul 2022 21:37:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 26SLbkod001713; Thu, 28 Jul 2022 21:37:46 GMT (envelope-from git) Date: Thu, 28 Jul 2022 21:37:46 GMT Message-Id: <202207282137.26SLbkod001713@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 54e6e0deb485 - main - kboot: Implement host_ioctl List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 54e6e0deb4853dae7e97e7d5659c05e95bebac32 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1659044266; 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=mBccaH9/kARdDUyh6kC+nAa2DMfGUuv+XbRriaxrN2M=; b=rwSKXVoIGheOyVIbhfGKVSL/8x2EboYixzprwrXZnPts2aL31JHFQdzFGyOWzYPdqSis4Q EvE/RyS6WsiM0z9oWTy6P9cW03rx7Ba7Aktk0aWoo5VO4CjIAw+Hnk8OPl2vf1DxulMrNt AZEj2nYlKzuxAFpVd/zfx5xiHxnPVCtdQvfcDOVmt+ej68HjNGHf3bsvlbQnNgw8VmMQaz 9D35puKv0STmPKQhr/y+bgVvlscUbFn2ct39rTOwl6JvshNMVHm3paf0s8XRNPJmupvuVn ZARc90pqdzTHtkb+60BrVHNrT/HEAzatIhYdKJuSF9Xng1jsvzUfPrMRAmHy/Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1659044266; a=rsa-sha256; cv=none; b=ASXHARGi4yFWK3QeCTQ536Vvk7wSvpe3/TsMOQItW6IREGx7rIQKxVZx2cQmvTRjptofFN 5A/E6IcPiUkw9/pc9zfxS9pU4ROomiXMqnc+JE2D68AArKq7ucBH2i9acxagvDmzSXzVQY AEhObfBHzh7+CEuErzMTTiwThQ9kEr/aVLICsL2l0vgbysFTQaizmVAfCwbdseyaWvy7JM YnwbXos2Vsp+jtAIO5RUXZooGEwEk84wqeyD+GsPWQKhA5NMR2KSxygnft76lEfttqb/LI 8iaVSJcQqzrGvt897fmFPs9f9JyBU+eWDBlNTs5ICoUn8AyI9RqdO99JaJDzYQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=54e6e0deb4853dae7e97e7d5659c05e95bebac32 commit 54e6e0deb4853dae7e97e7d5659c05e95bebac32 Author: Warner Losh AuthorDate: 2022-07-26 23:30:30 +0000 Commit: Warner Losh CommitDate: 2022-07-28 21:35:42 +0000 kboot: Implement host_ioctl Sponsored by: Netflix --- stand/kboot/arch/aarch64/syscall_nr.h | 1 + stand/kboot/arch/amd64/syscall_nr.h | 1 + stand/kboot/arch/powerpc64/syscall_nr.h | 1 + stand/kboot/host_syscall.h | 1 + stand/kboot/host_syscalls.c | 6 ++++++ 5 files changed, 10 insertions(+) diff --git a/stand/kboot/arch/aarch64/syscall_nr.h b/stand/kboot/arch/aarch64/syscall_nr.h index 79bf22947e94..83069dd8dc76 100644 --- a/stand/kboot/arch/aarch64/syscall_nr.h +++ b/stand/kboot/arch/aarch64/syscall_nr.h @@ -5,6 +5,7 @@ #define SYS_getdents64 61 #define SYS_getpid 172 #define SYS_gettimeofday 169 +#define SYS_ioctl 29 #define SYS_lseek 62 #define SYS_kexec_load 104 #define SYS_mkdirat 34 diff --git a/stand/kboot/arch/amd64/syscall_nr.h b/stand/kboot/arch/amd64/syscall_nr.h index 71469109a55e..2cf26d7ca4dc 100644 --- a/stand/kboot/arch/amd64/syscall_nr.h +++ b/stand/kboot/arch/amd64/syscall_nr.h @@ -4,6 +4,7 @@ #define SYS_getdents64 217 #define SYS_getpid 39 #define SYS_gettimeofday 96 +#define SYS_ioctl 16 #define SYS_kexec_load 246 #define SYS_lseek 8 #define SYS_mkdirat 258 diff --git a/stand/kboot/arch/powerpc64/syscall_nr.h b/stand/kboot/arch/powerpc64/syscall_nr.h index 7b425e36c517..71f2452c9124 100644 --- a/stand/kboot/arch/powerpc64/syscall_nr.h +++ b/stand/kboot/arch/powerpc64/syscall_nr.h @@ -5,6 +5,7 @@ #define SYS_getdents64 202 #define SYS_getpid 20 #define SYS_gettimeofday 78 +#define SYS_ioctl 54 #define SYS_kexec_load 268 #define SYS_llseek 140 #define SYS_mkdirat 287 diff --git a/stand/kboot/host_syscall.h b/stand/kboot/host_syscall.h index 09f5355e520d..0029004f675a 100644 --- a/stand/kboot/host_syscall.h +++ b/stand/kboot/host_syscall.h @@ -160,6 +160,7 @@ int host_fstat(int fd, struct host_kstat *sb); int host_getdents64(int fd, void *dirp, int count); int host_getpid(void); int host_gettimeofday(struct host_timeval *a, void *b); +int host_ioctl(int fd, unsigned long request, unsigned long arg); int host_kexec_load(unsigned long entry, unsigned long nsegs, struct host_kexec_segment *segs, unsigned long flags); ssize_t host_llseek(int fd, int32_t offset_high, int32_t offset_lo, uint64_t *result, int whence); int host_mkdir(const char *, host_mode_t); diff --git a/stand/kboot/host_syscalls.c b/stand/kboot/host_syscalls.c index 8b364083b15c..1ffa04948fdf 100644 --- a/stand/kboot/host_syscalls.c +++ b/stand/kboot/host_syscalls.c @@ -54,6 +54,12 @@ host_gettimeofday(struct host_timeval *a, void *b) return host_syscall(SYS_gettimeofday, (uintptr_t)a, (uintptr_t)b); } +int +host_ioctl(int fd, unsigned long request, unsigned long arg) +{ + return host_syscall(SYS_ioctl, fd, request, arg); +} + int host_kexec_load(unsigned long entry, unsigned long nsegs, struct host_kexec_segment *segs, unsigned long flags) {