From nobody Wed May 10 17:29:53 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 4QGhqS4Fjzz4B9yX; Wed, 10 May 2023 17:29:56 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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 "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QGhqS3n5Dz4Gd7; Wed, 10 May 2023 17:29:56 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683739796; 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: in-reply-to:in-reply-to:references:references; bh=gJYmeD8F3x8mu3BMsDW0FT59JvCTFjRu7CbUa5IVuxc=; b=bIyjxhsqtW8fufuKFwtVF3mIjdT8pJEBASj0wJUETF0AwpYUYrrHEa3PHoX36b/JAx2DZy SU1E+b4tdV4PkuNslKz9Ndh9Eyoq1qWtTWmb5rplk33zGq3QsuuYMDd6TJLlkblHFMqfbX WjOlrHmv68BokC3CL/mZgI12QSBurojtG0FZQBRV0T55jsCTBOCcKKwhMTy0kkxreG2F53 ZuXow9asbxr/iRElOAwSrdFv0vNTBhi6bPnsG+jxssWnc8JD0W7yu3hrX3NmntCy5hlO0/ VFPKMi3wOUR9PtKcl927BWwaMsl3ueSQsAe0plIeyWKL6/DW3tWkUKFSMO6MLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683739796; 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: in-reply-to:in-reply-to:references:references; bh=gJYmeD8F3x8mu3BMsDW0FT59JvCTFjRu7CbUa5IVuxc=; b=b6JXwC2Y1WbNtN8qWs/txJnGe0HBnWgDm0BTjGOCMmWvPtGC8V634B4WacR8RcKK0wJZ/E 7t8Wv4mrSduPXOp2tzfo6l9Cp5S9r2X0oBFUpvGKq0AUxGus5q2ryCgL2oAI+s8JGWCwbc n2Vivaupon/7GzqSKB0+1ar80LpeDXZl1faSEa7Ke0ldVmMzgQ6Ct02u67AJ0BWftLYBun RsfRn5xP0ZWF1R//U8uHkbMgGbchUACULptyxHxlpiV7HOxfJEnyZhoVDeVl7jOkYmCTBz JoxdvV7dipOTFaqfZD41sdoy83a3EEj320EUtoTuodXi84tVVN5efrk5WUR0TA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683739796; a=rsa-sha256; cv=none; b=hdT2xhAuoqWTXOBL1FwMjrl0xY/AXsakOpDnMRzAQ0LnShE9dCIRBhGcwKE3VWWDtoRip+ nDxE+Y+fMin0Yv2LmMm5qtychfiklUOzxfVV/aHLXz4HFV3Tvp0o5FEZ7YiL7g54tbTcCz FjkaiY2FsRTIWRHaFA3RrredsMZ2EJl1Ono42qvZ8GaJOA8UYRTM2k8hZJM1B9X0HDylET wtpDj4LEdqnf+TjENMigMU+e9Y4W2NeXbUN/2qAIO/q9Vct3mccnmy1DVfX0XmLitPhSEZ Tr27uKP3xYWa+7BKxozsePlebKtz+yJN5p/70fex/hlnMcrLNvpnyUsv2DBU6Q== Received: from [IPV6:2601:648:8680:16b0:54fa:bf1a:4bcb:d53d] (unknown [IPv6:2601:648:8680:16b0:54fa:bf1a:4bcb:d53d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4QGhqR693MzvVG; Wed, 10 May 2023 17:29:55 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <077d3e1d-8d2a-5bf4-1f27-31d090e03731@FreeBSD.org> Date: Wed, 10 May 2023 10:29:53 -0700 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 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Subject: Re: git: 76887e84be97 - main - cpuset: increase userland maximum size to 1024 Content-Language: en-US To: =?UTF-8?Q?Corvin_K=c3=b6hne?= , Ed Maste , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202305081826.348IQm9N040108@gitrepo.freebsd.org> <0dadaa17917629e3399fe9acbab17eb60b63575d.camel@FreeBSD.org> <2f47388ab07eaeb820344e928adb96ff6f7a5916.camel@FreeBSD.org> <692e003e4b684c093b16048a4e12cc2dd8fc1fe0.camel@FreeBSD.org> From: John Baldwin In-Reply-To: <692e003e4b684c093b16048a4e12cc2dd8fc1fe0.camel@FreeBSD.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ThisMailContainsUnwantedMimeParts: N On 5/9/23 2:40 AM, Corvin Köhne wrote: > On Tue, 2023-05-09 at 09:43 +0200, Corvin Köhne wrote: >> On Tue, 2023-05-09 at 08:59 +0200, Corvin Köhne wrote: >>> On Mon, 2023-05-08 at 18:26 +0000, Ed Maste wrote: >>>> The branch main has been updated by emaste: >>>> >>>> URL: >>>> https://cgit.FreeBSD.org/src/commit/?id=76887e84be975698b14699d7d0dfb157d73e9990 >>>> >>>> commit 76887e84be975698b14699d7d0dfb157d73e9990 >>>> Author:     Ed Maste >>>> AuthorDate: 2023-05-02 20:57:12 +0000 >>>> Commit:     Ed Maste >>>> CommitDate: 2023-05-08 18:25:15 +0000 >>>> >>>>     cpuset: increase userland maximum size to 1024 >>>> >>>>     Hardware with more than 256 CPU cores is now available and >>>> will >>>> become >>>>     increasingly common.  Bump CPU_MAXSIZE (used for userland >>>> cpuset_t >>>>     sizing) to 1024 to define the ABI for FreeBSD 14. >>>> >>>>     PR:             269572, 271213 [exp-run] >>>>     Reviewed by:    mjg, jhb >>>>     Relnotes:       yes >>>>     Sponsored by:   The FreeBSD Foundation >>>>     Differential Revision: https://reviews.freebsd.org/D39941 >>>> --- >>>>  sys/sys/_cpuset.h | 2 +- >>>>  1 file changed, 1 insertion(+), 1 deletion(-) >>>> >>>> diff --git a/sys/sys/_cpuset.h b/sys/sys/_cpuset.h >>>> index b75ee595da3c..676f9855f384 100644 >>>> --- a/sys/sys/_cpuset.h >>>> +++ b/sys/sys/_cpuset.h >>>> @@ -40,7 +40,7 @@ >>>>  #define        CPU_SETSIZE     MAXCPU >>>>  #endif >>>> >>>> -#define        CPU_MAXSIZE     256 >>>> +#define        CPU_MAXSIZE     1024 >>>> >>>>  #ifndef        CPU_SETSIZE >>>>  #define        CPU_SETSIZE     CPU_MAXSIZE >>> >>> Hi Ed, >>> >>> this somehow breaks bhyve on my system. It immediately exits with >>> "vm_run error -1" on startup. >>> >>> >> >> Setting MAXCPU [1] to 1024 as well, solves the issue. Not sure if >> it's >> a regression of your commit or a bhyve bug. >> >> [1] >> https://github.com/freebsd/freebsd-src/blob/20d8d9809a8c0a3ddd1d0156e77ec53a1ed95747/sys/amd64/include/param.h#L68 >> >> > > vmm kernel module and bhyve userland are sharing a cpuset_t. So, this > commit introduces a mismatch in the ioctl signature of VM_RUN. Any > advice how to fix this properly, would be appreciated. The ioctl needs to change to follow the pattern all the syscalls that use cpuset_t do: take a pointer to the cpuset_t and a size instead of embedding the cpuset_t in the ioctl structure. We will have to define a COMPAT_FREEBSD13 structure and ioctl with the current structure with a hardcoded cpuset_t size (probably just inline cpuset_t member as an anonymous struct with the same members as cpuset_t but a constant for the array count) as well. -- John Baldwin