From nobody Tue Jan 24 22:11:39 2023 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 4P1h5R3V0Xz3bfXg; Tue, 24 Jan 2023 22:11:39 +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 4P1h5R2VpWz4P3b; Tue, 24 Jan 2023 22:11:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674598299; 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=PKZb6NrVLdK0gGA+DIkoEAKI8VkLD8QHWcWoW2dC96c=; b=esUok4ijxnA7KVkMOofr9rj0M/RrIMVIUzPrfBpbH0zpiosFYrAjxcQ5CYlJ/H7NOwOzW+ RIbgaRGTw3IcUFLIcIT5QX/sOn0sNyq6Br6cN1LI1BYNHRTGOD1k41k8gb3a8q/mLQgyF7 kSIRQvDyW1vpcEa1rJiWjKQpj4mpYx81K7qzQSeY1TCqKMIidsh+Zir1vEs9s35xEuqFZr wNBB91DTHSbCyVqTGiRl2IyQdknmjEPMxJ3wnVQXDvqPBJHWOKhBgfv5vctTogUIVzXIrE 2TLT0eMHwe+lMyer06eHFSAkRY7ghM1POyqML0C4iMvSsH7RN6I7J8iua7G/Mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674598299; 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=PKZb6NrVLdK0gGA+DIkoEAKI8VkLD8QHWcWoW2dC96c=; b=SBySNpShGwryGnDeTWIvxHC018gkR9Slkrm0WDiXKWAtVuLkplpv7mwpKKtvF9TrzvzJn+ FYdwV8hsT+gGxed7Vggp3IgJ7RPMYkZaZyE02bXR9zMg+3bU89BAIGQlje6WhI5MlmJ1mu fSS6KviCdWCFmPk78X1OyZoCTpF6yYIajd5Fnyb17St9HOTbM9g2qU2rkKKPD/EvJAtoyi gy3u/qu15fat8HwXI/PWXT9cm37fgdrre+wnj5qZLqKPL1EgQdlU9ajSxNb2YsW63MiVXM 8I5+3l8UBmY2l54T/4M8NXkWPIKd+SEobz4kB7WFFkjs+ycH79LTBgG5QUVWGQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674598299; a=rsa-sha256; cv=none; b=OVP8MjKx9mSsVVBqVlCWHZQ5nAN+YgRRhE6I5mMjTkb8Rx+GR5gCmdjpDHUUUcOqb4XbD8 nKtsAuRbaV4CUWSRkG4hr8+qTBtVTBrqeM6GDx1YP3LmKaPnDXCenD4r6bTF0AmUoKg2F7 m+v5YmS8Bjp+Rp5BPX95W6LQ/FbNpWdrrAeLPlOAl8C9pLezO5itHPg2sXvmxRfBEe33cH 0/doxZZB9p8ydrxRabzNP9UBa2nD/QJmSF0cEO50lCuh+5D8WNlBShnxhPcKcA5Ax7fDA/ QxcKeTbegWrH6L4YM36Rnp5/Nn3ORJ5PNu+pI1RqIFJK86RwN33KGw/GDYH6Og== 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 4P1h5R0nMPzQZG; Tue, 24 Jan 2023 22:11:39 +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 30OMBdAK085018; Tue, 24 Jan 2023 22:11:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30OMBd0T085017; Tue, 24 Jan 2023 22:11:39 GMT (envelope-from git) Date: Tue, 24 Jan 2023 22:11:39 GMT Message-Id: <202301242211.30OMBd0T085017@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: cb86911127e8 - stable/13 - 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/stable/13 X-Git-Reftype: branch X-Git-Commit: cb86911127e8d9a0fedead92ba5bb9aa34c3c885 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=cb86911127e8d9a0fedead92ba5bb9aa34c3c885 commit cb86911127e8d9a0fedead92ba5bb9aa34c3c885 Author: Warner Losh AuthorDate: 2022-07-26 23:30:30 +0000 Commit: Warner Losh CommitDate: 2023-01-24 21:49:28 +0000 kboot: Implement host_ioctl Sponsored by: Netflix (cherry picked from commit 54e6e0deb4853dae7e97e7d5659c05e95bebac32) --- 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) {