From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x1031.google.com (mail-pj1-x1031.google.com [IPv6:2607:f8b0:4864:20::1031]) by sourceware.org (Postfix) with ESMTPS id 22B9D3858D3C for ; Wed, 11 Jan 2023 05:23:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 22B9D3858D3C Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-pj1-x1031.google.com with SMTP id v23so14716839pju.3 for ; Tue, 10 Jan 2023 21:23:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:references:cc:to:from :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=dLEMd7QAY4302pYCJydmN63jL1CYA20WH052aEzhWR0=; b=fLYKGUC5znSxDfn0OnnQSZ/5ztBbfA+Le2MpM4rB34uKUUMqPXZQu9fVLXkYVzzXIS MOYJhqvKTVFFUcBZ+toMkVZ/Vi98NoorTIg28Hq/f+l9yI7ggdsDn7aq14FV+iWHPbR5 sVg03ZtHUlm3nQAcsvgSWOAJo+tw9+e5co3p2Hmv/8k8RKzL1T3/iP1ufR5E4Zl8ccv3 1UkA4/Hjuo4VWrBm2n9ZRztLi7w/CFzPAZ+2NSSSmt0Oh3d0nt7pI1oQsiguWT8xOh9g s6AfBUgFbuI5qaOHLVFuq0Oy4yW2F1o/iYTJxN4IdbmVSpJA56BZa9cV7I4mysHKcNeN VK8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:references:cc:to:from :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=dLEMd7QAY4302pYCJydmN63jL1CYA20WH052aEzhWR0=; b=T2sI+OC5i1Rm9A4b6d4aX5fkAwgvBjkWxNtxzBnsGmmQU87U9eMx5IM2ZmsTeAy65j 1et8oYJqxXroBhUzlA6rYwrywyu1UMHUtBcSq51+Q9GkGq9lAWj5/46k3Q1sM5/Cx4rH YifXBKZedTNHJPdCc3CG6yyiefI0C1/38l56vFeKIqX7798xgHOZxepdCKqOHMsOYoK2 ueU3qrohJgbwP/OEWcENDnR1W17tptQe0J22EbhUIPiDars1/wIaGEueIgl0YoTA6079 x6Pfw/NT5NIn4mAzAYbAiHNoH7LHSTAUCFlfTlC2QfTHaxLeBWC5uWxvHdPr9ML9Ougd P2Sw== X-Gm-Message-State: AFqh2krsHcq5y+ZoNnot/ve5Pp8n4SKqCLlnn7bxWBrmmrStVYCjpgO1 fUQWsA0hQvvXrH9DZ6SEO5xLKw== X-Google-Smtp-Source: AMrXdXvZ5UXOtRkwWfFGQ2a9WqyW282LsBwpBiYNAn9QXmlCALa5AX4hUcW5DwokL+x0UkuvodiZBg== X-Received: by 2002:a05:6a20:b29e:b0:b6:40af:3721 with SMTP id ei30-20020a056a20b29e00b000b640af3721mr1287678pzb.54.1673414611246; Tue, 10 Jan 2023 21:23:31 -0800 (PST) Received: from [192.168.0.115] (63-157-97-90.dia.static.qwest.net. [63.157.97.90]) by smtp.gmail.com with ESMTPSA id y12-20020aa78f2c000000b00581dd94be3asm9023586pfr.61.2023.01.10.21.23.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 10 Jan 2023 21:23:30 -0800 (PST) Message-ID: Date: Tue, 10 Jan 2023 21:23:26 -0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: Auto-enabling V unit and/or use of elf attributes (was Re: Adding V-ext regs to signal context w/o expanding kernel struct sigcontext to avoid glibc ABI break) Content-Language: en-US From: Richard Henderson To: Vineet Gupta , Kito Cheng Cc: Philipp Tomsich , Andy Chiu , Vincent Chen , Florian Weimer , Rich Felker , Andrew Waterman , Palmer Dabbelt , =?UTF-8?Q?Christoph_M=c3=bcllner?= , davidlt@rivosinc.com, Arnd Bergmann , =?UTF-8?B?QmrDtnJuIFTDtnBlbA==?= , Szabolcs Nagy , Greentime Hu , Aaron Durbin , Andrew de los Reyes , linux-riscv , GNU C Library References: <1631497278-29829-1-git-send-email-vincent.chen@sifive.com> <7430f494-9b43-5e03-c1e9-6b83e2611a11@rivosinc.com> <91ef3c45-165f-d2b3-7c77-322c01802c41@rivosinc.com> <18465ca3-934f-5b3e-170c-1ff0edea3a89@rivosinc.com> <1f8f1d21-4a19-54fe-8b29-bf9e2a8501d7@rivosinc.com> <3a838afe-974b-60bb-a0e5-83e366ec652e@rivosinc.com> <3923eeee-e4dc-0911-40bf-84c34aee962d@linaro.org> In-Reply-To: <3923eeee-e4dc-0911-40bf-84c34aee962d@linaro.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 1/10/23 17:22, Richard Henderson wrote: > And, surely, there's some minimal vector configuration for which the allocation must succeed. To answer my own question here, no, there does not seem to be a way to cap VLMAX in the OS or the hypervisor -- vsetvli rd, r0, e8 will always set VL to the VLMAX for which the cpu is configured. (ARM SVE can artificially limit the vector length. Linux chooses the default vector length so that state fits within the existing 4k signal stack frame. This is good enough for the vector usage within e.g. strlen. In order to take advantage of any larger vector length the hardware may support, one must use a prctl.) r~