From patchwork Thu Mar 30 13:18:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 668606 Delivered-To: patch@linaro.org Received: by 2002:a5d:4d08:0:0:0:0:0 with SMTP id z8csp931022wrt; Thu, 30 Mar 2023 06:19:28 -0700 (PDT) X-Google-Smtp-Source: AK7set+/zaC568BWuDKgAayqmKGTLiEhUe1pb7VHq+1TS7BZ8zZREubO/Sc6t/3nQS3BPrdc+gMZ X-Received: by 2002:ac8:4e50:0:b0:3e3:7c94:726e with SMTP id e16-20020ac84e50000000b003e37c94726emr37647417qtw.30.1680182367869; Thu, 30 Mar 2023 06:19:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680182367; cv=none; d=google.com; s=arc-20160816; b=qtJ479ENufs/WzZTWOFbB9Qol+bmrt/Ssor6eHXQsqYRFH6mOtFLkuipuoirGKCPCv baHCx+Ouie03kj0EXy2vVL7FTjkADD8wx+inEovjSJM03SVXh2gYKtJHE6UjYW0GjWMr 84gBxDCIEx4Rnub1H8t9VtlnIPqgp7YzezqEoNUCntJTvDLsGSnfdE1W+aiW6yGFogjb hn0gtLaq6J+QqYxOWrwcczIhPRQLpg+qKjqx+yZpaCEFLNzUuxvx3l8s/YTtAB0TKriZ a5sG1PBMrhxXp6zNzdFSw57xyn3Aa2dVmnvBtNxSLDufdVq6wCCPep0wY92pquBzLUtF kwXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=jQ1Gu7qVTMNET7Ilwd4JTbEMslTBn2t6QdfWWwcVZrY=; b=CFcUi8wgxsTF1+lpU4jDK1YbcRquyragoNna192ikWU+7YiNJBvJvmGuW38680MyR5 s50GnRtY43Ot0fbM3YWSg7NpjM2qqKjGsY+cTKQAixdG+I07Lf+M88B0GtvGN3wJk5WX DNSZ7xWAJ0oBBKHaj2CKMD0IReT6+56yRHx4/T/nDxwOmvoJ1w/6AXkWSD9/PF8L537+ rei9YF4ze5mcYKibUqYmU4yz4CWxeMOdIvBsGCPIYjvd8vQO3akBjRDK2/PmYrTvoN/t 6mJsHL6k71eKwdM7wfGoOOSTPE7jxk9o071IjrLxtXqgQOLH0X/qY5Oh2D5eRSDQ9XAD xtdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AKVyZGCX; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id v20-20020a05620a441400b007485007fce3si11153236qkp.740.2023.03.30.06.19.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 30 Mar 2023 06:19:27 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AKVyZGCX; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1phsBJ-0007VS-Dj; Thu, 30 Mar 2023 09:19:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1phsBH-0007Ma-M9 for qemu-devel@nongnu.org; Thu, 30 Mar 2023 09:19:07 -0400 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1phsBF-000206-KP for qemu-devel@nongnu.org; Thu, 30 Mar 2023 09:19:07 -0400 Received: by mail-wm1-x32f.google.com with SMTP id s13so10881193wmr.4 for ; Thu, 30 Mar 2023 06:19:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680182344; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=jQ1Gu7qVTMNET7Ilwd4JTbEMslTBn2t6QdfWWwcVZrY=; b=AKVyZGCXp5HbSUgAJNa1jehPofrabn355kzbNpxTOKZDZsM2XjDvRn3KuEZYlo9oNw n/+CZbBBW9a4fqPKvhUS7esg1T4hDN4LSb9tweCM9XciXMvfPKbL5CCLiobiA9DyHhUt 44zccj95IBT5Ep6IJaIsSygTDnW5zCggQcSHNuEelWK8bcIFzWGK67Xql3/bHJ0udPwy UvLi1OfBAQZeq1Fz9xV32v81xClR/cZK6Jc1qA4JjHwE8VOTl28kYy/s8AT5/pCb9zxH pXZ2kl6lB9X7JVZ/hJ3BZLprYWif+XVkcze9HnEP/Ck8zABV3BhnZyc9pzqSW0s3pWcS K8jQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680182344; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jQ1Gu7qVTMNET7Ilwd4JTbEMslTBn2t6QdfWWwcVZrY=; b=L0stawrzSsnDYrUMx9FM6ZTvYl9d2/DTqAjzd7I63xvhXvSM9MzhylzJ/I97bO/EMU aQgu3ReUTHah3XhlkYakyjTNcnyPOoYNVpZ1be1t1zdKcdLL181mAupjtILzq/J8GzB5 lgq13BUjIBGz2x0JzimzNINRobpei4EffUy6NeKM3kT1gf4ETB7KKqkZxQcRXRXTd+Ta fmiQBhzcHUre8+j0ZV+yhOADBktIkh4E6h4FRc0isTF7e3QxLeujX3EqFy5JJsC26PcI KuihngHjzFkHr+HV4pVuGLS2bE9toeOM5tXrWqpAk5BMrEhfHwqaZdlA13CIIqm373Bj oW+Q== X-Gm-Message-State: AO0yUKVv6m3Sy/r1O9f8ZDVvYxw+y19mFw6cMpzj2tOaeKe4EfWl2QgD b5NqX9LfpNkCUyeAQtN/77j9EZAo8urPZwwfzcU= X-Received: by 2002:a7b:c44b:0:b0:3ed:301c:375c with SMTP id l11-20020a7bc44b000000b003ed301c375cmr18488071wmi.21.1680182343824; Thu, 30 Mar 2023 06:19:03 -0700 (PDT) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id fc11-20020a05600c524b00b003ebff290a52sm6193963wmb.28.2023.03.30.06.19.02 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 30 Mar 2023 06:19:03 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Titus Rwantare , Laurent Vivier , Jiaxun Yang , qemu-block@nongnu.org, =?utf-8?q?Phi?= =?utf-8?q?lippe_Mathieu-Daud=C3=A9?= , Gregor Riepl , John Paul Adrian Glaubitz , Zach van Rijn , Richard Henderson Subject: [PULL 1/6] linux-user/sparc: Don't use 16-bit UIDs on SPARC V9 Date: Thu, 30 Mar 2023 15:18:51 +0200 Message-Id: <20230330131856.94210-2-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230330131856.94210-1-philmd@linaro.org> References: <20230330131856.94210-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=philmd@linaro.org; helo=mail-wm1-x32f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org The 64-bit SPARC V9 syscall ABI uses 32-bit UIDs. Only enable the 16-bit UID wrappers for 32-bit SPARC (V7 and V8). Possibly missed in commit 992f48a036 ("Support for 32 bit ABI on 64 bit targets (only enabled Sparc64)"). Reported-by: Gregor Riepl Tested-by: John Paul Adrian Glaubitz Tested-by: Zach van Rijn Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1394 Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Acked-by: Laurent Vivier Message-Id: <20230327131910.78564-1-philmd@linaro.org> --- linux-user/syscall_defs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index 614a1cbc8e..cc37054cb5 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -61,7 +61,7 @@ #if (defined(TARGET_I386) && defined(TARGET_ABI32)) \ || (defined(TARGET_ARM) && defined(TARGET_ABI32)) \ - || defined(TARGET_SPARC) \ + || (defined(TARGET_SPARC) && defined(TARGET_ABI32)) \ || defined(TARGET_M68K) || defined(TARGET_SH4) || defined(TARGET_CRIS) /* 16 bit uid wrappers emulation */ #define USE_UID16 From patchwork Thu Mar 30 13:18:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 668608 Delivered-To: patch@linaro.org Received: by 2002:a5d:4d08:0:0:0:0:0 with SMTP id z8csp931414wrt; Thu, 30 Mar 2023 06:20:10 -0700 (PDT) X-Google-Smtp-Source: AKy350Z1j0UFJg5/HfqGWpjwztK3/RN0MaoEnLNuROxEz0AEXZQqRv0qjc72mh9feYDszDceyafp X-Received: by 2002:a05:622a:1cb:b0:3e4:e2ee:7e5a with SMTP id t11-20020a05622a01cb00b003e4e2ee7e5amr27383175qtw.42.1680182409895; Thu, 30 Mar 2023 06:20:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680182409; cv=none; d=google.com; s=arc-20160816; b=g83kcqhtL25TOCSaDAti6euiC9IjCQ3XyPEmRfGKJPWkisECQrj4969KjU7vVc43K4 JqU/DB0dsXdmKR4HWYU3ADDu3gSSIf8xJ89ybRuZZfyuL1OnTj3uICJgDQdC7SFnjgV0 8QCv52E2irVGEHFkNZm/pFrGYxp+BtUcgVkY2rf2WYk8+NYd5q48iOiBJ0WUn8w4QxP9 47EZmDmkn6l6qUKOabF2k4MdTDcDBFLy9ZY/GPSuODhi7sFbD8wpuxtyzs/OuaLh1iBA pdf2ePuI9B44H1RuT/MlJNTSQrFuZ5LcbKMLvWqQhYn76hTi+OCkoUqjxO+QqvjusxIM zHOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ayn4boipfKt66I0EYH92uExFZX9rPHRcwf3MoBEl5oE=; b=axrHquqovWXKFS7KB8MYvz9UzlI4SX5HVDnd0tPE70gWu/z205ZWJS5BJ9e9aT9KNk yNlWRwcfg5FO7S27BnMIeh2Y+hYaomhI7ncIGQBlyoXV9YxBxPZ1DfzIBnW4avZcNlYI 5zKHpVmHgdFszrwQNf0/Z2gA61DxCm8o+q4KXdTwIvtxPeP8LZ+5cdd1yISNXmcXuYhx JlsPjaYm7tyxPq0ZX3JFZ9O4Sc8Nb0nuGe0O0ZGLZMMmJuNE8GllzYuI4gPySlpieL2k nqalvSLhU3IPQXpu9DZJcqHoz7uWIEBHUD/xOUllHVPkEe//6/UOLiYw6Ea6PYMYULn6 GelQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WsXDiTkt; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id f11-20020a05622a104b00b003b9f89d2720si25577546qte.88.2023.03.30.06.20.09 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 30 Mar 2023 06:20:09 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WsXDiTkt; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1phsBX-0007sj-1K; Thu, 30 Mar 2023 09:19:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1phsBM-0007hC-0V for qemu-devel@nongnu.org; Thu, 30 Mar 2023 09:19:13 -0400 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1phsBK-00020w-Cj for qemu-devel@nongnu.org; Thu, 30 Mar 2023 09:19:11 -0400 Received: by mail-wm1-x32f.google.com with SMTP id j18-20020a05600c1c1200b003ee5157346cso13429430wms.1 for ; Thu, 30 Mar 2023 06:19:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680182349; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ayn4boipfKt66I0EYH92uExFZX9rPHRcwf3MoBEl5oE=; b=WsXDiTktmk/x41KB1TLDuc2UN+WEKkNuKpNzpyrcegs/PMRqhEnQwR6bvKtZQTFZ6L 3ayKX0iuzhaH6wN9ODzjx4RfhZO1rX0BUI55mZatdlJUVjqfTYBqZ5KcQ/LXoiTjJBlP Kra1a8Ummq46NMQw20llMMBonr5WNlxulMxY36nio/Q/WI0Cnw21FX0k/1ZEYpHDl4QS Bp7M9G236Zbu68G1OWtA3Rlg2AFqfflt+KSM/vZDkGs0Z+dJou0Y25aBy6iPsdouy4u7 VdlmabvjMR9iW0GgHngeRoN1VKWkadiWr4kaT5/vqQe5RbKqflaovkIpBeyIqbfrBAzh jK+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680182349; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ayn4boipfKt66I0EYH92uExFZX9rPHRcwf3MoBEl5oE=; b=Zn3V7DboXHRTH32hJ+Gl3FyOSAkoZZMck7kfyHZqRHmLIDjjO1KtHm7gdWqvKMlHKr XXvHbryQxAuq8ceH66XmyC1viFeEhU+sMJjJ7bAFuf7BS1X+JYfaI3Y534t6ldisLeeP 2NogwW20xLn9y8f/m+mc0d/NnUhHVqrTgY3zQYW325lMrHn770bWAgGWBnDgph0kJkAZ Zw0f6IJdIVmeFr/PZY9wiLU0ObRNkDmDO0tCNz4hFOv+cn1ztMugcEAe8aevH7ujuQgp DP83eY4CdshYe/45aE8I1bclsRl4SNh+kjoKt5xgkqek6N2XQXA2C0o/h/uJL3ad3T6R /AeQ== X-Gm-Message-State: AO0yUKU1itWZrFD4eCyHxwOjwQ6Rg8drbNtqtRabCvXwLZCUWOflo9mJ 3MAtxZpwYbGn5v1E+cTB8ZqglQ563xYTafzdT64= X-Received: by 2002:a05:600c:22cd:b0:3eb:29fe:7343 with SMTP id 13-20020a05600c22cd00b003eb29fe7343mr17152558wmg.33.1680182348879; Thu, 30 Mar 2023 06:19:08 -0700 (PDT) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id y26-20020a1c4b1a000000b003ef62deb830sm5816581wma.25.2023.03.30.06.19.07 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 30 Mar 2023 06:19:08 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Titus Rwantare , Laurent Vivier , Jiaxun Yang , qemu-block@nongnu.org, =?utf-8?q?Phi?= =?utf-8?q?lippe_Mathieu-Daud=C3=A9?= , Richard Henderson Subject: [PULL 2/6] linux-user/mips: Use P5600 as default CPU to run NaN2008 ELF binaries Date: Thu, 30 Mar 2023 15:18:52 +0200 Message-Id: <20230330131856.94210-3-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230330131856.94210-1-philmd@linaro.org> References: <20230330131856.94210-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=philmd@linaro.org; helo=mail-wm1-x32f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Per the release 6.06 revision history: 5.03 August 21, 2013 • ABS2008 and NAN2008 fields of Table 5.7 “FCSR RegisterField Descriptions” were optional in release 3 and could be R/W, but as of release 5 are required, read-only, and preset by hardware. The P5600 core implements the release 5, and has the ABS2008 and NAN2008 bits set in CP1_fcr31. Therefore it is able to run ELF binaries compiled with EF_MIPS_NAN2008, such the CIP United Debian NaN2008 distribution: http://repo.oss.cipunited.com/mipsel-nan2008/README.txt In order to run such compiled binaries, select by default the P5600 core when the ELF 'MIPS_NAN2008' flag is set. Reported-by: Jiaxun Yang Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Acked-by: Laurent Vivier Message-Id: <20230327162444.388-1-philmd@linaro.org> --- linux-user/mips/target_elf.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/linux-user/mips/target_elf.h b/linux-user/mips/target_elf.h index a98c9bd6ad..b965e86b2b 100644 --- a/linux-user/mips/target_elf.h +++ b/linux-user/mips/target_elf.h @@ -15,6 +15,9 @@ static inline const char *cpu_get_model(uint32_t eflags) if ((eflags & EF_MIPS_MACH) == EF_MIPS_MACH_5900) { return "R5900"; } + if (eflags & EF_MIPS_NAN2008) { + return "P5600"; + } return "24Kf"; } #endif From patchwork Thu Mar 30 13:18:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 668607 Delivered-To: patch@linaro.org Received: by 2002:a5d:4d08:0:0:0:0:0 with SMTP id z8csp931188wrt; Thu, 30 Mar 2023 06:19:45 -0700 (PDT) X-Google-Smtp-Source: AK7set9VUOqJr6yHI0UyLxytUpK3j35mvnuEgsWC/91177r7rE5WikoMjjElm8DsHiuAdPEWVGxw X-Received: by 2002:a05:622a:1450:b0:3d8:fd72:b4a3 with SMTP id v16-20020a05622a145000b003d8fd72b4a3mr38727930qtx.65.1680182384919; Thu, 30 Mar 2023 06:19:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680182384; cv=none; d=google.com; s=arc-20160816; b=uk4IL/DwWk2cKWqckIfazMrgCJfUWcvjTtt8y2XP9NPRpzaNXed7hwF0fiuekJVbhS X/Kljs9n7qdYzqVeac7ZxLiXyZyz47CjvKnqlg4ruXMzTngx/JcZJJljMZyGbxWaFDq4 lCsU2b9b1bng8V3zLsA2nTLy+MI/IciX4tmjRJbquhZrsnWPr0XriQ2mlg5ptiOCVo7U /8XRgfHBEEIjSV9cQ6+1gdbTjdsF+11gLZcBWcDXCVYsDhRHx5shCWljoExJKVCObr+Q LF4YawwS9Pors/IZklWwsImPbbym9/ljCwWwDvFuWZPNMJVznSuaQ8fDqcCjahsJrrGT J/QQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=pAX9S025dEyrSFkAAp1TBAvo2BRP/u6bo3pCVnFlqbg=; b=CiF5tcJZwnqMV0EPn9WQYcznpIIagUlgoNs0NsqBvwEA0VRP4KQGZ1wF5K3ejCJW8G R+CaUE3rlQYHAtxV51PqPf33+QVQRFuA8T01OEQRwH9tZtHxP6xKEE5aRUw/r2tACTTj Iwb0lMoH8PvZrsSNGIkdxl3M7tMio6a9kat6/j4uzV55lz9KEaOp5qF+8Cl7EN7Dhw5c V2EhsU0WHX9X1nuJzOVkwgInF6P2iJLlEf86uEm01VI5N4pg0tROxnAV2S6WVjOP5Bhr WQ6XkdIRfE36O4qCMQR7oT+WbpVuT+38yYD/BQMIR197YpR8+bTvr/e9/PYPeNgKGoO+ i+5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="fQUQwf/c"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id r16-20020a374410000000b0070671b50913si22049351qka.702.2023.03.30.06.19.44 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 30 Mar 2023 06:19:44 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="fQUQwf/c"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1phsBb-0007z8-GU; Thu, 30 Mar 2023 09:19:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1phsBR-0007kG-RU for qemu-devel@nongnu.org; Thu, 30 Mar 2023 09:19:20 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1phsBP-00021J-LR for qemu-devel@nongnu.org; Thu, 30 Mar 2023 09:19:17 -0400 Received: by mail-wr1-x42a.google.com with SMTP id t4so13819112wra.7 for ; Thu, 30 Mar 2023 06:19:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680182354; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=pAX9S025dEyrSFkAAp1TBAvo2BRP/u6bo3pCVnFlqbg=; b=fQUQwf/cBK97OQOowkvhytsrjJOaPlu/0ZAvY6vLWyMhoRqELhgff/awGoeuDGCw9J NVisV+D2DtIvWmftlK8RTtkpACcST6gmtVb2iWswdFrajMS8Bx3mxEXXlO7VFksJPxFu xtPPRRAd5pZ0TkJPGmPm20nY9m3GEHGm50LksNEhMBDq+d6ELL1C9Xwfcbya0TAQyFCY iUv5ghAgk6TTEISciAZiTEH8yKqWFpwZbEXmB61AfXn51s1ogb6Zweddbnx+qo72SF1p 45Cz+BO0zUyDYayJqWuQLPK08ro28eH2oIKiIynKEaW0yBSscVVuAQW9/LijK/8iBZ+u mxvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680182354; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pAX9S025dEyrSFkAAp1TBAvo2BRP/u6bo3pCVnFlqbg=; b=oJYIzd953YvOyNCv7Hws/TpOVl3zN+SDsFKWpmKw1o9spUBcSjMozp5mmdW/nYV+ya qDvX2wpjtEu2r4LxOPzaJHP6OUS2N6rY5HlvcJaIh698s8TN956ynR4GnYMClvKKjbPC s2mtPeWA6e+AcqeLtrdfB72aiFGL6sigh0mvb8mrxwhQwa8ScMDMjKyc2qb6huKW87ZZ rrknjbqb6ATHp9Ft05cYvw2pMMDb5/D5UqsgwATUU8M2wFblM7ikWpPC8malFKw/PLkF E7iekrDPXC2uuLjIDdZIklYEOPLggBaDHfuPPixem+Bqo2avmI1YGhuHdFeJn+J3YAg/ 3l1w== X-Gm-Message-State: AAQBX9fROKXT5K06ufWC1517uKzf7LGndCTN79qV9Oim1L63y7belW5P g0oUPpgUPbUd9OhwF/EE7P5vZVe0COO2lCmNduc= X-Received: by 2002:adf:e484:0:b0:2ce:a938:ecc9 with SMTP id i4-20020adfe484000000b002cea938ecc9mr17937943wrm.69.1680182354124; Thu, 30 Mar 2023 06:19:14 -0700 (PDT) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id e7-20020a5d5307000000b002c5a1bd5280sm32869812wrv.95.2023.03.30.06.19.13 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 30 Mar 2023 06:19:13 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Titus Rwantare , Laurent Vivier , Jiaxun Yang , qemu-block@nongnu.org, Nathan Chancellor , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Aurelien Jarno Subject: [PULL 3/6] hw/mips/gt64xxx_pci: Don't endian-swap GT_PCI0_CFGADDR Date: Thu, 30 Mar 2023 15:18:53 +0200 Message-Id: <20230330131856.94210-4-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230330131856.94210-1-philmd@linaro.org> References: <20230330131856.94210-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=philmd@linaro.org; helo=mail-wr1-x42a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Jiaxun Yang 145e2198d749 ("hw/mips/gt64xxx_pci: Endian-swap using PCI_HOST_BRIDGE MemoryRegionOps") converted CFGADDR/CFGDATA registers to use PCI_HOST_BRIDGE's accessor facility and enabled byte swap for both CFGADDR/CFGDATA register. However CFGADDR as a ISD internal register is not controlled by MByteSwap bit, it follows endian of all other ISD register, which means it ties to little endian. Move mapping of CFGADDR out of gt64120_update_pci_cfgdata_mapping to disable endian-swapping. Fixes: 145e2198d749 ("hw/mips/gt64xxx_pci: Endian-swap using PCI_HOST_BRIDGE MemoryRegionOps") Reported-by: Nathan Chancellor Signed-off-by: Jiaxun Yang Tested-by: Philippe Mathieu-Daudé Reviewed-by: Philippe Mathieu-Daudé Tested-by: Nathan Chancellor Message-Id: <20230223161958.48696-1-jiaxun.yang@flygoat.com> [PMD: !!! Note this only fixes little-endian hosts !!! ] Signed-off-by: Philippe Mathieu-Daudé --- hw/pci-host/gt64120.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/hw/pci-host/gt64120.c b/hw/pci-host/gt64120.c index f226d03420..82c15edb46 100644 --- a/hw/pci-host/gt64120.c +++ b/hw/pci-host/gt64120.c @@ -321,9 +321,6 @@ static void gt64120_isd_mapping(GT64120State *s) static void gt64120_update_pci_cfgdata_mapping(GT64120State *s) { /* Indexed on MByteSwap bit, see Table 158: PCI_0 Command, Offset: 0xc00 */ - static const MemoryRegionOps *pci_host_conf_ops[] = { - &pci_host_conf_be_ops, &pci_host_conf_le_ops - }; static const MemoryRegionOps *pci_host_data_ops[] = { &pci_host_data_be_ops, &pci_host_data_le_ops }; @@ -339,15 +336,6 @@ static void gt64120_update_pci_cfgdata_mapping(GT64120State *s) * - Table 16: 32-bit PCI Transaction Endianess * - Table 158: PCI_0 Command, Offset: 0xc00 */ - if (memory_region_is_mapped(&phb->conf_mem)) { - memory_region_del_subregion(&s->ISD_mem, &phb->conf_mem); - object_unparent(OBJECT(&phb->conf_mem)); - } - memory_region_init_io(&phb->conf_mem, OBJECT(phb), - pci_host_conf_ops[s->regs[GT_PCI0_CMD] & 1], - s, "pci-conf-idx", 4); - memory_region_add_subregion_overlap(&s->ISD_mem, GT_PCI0_CFGADDR << 2, - &phb->conf_mem, 1); if (memory_region_is_mapped(&phb->data_mem)) { memory_region_del_subregion(&s->ISD_mem, &phb->data_mem); @@ -1208,6 +1196,12 @@ static void gt64120_realize(DeviceState *dev, Error **errp) PCI_DEVFN(18, 0), TYPE_PCI_BUS); pci_create_simple(phb->bus, PCI_DEVFN(0, 0), "gt64120_pci"); + memory_region_init_io(&phb->conf_mem, OBJECT(phb), + &pci_host_conf_le_ops, + s, "pci-conf-idx", 4); + memory_region_add_subregion_overlap(&s->ISD_mem, GT_PCI0_CFGADDR << 2, + &phb->conf_mem, 1); + /* * The whole address space decoded by the GT-64120A doesn't generate From patchwork Thu Mar 30 13:18:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 668611 Delivered-To: patch@linaro.org Received: by 2002:a5d:4d08:0:0:0:0:0 with SMTP id z8csp944265wrt; Thu, 30 Mar 2023 06:46:36 -0700 (PDT) X-Google-Smtp-Source: AKy350YfYXaDX2Z8wCPLiHz9w3thXHs6P/zPbRmgVTP5rq4vUb0WGShve9negS/KyOnEEkHW0YtF X-Received: by 2002:a05:6214:29ed:b0:5d1:d9f3:dd63 with SMTP id jv13-20020a05621429ed00b005d1d9f3dd63mr38843265qvb.47.1680183996274; Thu, 30 Mar 2023 06:46:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680183996; cv=none; d=google.com; s=arc-20160816; b=TjmV0iHE7pBzi36WWhBFvr36BwsBY2MzwKe3mIrCH3++xvRUn6aA94yuEnvW9fbth9 yFuV9rcF2Ro4zFPySSTCcOG4OtaimD0N5shrbX73OoZigL+qQKsGGmr0/zhLDbJ3oNCq E1dAsUDI2iZxi68T/rE/8pOGsRkFLX6yHoOtaExyPLuS5I8pD5Cit4wsikabHun0LH4a KzmYIo9/K1kB5gm9IplFeT28MV8j4SWoFwp6ufJWnD5QLeMMfWcCB2i4Z6GFUQ83GE+c aL2tPVqrv0/Xx5ep50fBeo7NION03rB4YtSR9gapn+AT3BCxkBOa1CsVW+yNYSBYhtEc o5Bg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=hLMvNuV9m+vGoYBzqYhhlHDKS4XBdozQbF/ABoeVmps=; b=p4wQhIM2ZbHOFeLqUmQeaZa5pvXegKiYVHasWXd89/3/uEWtAvQqF3sXrQSVtuvZ33 GJoV4lO9DTAZsrtrDGRImwxrsSeGgwKSChl7KYMclxqa+r9sWjvShQcqEukhaWTPtQVJ p3ToBCPuS8eZt+28JYb+yjXLQzfWCcYFCtKdVg5RbvJaXXjbfy1hgbx0W234kWsRIHL3 JB6vCp5vH6r75uICpDkpG5nkXX/DJGObQ8wl7KCCUfDOTBKMvfirIfoZRE8tZHne15pL GDlkDbCErrclaE0brPMVx8AxW+TXgbMtVaOZ6JYDW60/JKFfzz6eGvBnQyF2Hjx/wzKC 3YuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VnyZ+TcR; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id bi9-20020a05620a318900b007469cc87e17si18803056qkb.599.2023.03.30.06.46.36 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 30 Mar 2023 06:46:36 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VnyZ+TcR; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1phsBf-0008LG-JE; Thu, 30 Mar 2023 09:19:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1phsBW-0007uG-Tm for qemu-devel@nongnu.org; Thu, 30 Mar 2023 09:19:24 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1phsBU-00022j-Lt for qemu-devel@nongnu.org; Thu, 30 Mar 2023 09:19:21 -0400 Received: by mail-wr1-x434.google.com with SMTP id m2so19054675wrh.6 for ; Thu, 30 Mar 2023 06:19:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680182359; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=hLMvNuV9m+vGoYBzqYhhlHDKS4XBdozQbF/ABoeVmps=; b=VnyZ+TcRxuX99uNbCKeRZg7FhEE509QXf1SS33Ac3Ca+75J+il4M4fhrdC5okwHSPh 4nl8s9LcvPJcLelLRiOBGcvz98MGWaOKb+krbet5aBMRZJp21uxZI1VghuoHP0gOnR2z EiERgIhooz8X7ZnLHrVvsckG+TzKEhkOqUHmGmlzCRAFU+1jo4BMOtsgesT/x4htmj90 CLBDJVzli55LGQqmtXh0S4C00ceOOn1Mjl1LQcomP6BFILsbcAGDxJAKnyGjG1WEdHYN Xx4WThaNoNmf8hfne1WKbQSd2SAdAzr+w2JdF2YAJUp92uKW60Ur90PrQgxZ45WUUOoF BSGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680182359; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hLMvNuV9m+vGoYBzqYhhlHDKS4XBdozQbF/ABoeVmps=; b=Kw61ZB+vYddiMTij2975C5DL5nNtlrA0ZBt68/St65sBJcr8QFXDv/TQ/SRHIp1gYL SgWOBDHIPsAgIucAsJ4gt0yiYWPlkPWUHLBd5HOaTDb9sOW2ZsTY5cPKRAQzEdGxCkb1 EJLQYiFx6s0FSv3AlRANg57VGbHuhK8HS+HDlhZ2mRyg9JqzP19p2ddaAuYGzzcs2djF hBacE+5DvhvVuALtaTrVbogq+WYv98xDfdZsFx9NmwZve7/FCHk+lS+RCpI68jFTF1XW oNz85OXIhex6feLWxCADg0Q5+hXTG1AnUNPsx8nGMW8pQMdCmsdVl3LfsqNppHxE28Zr fT3g== X-Gm-Message-State: AAQBX9dNAQTbPgDmMxnoEhS3LABSeOn+uIGzq+Z5TYOZjagoDG/CD77U xM6vov2VLQnih+Dk4LMv22pxP3g+8GU2Jfp0i6M= X-Received: by 2002:adf:f0cf:0:b0:2ce:aed5:7dc with SMTP id x15-20020adff0cf000000b002ceaed507dcmr17714530wro.68.1680182359219; Thu, 30 Mar 2023 06:19:19 -0700 (PDT) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id b5-20020adfee85000000b002c573778432sm32650792wro.102.2023.03.30.06.19.18 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 30 Mar 2023 06:19:18 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Titus Rwantare , Laurent Vivier , Jiaxun Yang , qemu-block@nongnu.org, =?utf-8?q?Phi?= =?utf-8?q?lippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Alex_Be?= =?utf-8?q?nn=C3=A9e?= , Thomas Huth , Wainer dos Santos Moschetta , Beraldo Leal , Cleber Rosa Subject: [PULL 4/6] tests/avocado: Enable TuxRun/mips64 (big-endian) test Date: Thu, 30 Mar 2023 15:18:54 +0200 Message-Id: <20230330131856.94210-5-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230330131856.94210-1-philmd@linaro.org> References: <20230330131856.94210-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=philmd@linaro.org; helo=mail-wr1-x434.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Now that the previous commit ("hw/mips/gt64xxx_pci: Don't endian-swap GT_PCI0_CFGADDR") fixed the issue accessing the GT64120 PCI config-address register on big-endian targets, we can enable this TuxRun test. Signed-off-by: Philippe Mathieu-Daudé Acked-by: Alex Bennée Message-Id: <20230223220404.63630-1-philmd@linaro.org> --- tests/avocado/tuxrun_baselines.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/avocado/tuxrun_baselines.py b/tests/avocado/tuxrun_baselines.py index c3fb67f5dc..d343376faa 100644 --- a/tests/avocado/tuxrun_baselines.py +++ b/tests/avocado/tuxrun_baselines.py @@ -270,7 +270,6 @@ def test_mips32el(self): """ self.common_tuxrun(drive="driver=ide-hd,bus=ide.0,unit=0") - @skip("QEMU currently broken") # regression against stable QEMU def test_mips64(self): """ :avocado: tags=arch:mips64 From patchwork Thu Mar 30 13:18:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 668610 Delivered-To: patch@linaro.org Received: by 2002:a5d:4d08:0:0:0:0:0 with SMTP id z8csp944229wrt; Thu, 30 Mar 2023 06:46:30 -0700 (PDT) X-Google-Smtp-Source: AKy350bLdOXodKl/h0JpD3mhNVNFk62lGGTaFyWwqi9DpP/4sSrCWM7+HrEXj8ylXtyVpIcZrlo7 X-Received: by 2002:a0d:ccd6:0:b0:541:e788:6c34 with SMTP id o205-20020a0dccd6000000b00541e7886c34mr22298135ywd.31.1680183990561; Thu, 30 Mar 2023 06:46:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680183990; cv=none; d=google.com; s=arc-20160816; b=BdhsYYxwUo9gxpC/Gl7p6tImFVi296PJdfScQpXQahvcPJVWcVLC+NF8LOzB6oNkJk p5EYLHmKoS3hAI2R+Kk/jNZgIDi2vvJGYZwBl44+uko1GPHJxtSzy9NzfwY1oaUexCUp uHigRwpFk9afsrUpOEwPAYrZBfwOO861OvWB9kVbeOv1A9CBmYVlTG5JGT6zpdSKMbqb riXD7IRmyzBa2ogqgAefj3CFtITmnrqT6vUXXserHZUVG1k0DEwpV2dWx4KBucu8As8f V7CDazqI03o3RdphVChTYZGufQ0jWwlYODAyXjXK3S7Omcjmw+/UIBI5IS8VYBhrO1cq xMIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=CBSELtOf9xv0/cDxDhg88YCz+YYHgAmDVorjbtOUtaE=; b=T5xVC7d170iu+De27ez2WVMilrm2P4gwIYUtmFOl/7ET+pSq1lXKpn82zCnGPQRZFE W5OdcAnTWm+um1qZbeHym+YIegHVljtiKr5/nBTkqNOaoyi1SU6LIzT2kOGInLNMHMhH hAcyf6J2nA+OohwrTg6tLk82+S29mTGX8Guwt22xDEk9I2siLTikJY/oBIDx28LMMOY5 LrDffEL9sNDa8xSRBw72X11Mk5tF065evCU7xP+eJTPOiW75YXAnmmSra8jBPuQI0xTj mRy/A7b5bT9dQ14MUTFn0KtK5uVW4nQNegnKzCPMT3jx00YkMZq0K3AJlMdsDm+/zWw0 TFzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=b1gZqUxj; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id j126-20020a37b984000000b00748613a7c32si7890387qkf.651.2023.03.30.06.46.30 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 30 Mar 2023 06:46:30 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=b1gZqUxj; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1phsBg-0008Oz-5v; Thu, 30 Mar 2023 09:19:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1phsBa-0007zt-N0 for qemu-devel@nongnu.org; Thu, 30 Mar 2023 09:19:27 -0400 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1phsBZ-0001z6-4M for qemu-devel@nongnu.org; Thu, 30 Mar 2023 09:19:26 -0400 Received: by mail-wm1-x335.google.com with SMTP id bg16-20020a05600c3c9000b003eb34e21bdfso13451089wmb.0 for ; Thu, 30 Mar 2023 06:19:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680182364; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=CBSELtOf9xv0/cDxDhg88YCz+YYHgAmDVorjbtOUtaE=; b=b1gZqUxj6PoTjIdBskg3vZ7vW2lBsuIwClSS4pyVG+hoZ+4i2Dk5OFi9ylvyL9Yu6A XVHGig5bJq4kST3W8iZ+/KHpOmSF+0cCWaX3Q9f/Cq2Wz2qFfiCf7qI+gPcEPEm8mfRb qfbWaVBcdMeSBJSBxl8Jdm/jLPvFXW/COyQAKRrGbgpAQ10eiDlE4XfWSxzewiEzKhFZ KrS7WyYJW360cVFw44jTw9l9enec+yKSl0uuCSp40ldxhlpiaa5j2DGPQWVABifkYyI1 8Htv3SYcY2KVTEN8rjssu+2qwEmbeZnzWh8DUD5MRvNbnngXMDONzCIDXp20fQJeApjM gDuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680182364; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CBSELtOf9xv0/cDxDhg88YCz+YYHgAmDVorjbtOUtaE=; b=Wr8na13ulmWnwfRBb1/iZ6iSbhwOyXDrqz//GWx4IGeA6EzL497iXhCWOVGmDGasOj 0H3DT/0ifR/0pLmD6Fy0VeasG43rRJaszLTx/OF+0m2t/zrnfcU7hvJbfUu2s3XeMmQ/ BGcXkOXoChvQc4ejInFFjGAoik4HQDcsK24P+gvuGJ+BIjFlsCyhb0M47UsH6xtYptlX GeIaUiMx4OXDhOTVJ2WpQR+BbrT+2FpQBndZI9bJGGcSH1B76Q+m5EatDqqAS7SlhCrz GfzFKP8bY21EUJUZX/BPpI7Yn9vDrwr8bC1eByX4xZvvIkVSVdfKYsHo6d6J5TaW2NYw UH9w== X-Gm-Message-State: AO0yUKWEcaR3JQ4aWESiklRLUmKQ3ST5U/oz8dUnlUCPdBvdf9Iwi9Gp 37GHa8s8KaYpzkvN9bklJXcgsUe6AUTQ1lQtXn8= X-Received: by 2002:a1c:7702:0:b0:3ed:cfa6:8854 with SMTP id t2-20020a1c7702000000b003edcfa68854mr18261991wmi.26.1680182364111; Thu, 30 Mar 2023 06:19:24 -0700 (PDT) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id h16-20020a05600c315000b003eda46d6792sm6268321wmo.32.2023.03.30.06.19.23 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 30 Mar 2023 06:19:23 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Titus Rwantare , Laurent Vivier , Jiaxun Yang , qemu-block@nongnu.org, Patrick Venture , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 5/6] hw/i2c: pmbus: block uninitialised string reads Date: Thu, 30 Mar 2023 15:18:55 +0200 Message-Id: <20230330131856.94210-6-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230330131856.94210-1-philmd@linaro.org> References: <20230330131856.94210-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=philmd@linaro.org; helo=mail-wm1-x335.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Titus Rwantare Devices models calling pmbus_send_string can't be relied upon to send a non-zero pointer. This logs an error and doesn't segfault. Reviewed-by: Patrick Venture Signed-off-by: Titus Rwantare Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20230322175513.1550412-5-titusr@google.com> Signed-off-by: Philippe Mathieu-Daudé --- hw/i2c/pmbus_device.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/hw/i2c/pmbus_device.c b/hw/i2c/pmbus_device.c index c3d6046784..44fe4eddbb 100644 --- a/hw/i2c/pmbus_device.c +++ b/hw/i2c/pmbus_device.c @@ -94,6 +94,13 @@ void pmbus_send64(PMBusDevice *pmdev, uint64_t data) void pmbus_send_string(PMBusDevice *pmdev, const char *data) { + if (!data) { + qemu_log_mask(LOG_GUEST_ERROR, + "%s: %s: uninitialised read from 0x%02x\n", + __func__, DEVICE(pmdev)->canonical_path, pmdev->code); + return; + } + size_t len = strlen(data); g_assert(len > 0); g_assert(len + pmdev->out_buf_len < SMBUS_DATA_MAX_LEN); From patchwork Thu Mar 30 13:18:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 668609 Delivered-To: patch@linaro.org Received: by 2002:a5d:4d08:0:0:0:0:0 with SMTP id z8csp944058wrt; Thu, 30 Mar 2023 06:46:11 -0700 (PDT) X-Google-Smtp-Source: AKy350aompQNt9k7TyYFIh0Riwfl3gZqa91xJszRTFJHpCNT/iK7TzoZyE8kpY2ZWRRT7bKH/+L8 X-Received: by 2002:a05:622a:1ba4:b0:3e4:effa:e1c1 with SMTP id bp36-20020a05622a1ba400b003e4effae1c1mr9623282qtb.7.1680183971442; Thu, 30 Mar 2023 06:46:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680183971; cv=none; d=google.com; s=arc-20160816; b=lrTfzGSI6CaWLxV6AGmDlXxzo7CO2qF6YAk1z1WUFcg3rPyg1nqIE+eF1lUUl8zT73 JjD+wslnZBUpZOWhnwuOnKf0SmchTcJ9GhX2x1tuHRK0JjrIED06i1+xPjWd4FV+7Rlz u21OyepAUBimhUZxAL0zCV5HjbKk69hRbGjTLF3VkecB75MNWkUTJ4DBQvjhoIxjJKMH Te5JfDo29jhZvAIBoTmnVVKoxrVu++lDsIqo2gyrxrNVEH28KHxUl993m1gZ0k7RVKQ4 1+e9LGela7EfhPphxqkR+BXIgmbsT7rj9Mmx/NY9Z3o1MjTzkOJz9LE1aTNI4A+i/ga4 mGJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=b4Qm4LX2kkl4/kGpdszX+MCrNUvG+BMcsxJOvXW1ttk=; b=LxnIesZaro6Gcst+/vSW9qNlkPLx2VE85AiYjsKnHMBiaO2JjwOmsg8t+NSb1mc2zL ZHu0A2TEDXehu9lH3eD3+rbD6JMUF4XcXwvpmzyDuZ0FxqeQAm1IDErBrrbqncVEOX2Q g9wuA/ZHn4chuiJXhWC6mXCNgW6r+Xbxb3wgEMrspnpjKP8tNb5Fl2Ekwe8bUXl8qXGS gfpTs/OUv4n84scKjh2jvEyf5t/1CcberaEBXf2wOw3sbDKV3PjEu7Z9ilO42LLkf/aI 1llih0/ULEFUJYSm6OvtLOhA+6nDSeLFO3MY+uHaG4NOhdQX7pXxdO+ETjNTKCLs5p9c DEsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UKwpyL+w; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 196-20020a3706cd000000b007467f942276si20043582qkg.377.2023.03.30.06.46.11 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 30 Mar 2023 06:46:11 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UKwpyL+w; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1phsBi-0008U3-Ol; Thu, 30 Mar 2023 09:19:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1phsBg-0008PG-4y for qemu-devel@nongnu.org; Thu, 30 Mar 2023 09:19:32 -0400 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1phsBe-000203-8F for qemu-devel@nongnu.org; Thu, 30 Mar 2023 09:19:31 -0400 Received: by mail-wm1-x336.google.com with SMTP id n19so10908139wms.0 for ; Thu, 30 Mar 2023 06:19:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680182369; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=b4Qm4LX2kkl4/kGpdszX+MCrNUvG+BMcsxJOvXW1ttk=; b=UKwpyL+wLchXVr5BObyFWaNX0D0Dg7SuA3Bqthn9alhX9NGwi5QJombFRFXq5KU9VW yrBjeCZ0Ft2xsEMOfWr9WsJ2E+LDL5ajxK6Ba0MMnCqlzwZAMl7w6BuEXdYPrPVrv1hu DalJhYSjM+6SEAh96wd1ofNn/mmdv4XNK7nXFNnK6whSWseowUO3Kl+uP8MPmKn0gHb3 oY0XOPkf3tpsaTdjAUxhKE+3sHWa681dEz7mJEI4ZGLlYcY0QT3KoTXgKRfoFq5T6T6e HEuDeFNbw5kLfqw9NP4Gl5HCs74tjyIOtW1L7KZfXdkPFZcYqCPeUM+qz896Pm+XS/Pb cCrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680182369; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=b4Qm4LX2kkl4/kGpdszX+MCrNUvG+BMcsxJOvXW1ttk=; b=EuY2f3nUUPOt27ANVNmT0cwhWWIDsDADrk4RhicQzFFCeLY1tjd1uOAT7v/hI8v2bJ JkDW0Bfqe1uVoi24cf7A2q3cUK9Lxln+JuKxwbEfr32mdZcYpdmu+8fhiDdqiPM3dwED 0XYAxc84LA/RjBLV8cGg/lyfGuCyM13S3SHSwXa0tfm4UhUfngXzdxItlDC1aIWfgpEL uEV/2Snrv1F0mShHroHKB0tv/Z8icT5d8BD+h3ZjWzf5v/y6ayX8f0UUfrDZdzgZdbdo Mr0axaOrr8dBPDDfHz0xT1wC2UyZeSbgWr5pOw0TPagDSd1X4VjAQx0SY/JLfaTRxRoh 6RDg== X-Gm-Message-State: AO0yUKXkixqyt2raHI2a8v4hph1MFLrK1CrawmEELYU00XRR9QKCW/zB WhcSnqz38RBszLQ98L7++rJM7OKOUUhlgt8KnNY= X-Received: by 2002:a7b:cb44:0:b0:3ee:672d:caa3 with SMTP id v4-20020a7bcb44000000b003ee672dcaa3mr19345371wmj.18.1680182369214; Thu, 30 Mar 2023 06:19:29 -0700 (PDT) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id s17-20020a05600c45d100b003ed51cdb94csm6177599wmo.26.2023.03.30.06.19.28 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 30 Mar 2023 06:19:28 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Titus Rwantare , Laurent Vivier , Jiaxun Yang , qemu-block@nongnu.org, =?utf-8?q?Phi?= =?utf-8?q?lippe_Mathieu-Daud=C3=A9?= , Julio Faracco , Stefan Weil , Kevin Wolf , Hanna Reitz Subject: [PULL 6/6] block/dmg: Ignore C99 prototype declaration mismatch from Date: Thu, 30 Mar 2023 15:18:56 +0200 Message-Id: <20230330131856.94210-7-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230330131856.94210-1-philmd@linaro.org> References: <20230330131856.94210-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=philmd@linaro.org; helo=mail-wm1-x336.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org When liblzfe (Apple LZFSE compression library) is present (for example installed via 'brew') on Darwin, QEMU build fails as: Has header "lzfse.h" : YES Library lzfse found: YES Dependencies lzo support : NO snappy support : NO bzip2 support : YES lzfse support : YES zstd support : YES 1.5.2 User defined options dmg : enabled lzfse : enabled [221/903] Compiling C object libblock.fa.p/block_dmg-lzfse.c.o FAILED: libblock.fa.p/block_dmg-lzfse.c.o /opt/homebrew/Cellar/lzfse/1.0/include/lzfse.h:56:43: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes] LZFSE_API size_t lzfse_encode_scratch_size(); ^ void /opt/homebrew/Cellar/lzfse/1.0/include/lzfse.h:94:43: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes] LZFSE_API size_t lzfse_decode_scratch_size(); ^ void 2 errors generated. ninja: build stopped: subcommand failed. This issue has been reported in the lzfse project in 2016: https://github.com/lzfse/lzfse/issues/3#issuecomment-226574719 Since the project seems unmaintained, simply ignore the strict-prototypes warning check for the header, similarly to how we deal with the GtkItemFactoryCallback prototype from , indirectly included by . Cc: Julio Faracco Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Stefan Weil Message-Id: <20230327151349.97572-1-philmd@linaro.org> --- block/dmg-lzfse.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/block/dmg-lzfse.c b/block/dmg-lzfse.c index 6798cf4fbf..4ea0b9b20d 100644 --- a/block/dmg-lzfse.c +++ b/block/dmg-lzfse.c @@ -23,7 +23,12 @@ */ #include "qemu/osdep.h" #include "dmg.h" + +/* Work around a -Wstrict-prototypes warning in LZFSE headers */ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstrict-prototypes" #include +#pragma GCC diagnostic pop static int dmg_uncompress_lzfse_do(char *next_in, unsigned int avail_in, char *next_out, unsigned int avail_out)