From patchwork Fri Aug 12 11:45:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 596806 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:b345:0:0:0:0 with SMTP id w5csp1498235maz; Fri, 12 Aug 2022 04:54:00 -0700 (PDT) X-Google-Smtp-Source: AA6agR6JUU6h1FSlO72xySvDIjir8r4X6fYLpAEWdJmymiambUCH8ukuUSQwfEzAm/5RaMr/S2hp X-Received: by 2002:ae9:dfc6:0:b0:6b9:acb6:457d with SMTP id t189-20020ae9dfc6000000b006b9acb6457dmr2376494qkf.574.1660305240563; Fri, 12 Aug 2022 04:54:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660305240; cv=none; d=google.com; s=arc-20160816; b=wwVuG0Z/2Mfn0JVeDqFgJUPd8mdBCL5yIHJkAGXtPgrjB7BX1x1eaunXTWbjD3NvR0 ukOG/CUydF77qg/DHFusPax+7OiTpCdvBscMQtXg6Q2pk06f19ffOknvKJ0YaTZjLGgR 5B+YOol/5Qr9k6C71ikyBGkRWHLi5pJLcT9QAT3rZ6zjVH9uM3unssdYDmrS1QyD3arF Mdu7RMCzA8UlwnFOw5MBD0t6rDI1+Pn+E9VNkCUbdElAjgqY8J4F+5ZgF992u2pcTYSO rZ9tjS/oFGZTQo64L3JacdxBA+hp95JDvjc3ERoRsw60ODOx7yd85NR7tECwkmYlFqS4 zBSg== 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:to:from :dkim-signature; bh=1ZbaCMFWI7gK+g488PCV1yrLBsHg1eArDm/sE2QskbE=; b=Uf0h3tE9XOR2xhLigr6opwxI+sTjajs3ULb0vEWfuunmyGaNnyefm3z8J23bEfZl3g 2VBHCwAyPRTepKTL8IHAww5+YvEVYpO0g5EPWLwHx5qSVrlgo9qUAk7O7ogoRIipB2ZK 118jd4lbxSHYPpnopnyKIz0HY7S9NyRTyAnzJbu6LIOuUkh9910CtOYkNZC0LasKvM/A ShxJ0LrbUanfflO5L1rpOrlygk8HPlrrlgZzDXFekC2qRph1VzHTw/WdXGlt8MDJIQRb o+1kgiifi4+pgTI+ysZTtc9PARVN48jKxHB1A2LoL3q/MhcDURHOIzVJa9aapmnQP2Wp T/iw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pFhYwXSC; 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 q13-20020a05621419ed00b004741e3dab62si987484qvc.52.2022.08.12.04.54.00 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 12 Aug 2022 04:54:00 -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=pFhYwXSC; 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]:59834 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oMTEl-0005Sw-Uw for patch@linaro.org; Fri, 12 Aug 2022 07:53:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35580) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oMT6c-0000Mt-0p for qemu-devel@nongnu.org; Fri, 12 Aug 2022 07:45:40 -0400 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]:35608) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oMT6a-0002P5-6d for qemu-devel@nongnu.org; Fri, 12 Aug 2022 07:45:33 -0400 Received: by mail-wm1-x332.google.com with SMTP id m17-20020a7bce11000000b003a5bedec07bso2438697wmc.0 for ; Fri, 12 Aug 2022 04:45:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc; bh=1ZbaCMFWI7gK+g488PCV1yrLBsHg1eArDm/sE2QskbE=; b=pFhYwXSCEuS0nMu7nyXUvFbqL3BVKj2Fu57IKBdO//OjdJKznDmRHvar3Ivh4HAD/L 7AJjgT5gMLt+/tA9vY9gdmrUfi4AA3g2pzerDBPlgVPVNDtfCVz7R7qtDKHBPMg/NUtB apF2VLm17LcKLFhkLmJ4AM2NvsRckjCzFE0fv5DrCs8Kw7u29et8xnu002FTWDU818oB dk6qc5bm6bFhtCKNOky1gbLGYUtkuWT5hGZNwL83gB3XuV7jCJrlJlm/0fT73DOAp/am Z4BjVCQLu5uV81g7TeiNoHbwBEUbqaegG540FOTRvP/wXaq/9owr3+/nLP+Bb/cIIX1v FSlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc; bh=1ZbaCMFWI7gK+g488PCV1yrLBsHg1eArDm/sE2QskbE=; b=NV1SosbP7YcP4pys3nNZ+/nmxQkcTKPsj0Fik3lpI/2FTds4B5235JCu4s2uTnDcdK Gp7kRMGrPwvQee51GysIpjrTJ4vjdWAss1Sh4hykZnZRoWZiraxmx5WiN5O7rs9Um9dQ fLmou5cVkfdmibEWnv6sXrSL7LnDsrQ1RoUpk+arZdeT92gDvpNnH+G/LlmKxkXEp4Kk oV6FtoY22DcmQZmHG3joujjGa27lU5b5rCQ2HjnhpqgIyMck3VGMPsQvvPFU/MNH0gpb W2xrtAKVBe9lJxSlDNROYt44zYVgZmEmO3A8/iHu9rK6aaFHoxET+R3LMWa+tjcVp4SX +UcQ== X-Gm-Message-State: ACgBeo0omD2TClvH8XJLAN/69casi6+rg0fsXGVFQZqYVgQzpwexCSsP NqKFCoLgTHKQ6igeTHbEZ2jcd1+iRjPf/A== X-Received: by 2002:a05:600c:3d1a:b0:3a3:7d4b:edc5 with SMTP id bh26-20020a05600c3d1a00b003a37d4bedc5mr8852296wmb.156.1660304730818; Fri, 12 Aug 2022 04:45:30 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id n8-20020a05600c3b8800b003a5418245b9sm11257797wms.19.2022.08.12.04.45.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Aug 2022 04:45:30 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 1/5] target/arm: Don't report Statistical Profiling Extension in ID registers Date: Fri, 12 Aug 2022 12:45:23 +0100 Message-Id: <20220812114527.1336370-2-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220812114527.1336370-1-peter.maydell@linaro.org> References: <20220812114527.1336370-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x332.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, T_SCC_BODY_TEXT_LINE=-0.01 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" The newly added neoverse-n1 CPU has ID register values which indicate the presence of the Statistical Profiling Extension, because the real hardware has this feature. QEMU's TCG emulation does not yet implement SPE, though (not even as a minimal stub implementation), so guests will crash if they try to use it because the SPE system registers don't exist. Force ID_AA64DFR0_EL1.PMSVer to 0 in CPU realize for TCG, so that we don't advertise to the guest a feature that doesn't exist. (We could alternatively do this by editing the value that aarch64_neoverse_n1_initfn() sets for this ID register, but suppressing the field in realize means we won't re-introduce this bug when we add other CPUs that have SPE in hardware, such as the Neoverse-V1.) An example of a non-booting guest is current mainline Linux (5.19), when booting in EL2 on the virt board (ie with -machine virtualization=on). Reported-by: Zenghui Yu Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Zenghui Yu Message-id: 20220811131127.947334-1-peter.maydell@linaro.org --- target/arm/cpu.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/target/arm/cpu.c b/target/arm/cpu.c index 1b7b3d76bb3..7ec3281da9a 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -1933,6 +1933,17 @@ static void arm_cpu_realizefn(DeviceState *dev, Error **errp) } #endif + if (tcg_enabled()) { + /* + * Don't report the Statistical Profiling Extension in the ID + * registers, because TCG doesn't implement it yet (not even a + * minimal stub version) and guests will fall over when they + * try to access the non-existent system registers for it. + */ + cpu->isar.id_aa64dfr0 = + FIELD_DP64(cpu->isar.id_aa64dfr0, ID_AA64DFR0, PMSVER, 0); + } + /* MPU can be configured out of a PMSA CPU either by setting has-mpu * to false or by setting pmsav7-dregion to 0. */ From patchwork Fri Aug 12 11:45:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 596805 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:b345:0:0:0:0 with SMTP id w5csp1498228maz; Fri, 12 Aug 2022 04:53:59 -0700 (PDT) X-Google-Smtp-Source: AA6agR4nKFEBzZ1kIKgzPsB+OxUo5I1PWWax9lwZwT7phhYm1+ncJ8B+6ozUGXlyZG7Pmv81rUYp X-Received: by 2002:ac8:7c44:0:b0:31f:3dc4:25db with SMTP id o4-20020ac87c44000000b0031f3dc425dbmr2945177qtv.612.1660305239461; Fri, 12 Aug 2022 04:53:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660305239; cv=none; d=google.com; s=arc-20160816; b=c8eASPeFcNIj5gVNnB4xsUsaly2xuecpGo1vpL5e+F4E2lNjPaxBokPQyfXIVZo+Fv WEBiw9t/B2clSnMdQMwcJDoiR6qkLTlErxpHenS7yBqrZpO7K6kTpPnHaIcF2WwYE4/A 6A3YQ2I758zhZFIVrDs5vJtdt+wkpC8CkAqHltSR4+vAXRDDXR1w6kTfUrB3zSBrdwRI 3iMnQ4CoHK23tzc0UD0fPRoyVwBowoaJ+DE15sdpkNMJXL4q6cjNAhPHruHWrYZ4hf3N 2NVsXsbY+jfgZUntEN6mceTAQQVMlPYSpUIqqp08PMlm0Fy+ClliZ9Jk0gkrPJZUNGNN FZTQ== 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:to:from :dkim-signature; bh=vbWfB9CjU9z+tqDUQgDaE2aZH/5w51IwbVjV5htTk/w=; b=zCUdZTihN5MtNWKVle1CmQSjIPIai0OJpqxTj9qMEM3EWt+stt7IPQyW6Frx9JcdFk r2dn0UW0nZw5PuMH+RQGunan0GWModYu4QHVpbf51odaDXH1I/LeaMQZo1XOnc/861lR nlrdSeRYi6MdE/uUl7vvDQ6u1ZEEycLi7iOt/t6XQN3vUWRTNtVnjIIbVsBXxgXpKNXL 1Zc6pYaUabSZZSuQNl8DQVJPpCM/wMkdOYqSD973bMF3Tcz5Hdkrx37WLT0zDWqFUqRR /JO3GNk/UlHIneTuJTqOgX1wmy1l8D/ZaISmqeEBBG/VDhQifG8YM3h3VbZrNejpNoX1 ncBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IZNvGP+R; 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 ff19-20020a05622a4d9300b0031eecd338f6si1347029qtb.11.2022.08.12.04.53.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 12 Aug 2022 04:53:59 -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=IZNvGP+R; 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]:59912 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oMTEl-0005VV-0T for patch@linaro.org; Fri, 12 Aug 2022 07:53:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35612) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oMT6d-0000NA-Me for qemu-devel@nongnu.org; Fri, 12 Aug 2022 07:45:40 -0400 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]:42698) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oMT6b-0002PB-PI for qemu-devel@nongnu.org; Fri, 12 Aug 2022 07:45:35 -0400 Received: by mail-wr1-x432.google.com with SMTP id z12so921215wrs.9 for ; Fri, 12 Aug 2022 04:45:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc; bh=vbWfB9CjU9z+tqDUQgDaE2aZH/5w51IwbVjV5htTk/w=; b=IZNvGP+RRqEbXEXmWRrKMEVTNO9lJoEiXHwx3EmWRgXkpJKHTtr+lXZqbPGIjiRVND SHXJt6e59K9QIdMJ0nfRIaExUhAduK3MK7Ad5gEhkFVUYi7a7P1PYD3O7rLHRtjNd9SY RHozYpeVGoEQhnidV7P+A6r1m2eyLgJ4KkSaT9Mbp1e6l6H232KErr1EyyKxs20TooNh /dTIadar/s6a9DKvnuRz230tR9G0vyKgToHqwaZ3v/+KZAYyq5bginc8Ad66hMu7Ob0e /4mLdk4HKnzg8tiDQKohhgp/yn2sU8Gds4Mcf6PVqoBfiluelI2RTBC5Egp9jF7sMmIO EjMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc; bh=vbWfB9CjU9z+tqDUQgDaE2aZH/5w51IwbVjV5htTk/w=; b=coBa46hibUrrxezPDCdUJjjMm4fJzw4CBjNL6VAa0tAG0azFD/w9GMD/2mRKH90CnX MayhWHWuFU5xHDqve1jEPgnoyZ1+054U/ToYmMo2HSI/+gmzy2h+bDlmoCCaLKkgb/BC aRYy8IdKJr6SnulFE8rkE5mhwCj0P13nRom0HuiHqIX6XVdXybVE7QzntxPbMynRWPrQ 03LACIHlaV+IHdKp66zon58N0PL+YtXz2MuW9l3NfQwj56LZMvKjxhNVWRVeF8EqjLT2 dpGiD5dDtqGKtETgkQxYoZD5PerRbe+KkZGPO98x8bWCyMOJsgEjV+X9s3yx8v7S1GuR xucw== X-Gm-Message-State: ACgBeo0FHCS7R9EguKB9hFJJbnuqOv5e3UplRBR6ZEudzhHK9wca5W2Z v+soiXjPQV2L9yjrKHZMdiF+Oc3WIfKhvw== X-Received: by 2002:a05:6000:1f07:b0:21f:1403:a59d with SMTP id bv7-20020a0560001f0700b0021f1403a59dmr1856805wrb.46.1660304731813; Fri, 12 Aug 2022 04:45:31 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id n8-20020a05600c3b8800b003a5418245b9sm11257797wms.19.2022.08.12.04.45.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Aug 2022 04:45:31 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 2/5] Fix some typos in documentation (most of them found by codespell) Date: Fri, 12 Aug 2022 12:45:24 +0100 Message-Id: <20220812114527.1336370-3-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220812114527.1336370-1-peter.maydell@linaro.org> References: <20220812114527.1336370-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::432; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x432.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, T_SCC_BODY_TEXT_LINE=-0.01 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" From: Stefan Weil Signed-off-by: Stefan Weil Reviewed-by: Hongren (Zenithal) Zheng Message-id: 20220812075642.1200578-1-sw@weilnetz.de Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- docs/about/deprecated.rst | 2 +- docs/specs/acpi_erst.rst | 4 ++-- docs/system/devices/canokey.rst | 8 ++++---- docs/system/devices/cxl.rst | 12 ++++++------ 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst index 7ee26626d5c..91b03115ee2 100644 --- a/docs/about/deprecated.rst +++ b/docs/about/deprecated.rst @@ -297,7 +297,7 @@ by using ``-machine graphics=off``. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ In QEMU versions 6.1, 6.2 and 7.0, the ``nvme-ns`` generates an EUI-64 -identifer that is not globally unique. If an EUI-64 identifer is required, the +identifier that is not globally unique. If an EUI-64 identifier is required, the user must set it explicitly using the ``nvme-ns`` device parameter ``eui64``. ``-device nvme,use-intel-id=on|off`` (since 7.1) diff --git a/docs/specs/acpi_erst.rst b/docs/specs/acpi_erst.rst index a8a9d22d254..2339b60ad74 100644 --- a/docs/specs/acpi_erst.rst +++ b/docs/specs/acpi_erst.rst @@ -108,7 +108,7 @@ Slot 0 contains a backend storage header that identifies the contents as ERST and also facilitates efficient access to the records. Depending upon the size of the backend storage, additional slots will be designated to be a part of the slot 0 header. For example, at 8KiB, -the slot 0 header can accomodate 1021 records. Thus a storage size +the slot 0 header can accommodate 1021 records. Thus a storage size of 8MiB (8KiB * 1024) requires an additional slot for use by the header. In this scenario, slot 0 and slot 1 form the backend storage header, and records can be stored starting at slot 2. @@ -196,5 +196,5 @@ References [2] "Unified Extensible Firmware Interface Specification", version 2.1, October 2008. -[3] "Windows Hardware Error Architecture", specfically +[3] "Windows Hardware Error Architecture", specifically "Error Record Persistence Mechanism". diff --git a/docs/system/devices/canokey.rst b/docs/system/devices/canokey.rst index c2c58ae3e7c..cfa6186e483 100644 --- a/docs/system/devices/canokey.rst +++ b/docs/system/devices/canokey.rst @@ -28,9 +28,9 @@ With the same software configuration as a hardware key, the guest OS can use all the functionalities of a secure key as if there was actually an hardware key plugged in. -CanoKey QEMU provides much convenience for debuging: +CanoKey QEMU provides much convenience for debugging: -* libcanokey-qemu supports debuging output thus developers can +* libcanokey-qemu supports debugging output thus developers can inspect what happens inside a secure key * CanoKey QEMU supports trace event thus event * QEMU USB stack supports pcap thus USB packet between the guest @@ -102,8 +102,8 @@ and find CanoKey QEMU there: You may setup the key as guided in [6]_. The console for the key is at [7]_. -Debuging -======== +Debugging +========= CanoKey QEMU consists of two parts, ``libcanokey-qemu.so`` and ``canokey.c``, the latter of which resides in QEMU. The former provides core functionality diff --git a/docs/system/devices/cxl.rst b/docs/system/devices/cxl.rst index 36031325cca..f25783a4ecf 100644 --- a/docs/system/devices/cxl.rst +++ b/docs/system/devices/cxl.rst @@ -83,7 +83,7 @@ CXL Fixed Memory Windows (CFMW) A CFMW consists of a particular range of Host Physical Address space which is routed to particular CXL Host Bridges. At time of generic software initialization it will have a particularly interleaving -configuration and associated Quality of Serice Throtling Group (QTG). +configuration and associated Quality of Service Throttling Group (QTG). This information is available to system software, when making decisions about how to configure interleave across available CXL memory devices. It is provide as CFMW Structures (CFMWS) in @@ -98,7 +98,7 @@ specification defined register interface called CXL Host Bridge Component Registers (CHBCR). The location of this CHBCR MMIO space is described to system software via a CXL Host Bridge Structure (CHBS) in the CEDT ACPI table. The actual interfaces -are identical to those used for other parts of the CXL heirarchy +are identical to those used for other parts of the CXL hierarchy as CXL Component Registers in PCI BARs. Interfaces provided include: @@ -143,7 +143,7 @@ CXL Memory Devices - Type 3 ~~~~~~~~~~~~~~~~~~~~~~~~~~~ CXL type 3 devices use a PCI class code and are intended to be supported by a generic operating system driver. They have HDM decoders -though in these EP devices, the decoder is reponsible not for +though in these EP devices, the decoder is responsible not for routing but for translation of the incoming host physical address (HPA) into a Device Physical Address (DPA). @@ -209,7 +209,7 @@ Notes: ranges of the system physical address map. Each CFMW has particular interleave setup across the CXL Host Bridges (HB) CFMW0 provides uninterleaved access to HB0, CFW2 provides - uninterleaved acess to HB1. CFW1 provides interleaved memory access + uninterleaved access to HB1. CFW1 provides interleaved memory access across HB0 and HB1. (2) **Two CXL Host Bridges**. Each of these has 2 CXL Root Ports and @@ -282,7 +282,7 @@ Example topology involving a switch:: --------------------------------------------------- | Switch 0 USP as PCI 0d:00.0 | | USP has HDM decoder which direct traffic to | - | appropiate downstream port | + | appropriate downstream port | | Switch BUS appears as 0e | |x__________________________________________________| | | | | @@ -366,7 +366,7 @@ An example of 4 devices below a switch suitable for 1, 2 or 4 way interleave:: Kernel Configuration Options ---------------------------- -In Linux 5.18 the followings options are necessary to make use of +In Linux 5.18 the following options are necessary to make use of OS management of CXL memory devices as described here. * CONFIG_CXL_BUS From patchwork Fri Aug 12 11:45:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 596809 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:b345:0:0:0:0 with SMTP id w5csp1500383maz; Fri, 12 Aug 2022 04:58:01 -0700 (PDT) X-Google-Smtp-Source: AA6agR7QIlcvNDqmikW5YuzqQ2bVYryHQY8ZYc4QdzmuCOv8cnAglzy+h9wX/N126ngInH78qKaZ X-Received: by 2002:a05:622a:613:b0:342:f81f:4f7e with SMTP id z19-20020a05622a061300b00342f81f4f7emr3012508qta.198.1660305481790; Fri, 12 Aug 2022 04:58:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660305481; cv=none; d=google.com; s=arc-20160816; b=z9UScX0A31oguaKvsIbOSjeAS8JtAZvm4r7N/5YC5rhhoBOySLaApGlKlCK5iAdC6L +OV5kVOucFGDvYScaFQ9HwdsGKG1I3BILJpu+T9mlj1jyIuxEtpkia3og0kkmySK7tYZ K3um5aEKABAeRtlJmys93FhJiX2l1K1+j5C7s2RNWm5WSbOspEvNP0Ye0LQsoXxPzSs2 dNKqcAGIIqfgVnYx6gvTX8rh9sEchscJOTwYzDWLEGmHsJVvYIw8IZSwn39oVTkjZ15H PAfZ2pbAvFAnxpK87ehJT+4m+SgjPrD8scbksH8bA48T0o1BjUDoOM/Fq6FFuYfLp8B8 Lynw== 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:to:from :dkim-signature; bh=hx6m0atusoWvzRNWFznpkTkf4+f5YmcU6tdYnA1e2kg=; b=Zla3yE/545tsRbmMmrpVDMhcTs0l43QG7sL9wOyTa8VevxfpvJgy/nOoL7WOLLtWZq 727X6Trm+1RAaHeGB3bgEyfMDU+io6x5rf+uKTsOCGBtcc6zCUMh6b1//Xnlw8ZytuvA mrmaaZ0WY0Cf49oBXHk/gtiFyVKLGFj6BZA1wvEEkcSGczd5osR9lh2d3hZ3GpiUniM2 8IK3uLOabo3D7buz+v+C4orvXvqWkTZiImftRlGSs8ShF0RmO9oyD0vTnkAC2CyTApEG KeQ2CFA6OWRe6INBSsNwEnQRoZB8XgOfT9jJJ8110k7q1eDxTGDSLDuAB2YlgXrXuOdI agZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YaYiAJys; 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 d19-20020a05620a141300b006b8d3f137casi939094qkj.478.2022.08.12.04.58.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 12 Aug 2022 04:58:01 -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=YaYiAJys; 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]:42432 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oMTIf-0004QQ-68 for patch@linaro.org; Fri, 12 Aug 2022 07:58:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35610) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oMT6d-0000N9-GX for qemu-devel@nongnu.org; Fri, 12 Aug 2022 07:45:40 -0400 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]:33611) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oMT6b-0002PE-VW for qemu-devel@nongnu.org; Fri, 12 Aug 2022 07:45:35 -0400 Received: by mail-wm1-x32d.google.com with SMTP id a18-20020a05600c349200b003a30de68697so3744027wmq.0 for ; Fri, 12 Aug 2022 04:45:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc; bh=hx6m0atusoWvzRNWFznpkTkf4+f5YmcU6tdYnA1e2kg=; b=YaYiAJysx/aIbyKBivNUJQYnMNZhIYobX9mhLZIybIx0HUnr9TQYi52iI/ElJO+hDI 6eqktvGCpEUhOdsDQa6jJxAAlzrHbUGL9cfejnZC//L+5e7BiQGaQ//R4OPDLmT9VEhq yxsGt1ugkWmqAc7MT1I69KV7C7vkviFqpoO2mt7Un0W5oC0QkTc4kd+9y/F5hv5HwsWV ejUBlPPXePdvlw+TLyqFCMmeW0Z8wU3h6SuZOdgElKqKBCsJ3zXgVGyifbu5S/FkV5N0 yKdHx0BZT7TJBz/rt54yaRN1ygMbLbKB4BkCUHXL0v63ffTYD6IUAs+j8eEv0FqIZ0UJ A3MQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc; bh=hx6m0atusoWvzRNWFznpkTkf4+f5YmcU6tdYnA1e2kg=; b=FlPAAqOt70tY92GRtfv4jV7mdhkvPypHgN5IZ86v1gaUhBmSTc8Mka3+PXXVZIPp+7 pa+z+d1xud+zrmfDutKmjLt318q2AQpKlUVKKG31rkRGNavKa1nETo1Ge6HxnGUQvoz6 ELOEe02MiuG4pfsbsy8jeUGFiOTLjyjD47nbJSpREFbjbhR2dGdFiEeWBAhvyKE6LWYa R1q4mNQfb3WWoObJltpvsg/vTXF2CLM2fbK2TV98CSHpZd+f+DGwZxXnFTciNxi6VFfL Mio7zkjPIc3+gHplASnphDiu1BFThZTphUnjWCMf8eQYbo6EpRatD4OtPmSDEmMBN5y+ i8wA== X-Gm-Message-State: ACgBeo1O0XbXwvXxrf5XyS4lhDBnyYKQdEBlEyvvl0W4yj9LhZHnfaKF tTmxCpYgO0biMXZpAI0P4+lywCzxHW0uZQ== X-Received: by 2002:a05:600c:3d11:b0:3a5:cd9b:eb08 with SMTP id bh17-20020a05600c3d1100b003a5cd9beb08mr1593320wmb.82.1660304732707; Fri, 12 Aug 2022 04:45:32 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id n8-20020a05600c3b8800b003a5418245b9sm11257797wms.19.2022.08.12.04.45.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Aug 2022 04:45:32 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 3/5] tests/unit: fix a -Wformat-truncation warning Date: Fri, 12 Aug 2022 12:45:25 +0100 Message-Id: <20220812114527.1336370-4-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220812114527.1336370-1-peter.maydell@linaro.org> References: <20220812114527.1336370-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x32d.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, T_SCC_BODY_TEXT_LINE=-0.01 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" From: Marc-André Lureau ../tests/test-qobject-input-visitor.c: In function ‘test_visitor_in_list’: ../tests/test-qobject-input-visitor.c:454:49: warning: ‘%d’ directive output may be truncated writing between 1 and 10 bytes into a region of size 6 [-Wformat-truncation=] 454 | snprintf(string, sizeof(string), "string%d", i); | ^~ ../tests/test-qobject-input-visitor.c:454:42: note: directive argument in the range [0, 2147483606] 454 | snprintf(string, sizeof(string), "string%d", i); | ^~~~~~~~~~ ../tests/test-qobject-input-visitor.c:454:9: note: ‘snprintf’ output between 8 and 17 bytes into a destination of size 12 454 | snprintf(string, sizeof(string), "string%d", i); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Rather than trying to be clever, since this is called 3 times during tests, let's simply use g_strdup_printf(). Signed-off-by: Marc-André Lureau Reviewed-by: Markus Armbruster Message-id: 20220810121513.1356081-1-marcandre.lureau@redhat.com Reviewed-by: Peter Maydell [PMM: fixed commit message typos] Signed-off-by: Peter Maydell --- tests/unit/test-qobject-input-visitor.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/unit/test-qobject-input-visitor.c b/tests/unit/test-qobject-input-visitor.c index 14329dabcfe..5f614afdbf1 100644 --- a/tests/unit/test-qobject-input-visitor.c +++ b/tests/unit/test-qobject-input-visitor.c @@ -447,9 +447,8 @@ static void test_visitor_in_list(TestInputVisitorData *data, g_assert(head != NULL); for (i = 0, item = head; item; item = item->next, i++) { - char string[12]; + g_autofree char *string = g_strdup_printf("string%d", i); - snprintf(string, sizeof(string), "string%d", i); g_assert_cmpstr(item->value->string, ==, string); g_assert_cmpint(item->value->integer, ==, 42 + i); } From patchwork Fri Aug 12 11:45:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 596804 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:b345:0:0:0:0 with SMTP id w5csp1495811maz; Fri, 12 Aug 2022 04:49:34 -0700 (PDT) X-Google-Smtp-Source: AA6agR6d8LUN3UqIX//W0zgK6fyLKaLC4ACpv61OGHYr12L9X/N9TnrIRtb9/22GIFJsy7L9UAPX X-Received: by 2002:a05:6214:2b09:b0:477:519:696d with SMTP id jx9-20020a0562142b0900b004770519696dmr2769662qvb.127.1660304974562; Fri, 12 Aug 2022 04:49:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660304974; cv=none; d=google.com; s=arc-20160816; b=LtWiLV8/Rt5Yo5deKiQO5k/xLspb5uM31VrFOa30CabbDCwC7fjrPeFCtZFiXTX3P6 1VXmWtl6x1WDhX+T7O+UdxdtLFizRzbr4vFbxDEpWhadV4kyiFl6lDq+P66btwbN7XDZ 5bAHiS4oD6S54goHXmyVIhXnoY7NmYYJTgDX2ykauXCNz2wNGTkt7GLDr5P/21IcTDkl 8ZvDEIeLBo1orIR3Il76NmkDX1ogh2hoFNUOqY0yj3rcYIx90IDRFmP231mg/go1eqJV B7MDgrRPS8JAfxbwxiRJBWcG++SuOolS3LiywOBqyJJ7iNqo972K7JVirO/7vSBbymvg OVgQ== 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:to:from :dkim-signature; bh=Ce+a9h2NdhVEtI5y5oWvwzc5i/EiA02fVrOU8Twutdg=; b=bjmnCF2chKniuwUC3nXdWisn9qj2+bW9shgI99t0cz29lUkr9MdNweDjVs/W0F/+MI vNgebpvKLw9EZGigDeJF4aUnR6PQjKWlot++OhWsv6YCyOhN9bI0WAxpMCGK5BesMzai CQqfEgxzxC+RpuCUC4qLY+cwfyluIdreJQTnDtyP5bNP5545SWIiHlyBNWwByI5g4zo/ m4HtCGemJlzek7ugUssGzjyP/AZJ4vipg0Psx1+v5qUq2Z3Chyi8bZ1pLVkcQgNYOQKv EP96RzCUbZg2Em3+KWU8dZMaoBAPHFwuwFR3tXRQ07YYtpKqOsCUeVYi8GUiPyzy/bWP oY7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="sIO8QMx/"; 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 l12-20020ac8458c000000b00343719d1d3fsi1118678qtn.655.2022.08.12.04.49.34 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 12 Aug 2022 04:49:34 -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="sIO8QMx/"; 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]:52990 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oMTAT-0000Ss-VQ for patch@linaro.org; Fri, 12 Aug 2022 07:49:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35636) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oMT6e-0000ND-RH for qemu-devel@nongnu.org; Fri, 12 Aug 2022 07:45:40 -0400 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]:41754) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oMT6d-0002PT-3J for qemu-devel@nongnu.org; Fri, 12 Aug 2022 07:45:36 -0400 Received: by mail-wm1-x32b.google.com with SMTP id az6-20020a05600c600600b003a530cebbe3so434612wmb.0 for ; Fri, 12 Aug 2022 04:45:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc; bh=Ce+a9h2NdhVEtI5y5oWvwzc5i/EiA02fVrOU8Twutdg=; b=sIO8QMx/VkbIxT5PXGC23PKhsjbavkbcWKMCaGffVa0gcNPYNvZdSTyVTqnQj1pRp5 omN2OCXFOAZ8u2EmEy2GVkFo6HG525KwidnTa72Kl7/JFFJhhP6hYpGr4PSgVwPqqqak XDUlfV7XTJyuusPcbj4W09gr2JYDPQ1jeIka2PUjH3VogDu6KCR26hOLkqXRyVtkwrmt lSpB3ZlliZrkpdlaJ4FHvBrvRSanrdyUeFBTT9mlLbHZy2Rn5B8gvq3VTtG/5v5wnC5W B5C+DUN2gOZlhEeixnnm72HSrHe5Ux/gLE44SQIypTgi5RsjyR4+REpeqO/TK45ZDPE9 6l8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc; bh=Ce+a9h2NdhVEtI5y5oWvwzc5i/EiA02fVrOU8Twutdg=; b=SFZ/su0rOK1z8HD7U404+APUvdsvUAonx6FjQXi051PM6hKkkhzpI1nNnF0qYTQ4CL ErbpkKnfXGy85ZDmqrWvZw+L2U9a42/Ex8EMnVoQW7QIEUxvryaJYGKZKyM+Ebkwo39R kytR4FvOhM2iE4AThEdDiFT4/V6701XXDtUPBHKKtkxledL4Tm7AGpYzMBFiTsXakKhA sym8vJ/PC/JU9Mir/aXhoAIOduj+rhdRj85Tg1xPBp2EXxdyhkgosIFeqvz6rSOtPPXb s5BF8X99i5UmGWF0zYmwo5Ku/p78zrtqe8hx5uBjNCH845qdh80nxpQ5zYQy+fzsZgJb yyww== X-Gm-Message-State: ACgBeo1/rAnO27CZlGqG+nHT+OUvlDX2vRl8d2oZhpPmIM15TauIBOPP BurOVfanijW/y5pLWhPZ9dP6ANf9biUWpA== X-Received: by 2002:a05:600c:4ec9:b0:3a5:a567:137f with SMTP id g9-20020a05600c4ec900b003a5a567137fmr8728228wmq.46.1660304733742; Fri, 12 Aug 2022 04:45:33 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id n8-20020a05600c3b8800b003a5418245b9sm11257797wms.19.2022.08.12.04.45.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Aug 2022 04:45:33 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 4/5] hw/arm/virt-acpi-build: Present the GICR structure properly for GICv4 Date: Fri, 12 Aug 2022 12:45:26 +0100 Message-Id: <20220812114527.1336370-5-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220812114527.1336370-1-peter.maydell@linaro.org> References: <20220812114527.1336370-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x32b.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, T_SCC_BODY_TEXT_LINE=-0.01 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" From: Zenghui Yu With the introduction of the new TCG GICv4, build_madt() is badly broken as we do not present any GIC Redistributor structure in MADT for GICv4 guests, so that they have no idea about where the Redistributor register frames are. This fixes a Linux guest crash at boot time with ACPI enabled and '-machine gic-version=4'. While at it, let's convert the remaining hard coded gic_version into enumeration VIRT_GIC_VERSION_2 for consistency. Signed-off-by: Zenghui Yu Message-id: 20220812022018.1069-1-yuzenghui@huawei.com Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- hw/arm/virt-acpi-build.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c index 449fab00805..9b3aee01bf8 100644 --- a/hw/arm/virt-acpi-build.c +++ b/hw/arm/virt-acpi-build.c @@ -732,7 +732,7 @@ build_madt(GArray *table_data, BIOSLinker *linker, VirtMachineState *vms) uint32_t pmu_interrupt = arm_feature(&armcpu->env, ARM_FEATURE_PMU) ? PPI(VIRTUAL_PMU_IRQ) : 0; - if (vms->gic_version == 2) { + if (vms->gic_version == VIRT_GIC_VERSION_2) { physical_base_address = memmap[VIRT_GIC_CPU].base; gicv = memmap[VIRT_GIC_VCPU].base; gich = memmap[VIRT_GIC_HYP].base; @@ -762,7 +762,7 @@ build_madt(GArray *table_data, BIOSLinker *linker, VirtMachineState *vms) build_append_int_noprefix(table_data, armcpu->mp_affinity, 8); } - if (vms->gic_version == 3) { + if (vms->gic_version != VIRT_GIC_VERSION_2) { build_append_gicr(table_data, memmap[VIRT_GIC_REDIST].base, memmap[VIRT_GIC_REDIST].size); if (virt_gicv3_redist_region_count(vms) == 2) { From patchwork Fri Aug 12 11:45:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 596807 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:b345:0:0:0:0 with SMTP id w5csp1498578maz; Fri, 12 Aug 2022 04:54:36 -0700 (PDT) X-Google-Smtp-Source: AA6agR5fJHqYFmqfeC8XYI0A14PMYUtapnwBX2/ClBgT0T7eRxFFwhSLoJZ+dpW78JWEB6OJP3qb X-Received: by 2002:ad4:5743:0:b0:47b:3676:f31b with SMTP id q3-20020ad45743000000b0047b3676f31bmr2823703qvx.29.1660305276371; Fri, 12 Aug 2022 04:54:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660305276; cv=none; d=google.com; s=arc-20160816; b=nfNo5D16FMsRSTh1r9rjZ9j91Pj9Trm1tWDxCbzZ1AcqDSH16a6GEi3r1NWjlVqiKK iZYJkeRMxKQXiH3+Z2CaUp5apTP298bZtJW0eW/lYApmVSP0UURjNhbr6RJfIgvCQfhW qlOhHssYbomAKrp6qUDcSJPHdoq3evWNqC44rJdE62pOyNZm5tPPKtcoI7BlSjfPYfCt jHx4gwdFbR2QBof0xik56/+3QO3BbB+bfNutbqOkG6mc3tODihdvIUFNOz/+gSUYvogy vxpxq4toxZAOO0+2UCYPG1vESdFOIC2ilFAIiCVJ4wcAbrMHVfFq9MEF8QgqXxbUfAHu eBLg== 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:to:from :dkim-signature; bh=KmqiERqNZgSUdjGvKdTtZjsQUeVX3Ph3gCx7pWaoXiU=; b=GbjS2EsjSEjzh3gKTiSUXC3tH0d6Lr4cJSHM+BmjRE0PrVZiBsFlWFxsvTS+Jl9osM IIQdAnFK2mk6b0euG6K4qMctQUJxpjqkuw7spdgrgPRFi71ez20/o4u6T14vs56zB/nh u/DoVd+JQ2OqNCiMGRWrCZ098SxExzM6RPEatrKXI9IRMCjZVzoxS1f3r1cJzwmo3aRk O4SsroJiLnDS6Z87juhgBxusYpQiKXS+Jwel5B4a6nwcMiktNlXuBjplyu8CM1Dq8N5m JqkqPi2mEuAjUVUuWi8yi3snAD5mPIE7mDu7aYYKejCht76jB7max4vthYjBr7iIkqEu lf+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eJHVakWr; 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 s16-20020a05620a255000b006b92bf9b324si1024249qko.673.2022.08.12.04.54.36 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 12 Aug 2022 04:54: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=eJHVakWr; 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]:33400 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oMTFL-0006fM-U2 for patch@linaro.org; Fri, 12 Aug 2022 07:54:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35638) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oMT6f-0000NG-FF for qemu-devel@nongnu.org; Fri, 12 Aug 2022 07:45:40 -0400 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]:52922) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oMT6d-0002PX-Tx for qemu-devel@nongnu.org; Fri, 12 Aug 2022 07:45:37 -0400 Received: by mail-wm1-x329.google.com with SMTP id k17so477010wmr.2 for ; Fri, 12 Aug 2022 04:45:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc; bh=KmqiERqNZgSUdjGvKdTtZjsQUeVX3Ph3gCx7pWaoXiU=; b=eJHVakWrsLu0wgL7jJ+3Ypp1nmzBHk59XxPfw8lYftYxER1OVTUBIB6+GforoppGPp gk91f9Zp8mQqU5k3R7q1tVXxdKyNjmLIus/Oxz/FjEd0AInfK6ccQyooJht1gGZJ8+tj 7ngfCJnV05iuHItuF2ULLoU2efyrrvwZTdzopKtauEOhtEZG1ZuW4vz6wP1Be05DHC/x 0MM7HdcX70YGPfv7y5YbgaXrRFlwuH0ti26a5VKgXr2G5C5FOcH7S/uWDxjbuIIqxyPe +hoc7JXuRBOreT4aMoFn6xVl7bRa8EpO0WF6DYbhHlGMKAz4inHHie4KqK+3nvyeBUBt lbZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc; bh=KmqiERqNZgSUdjGvKdTtZjsQUeVX3Ph3gCx7pWaoXiU=; b=pbI1CWmsYyDMjwg9jSjVlPFNYvoTsCvx8YL0+myoLXgH/KfbAQo+0Wm2uyRDctY6I8 GN3mqp3VzqVDDRLftA62kofhksZgLE8SZKbOMLETN450Wal8WE6Ja9i4p4pKnVXLTI2W /E1jNnL5Jc79gT+Gzr3YKQSCEA9evmJZq7zC7WiXB9cCaxI84elLMG3ImH/lybaoZsVT DE/xBvrD0i2A+m8h0aBehzbRfVETZr0rcQW38IiNxhjhHz5wFxRV6ezwS3WOmrSe8zlc /9GMst/zLfPmf9yJAYO0b5AudP7FD1mRXd/EaQBXuuIgjwPY5/eU0Vq9jFulrFNnaWyH aHOw== X-Gm-Message-State: ACgBeo0Eln5CPrsZgw6TEeHzaqf4PzLWGXw9YebSELg0UYhqrW4A23xx P48bgmw9nM+RU5l17YM6sBrKL3CkXSZsQg== X-Received: by 2002:a05:600c:4196:b0:3a5:3da4:ef78 with SMTP id p22-20020a05600c419600b003a53da4ef78mr2402340wmh.156.1660304734472; Fri, 12 Aug 2022 04:45:34 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id n8-20020a05600c3b8800b003a5418245b9sm11257797wms.19.2022.08.12.04.45.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Aug 2022 04:45:34 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 5/5] cutils: Add missing dyld(3) include on macOS Date: Fri, 12 Aug 2022 12:45:27 +0100 Message-Id: <20220812114527.1336370-6-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220812114527.1336370-1-peter.maydell@linaro.org> References: <20220812114527.1336370-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x329.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, T_SCC_BODY_TEXT_LINE=-0.01 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" From: Philippe Mathieu-Daudé Commit 06680b15b4 moved qemu_*_exec_dir() to cutils but forgot to move the macOS dyld(3) include, resulting in the following error (when building with Homebrew GCC on macOS Monterey 12.4): [313/1197] Compiling C object libqemuutil.a.p/util_cutils.c.o FAILED: libqemuutil.a.p/util_cutils.c.o ../../util/cutils.c:1039:13: error: implicit declaration of function '_NSGetExecutablePath' [-Werror=implicit-function-declaration] 1039 | if (_NSGetExecutablePath(fpath, &len) == 0) { | ^~~~~~~~~~~~~~~~~~~~ ../../util/cutils.c:1039:13: error: nested extern declaration of '_NSGetExecutablePath' [-Werror=nested-externs] Fix by moving the include line to cutils. Fixes: 06680b15b4 ("include: move qemu_*_exec_dir() to cutils") Signed-off-by: Philippe Mathieu-Daudé Message-id: 20220809222046.30812-1-f4bug@amsat.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- util/cutils.c | 4 ++++ util/oslib-posix.c | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/util/cutils.c b/util/cutils.c index cb43dda213c..def9c746ced 100644 --- a/util/cutils.c +++ b/util/cutils.c @@ -39,6 +39,10 @@ #include #endif +#ifdef __APPLE__ +#include +#endif + #ifdef G_OS_WIN32 #include #include diff --git a/util/oslib-posix.c b/util/oslib-posix.c index bffec18869e..d55af69c112 100644 --- a/util/oslib-posix.c +++ b/util/oslib-posix.c @@ -58,10 +58,6 @@ #include #endif -#ifdef __APPLE__ -#include -#endif - #include "qemu/mmap-alloc.h" #ifdef CONFIG_DEBUG_STACK_USAGE