From patchwork Mon Aug 19 22:50:57 2024 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: 13769138 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 42F11C3DA4A for ; Mon, 19 Aug 2024 22:52:20 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sgBDm-000070-W1; Mon, 19 Aug 2024 18:51: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 1sgBDj-0008RA-AO for qemu-devel@nongnu.org; Mon, 19 Aug 2024 18:51:27 -0400 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sgBDh-0000fR-6J for qemu-devel@nongnu.org; Mon, 19 Aug 2024 18:51:27 -0400 Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-371b97cfd6fso1223856f8f.2 for ; Mon, 19 Aug 2024 15:51:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1724107883; x=1724712683; darn=nongnu.org; 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=cABVR/iwvRF5rjxi/ggX4bv+0ymSrfIpGmDDKhz/Kik=; b=EAWeAZZ1IMQElqhd4yvAmBIiFi7JDc942OxCNFeXwBYrbnKE1zeib37XdU913+ttfn YH9/yyKtAHwpr8SjPPbLcTtGPbd3VFA/jx7EtiLmRv7SLQw/3EX34kai42gZVcF5D8um KN/VH3K+6r7wd1Rnxl0iqsfDnYJqriEoQl6EhArcTGS770mehipF4JaH0aDneafe3I6U 3xkVL7diVMwjET0Opiv5yyJNTdS3iuiom1dvBHjQXDGgDvb7ObtlOLVUDMYtXWmVScPA KJv5/91l7KVfNuXYMf0erPvUFVC1fkII8LfdtFK4+rR7vxh4eG+2kAeJH3Uf+3EY8FCb nFaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724107883; x=1724712683; 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=cABVR/iwvRF5rjxi/ggX4bv+0ymSrfIpGmDDKhz/Kik=; b=naXPoD0QBqhnMIAlYPgB33NOXTBKEKz9Csf4Yg51PuHRMptPVEJmO32EYhz41p0cmL 3tOArfqN9EjJhYAET4RVcy89CPZS8JldyPwr2paQyCjlac+uaKywkQbkM6QGGrpQrtSv zvtoD7Q3mIALCv/pFIZeVvwBCPQmhhld1GXpM3PbtPJMGzdi3N4WIG0uEU1Jo2EqT2ZN qwr0VIPt0ECG9DFnN/+RXgShiSQdC4XF09DhMrJzX+mYAuFMGfUZdqQisYoRypJXT4c0 VEapXCTX380XnCZ6KefgJ2dSJCGAgDXcMN+knkCKA00NPKubaJ4Sb67IrI9O7n09oFk2 8vTA== X-Gm-Message-State: AOJu0Yz7Q79saETOc4/r8tfbL4Kb2pYYStZYPu/JD4v1UXhUt8lF5Afs mfn0EKd++Fz1dV3WBzmihpon2KE6PGX7mJ30zJBIUwblPxOmbmBldXuNyJ5jV6LO8m/gAoOrKkR CVis= X-Google-Smtp-Source: AGHT+IEV5+eF3IBsD8EaWcdJ5RVlrubTMeVYcJoCyzCKWIiCsaOqVO6wBNWzGDsc8MFKMBVEHlBvwA== X-Received: by 2002:a5d:4bc2:0:b0:368:4e4f:cec5 with SMTP id ffacd0b85a97d-37194673878mr7725191f8f.35.1724107883091; Mon, 19 Aug 2024 15:51:23 -0700 (PDT) Received: from localhost.localdomain (88-178-97-237.subs.proxad.net. [88.178.97.237]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37189896a9csm11586898f8f.79.2024.08.19.15.51.22 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 19 Aug 2024 15:51:22 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Jiaxun Yang , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= Subject: [PULL 01/20] hw/mips/loongson3_virt: Store core_iocsr into LoongsonMachineState Date: Tue, 20 Aug 2024 00:50:57 +0200 Message-ID: <20240819225116.17928-2-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240819225116.17928-1-philmd@linaro.org> References: <20240819225116.17928-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=philmd@linaro.org; helo=mail-wr1-x42f.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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org From: Jiaxun Yang Link: https://lore.kernel.org/qemu-devel/972034d6-23b3-415a-b401-b8bc1cc515c9@linaro.org/ Suggested-by: Philippe Mathieu-Daudé Signed-off-by: Jiaxun Yang Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240621-loongson3-ipi-follow-v2-1-848eafcbb67e@flygoat.com> Signed-off-by: Philippe Mathieu-Daudé --- hw/mips/loongson3_virt.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/mips/loongson3_virt.c b/hw/mips/loongson3_virt.c index 408e3d7054..27a85e3614 100644 --- a/hw/mips/loongson3_virt.c +++ b/hw/mips/loongson3_virt.c @@ -97,6 +97,7 @@ struct LoongsonMachineState { MemoryRegion *pio_alias; MemoryRegion *mmio_alias; MemoryRegion *ecam_alias; + MemoryRegion *core_iocsr[LOONGSON_MAX_VCPUS]; }; typedef struct LoongsonMachineState LoongsonMachineState; @@ -493,6 +494,7 @@ static void mips_loongson3_virt_init(MachineState *machine) const char *kernel_filename = machine->kernel_filename; const char *initrd_filename = machine->initrd_filename; ram_addr_t ram_size = machine->ram_size; + LoongsonMachineState *s = LOONGSON_MACHINE(machine); MemoryRegion *address_space_mem = get_system_memory(); MemoryRegion *ram = g_new(MemoryRegion, 1); MemoryRegion *bios = g_new(MemoryRegion, 1); @@ -586,6 +588,7 @@ static void mips_loongson3_virt_init(MachineState *machine) iocsr, 0, UINT32_MAX); memory_region_add_subregion(&MIPS_CPU(cpu)->env.iocsr.mr, 0, core_iocsr); + s->core_iocsr[i] = core_iocsr; } if (node > 0) { From patchwork Mon Aug 19 22:50:58 2024 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: 13769137 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 17C31C3DA4A for ; Mon, 19 Aug 2024 22:52:15 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sgBDq-0000IU-CC; Mon, 19 Aug 2024 18:51: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 1sgBDn-0000Ap-KP for qemu-devel@nongnu.org; Mon, 19 Aug 2024 18:51:31 -0400 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sgBDl-0000fx-RB for qemu-devel@nongnu.org; Mon, 19 Aug 2024 18:51:31 -0400 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-42819654737so37531655e9.1 for ; Mon, 19 Aug 2024 15:51:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1724107888; x=1724712688; darn=nongnu.org; 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=wXvH5zTUg5dAcDnGKaZdfrZjdGQ55VlC72RabvGbTBU=; b=hYkphleQqaKitRHcdH+7hxl3x/XQytVH/Rb2tNWoGAOi/8KG00EsW/V0EUtiWdHZX0 j2pQjCuriAxQgLm8sKcBqT8cBq7zLdRpfPjM1mV577UPd62P6Ur7hY4jmfKqV8lxwQz0 etktUwGf/nD3RFDsB3+xBLhK6a3XHssXMNWKfdQtyc+S/SuqggvkUWYQ5JZV5j8yh9Tm gGh599hO21enp22FvcYvcE/mVLD0D49JuInP2OZnLXehoI5I+SCcELhGVd6qq/RNgPvJ eWGJbNee2L5HL4LOWtXJJUkQAHJ9MSAOJSroPChx6Vqyd45/DkcPyMaxFJ+PliRuWq7W Ni8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724107888; x=1724712688; 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=wXvH5zTUg5dAcDnGKaZdfrZjdGQ55VlC72RabvGbTBU=; b=aaEGWqq5X9pszdtnGW4fRFQ85+uQ8zno4zJfNH2oIIbKGslJVpH9WRDiG7xkbfvOc4 PpHkApaVWfaNqNc+kwfMMuNcUbISy9wqYXxl3Fzv66iTm6nq7S8LqV4JkHkF/6RC7Dka VkhIHV0PN/FfjLPKasb0awjiQHw5Mlajr+VGIvJGh3yZXFCWM4qbm9Z18UG5XtLqDMUX qT2w4qTFzzDsEVIEN19qkI4pZKiM6yII4vWV/GPxzUN1pO+0WiQz1l5fwyzjh/pKruaR OjqyvGOxPt0OOZPwIoULH49rD8aLTYOyJypcy2Uw1C/xzBMqd733nLy6yCqktmwT72tS WfQw== X-Gm-Message-State: AOJu0YwrOPYaE7Nkb7OsD9VAOd2ci9YR+46I+C++75ONtUEP1tlyI7Og pw308env7iGZ2+PWmHqWB3wm4MQ2OsFIFErQFMUpfF6bbDxMhGjOXJhxdEMMfGxinGygZ/gzmvC fLU4= X-Google-Smtp-Source: AGHT+IGGNiGIQkR1rIQ7wD85FGuvaB3dypQJelSJ6WeeYiMj902uQCAF5TN1Q1bDLoMJpIbTLndSWg== X-Received: by 2002:a05:600c:5494:b0:426:6edf:6597 with SMTP id 5b1f17b1804b1-429ed7b8c11mr75319395e9.19.1724107887915; Mon, 19 Aug 2024 15:51:27 -0700 (PDT) Received: from localhost.localdomain (88-178-97-237.subs.proxad.net. [88.178.97.237]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-429ded17cb3sm175578825e9.10.2024.08.19.15.51.26 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 19 Aug 2024 15:51:27 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Jiaxun Yang , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= Subject: [PULL 02/20] hw/mips/loongson3_virt: Fix condition of IPI IOCSR connection Date: Tue, 20 Aug 2024 00:50:58 +0200 Message-ID: <20240819225116.17928-3-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240819225116.17928-1-philmd@linaro.org> References: <20240819225116.17928-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=philmd@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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org From: Jiaxun Yang >>> CID 1547264: Null pointer dereferences (REVERSE_INULL) >>> Null-checking "ipi" suggests that it may be null, but it has already been dereferenced on all paths leading to the check. Resolves: Coverity CID 1547264 Link: https://lore.kernel.org/qemu-devel/752417ad-ab72-4fed-8d1f-af41f15bc225@app.fastmail.com/ Signed-off-by: Jiaxun Yang Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240621-loongson3-ipi-follow-v2-2-848eafcbb67e@flygoat.com> Signed-off-by: Philippe Mathieu-Daudé --- hw/mips/loongson3_virt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/mips/loongson3_virt.c b/hw/mips/loongson3_virt.c index 27a85e3614..2067b4fecb 100644 --- a/hw/mips/loongson3_virt.c +++ b/hw/mips/loongson3_virt.c @@ -574,7 +574,7 @@ static void mips_loongson3_virt_init(MachineState *machine) cpu_mips_clock_init(cpu); qemu_register_reset(main_cpu_reset, cpu); - if (ipi) { + if (!kvm_enabled()) { hwaddr base = ((hwaddr)node << 44) + virt_memmap[VIRT_IPI].base; base += core * 0x100; qdev_connect_gpio_out(ipi, i, cpu->env.irq[6]); From patchwork Mon Aug 19 22:50:59 2024 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: 13769139 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 663A1C52D7C for ; Mon, 19 Aug 2024 22:52:20 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sgBEJ-0000ea-L7; Mon, 19 Aug 2024 18:52:05 -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 1sgBDs-0000Nd-PC for qemu-devel@nongnu.org; Mon, 19 Aug 2024 18:51:42 -0400 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sgBDr-0000gB-5n for qemu-devel@nongnu.org; Mon, 19 Aug 2024 18:51:36 -0400 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-429ec9f2155so32782695e9.2 for ; Mon, 19 Aug 2024 15:51:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1724107893; x=1724712693; darn=nongnu.org; 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=0RulEK3DCbnU7Owbw/MuovKDsIIhP6Bac4B97hBNqIY=; b=uoPHcZkma58+QDNF7uhIFH3gksh2ujuOrevBUB7QiHy7UZnVub/izUobHeNl4NxXRZ b6twkSUgfDxziOUyxbApgEZ0Up6LOmSu7tO305/KUKaL4w/nLTdqaHBnv9ZYxhP5ZYpc 0B0fIUopMHsY54U2aI1NS6YTG2M1M51AbgIunyhkHSa8FT50lCkxygpGOd+tRBrXTdSZ +sJ2ruHRMygf0GRNJl+H75s90N9LzYn0sWMoOWE/oKxFxF+ZbAdgcgfucNYykxQFLKUA J2DF2LGl4pQ9RDHkVM0RoKXX7I+DkCpg7RidGx8ngmDIkz4xYkjr/Retw6dKucYzymFe /taA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724107893; x=1724712693; 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=0RulEK3DCbnU7Owbw/MuovKDsIIhP6Bac4B97hBNqIY=; b=Uo1iGAuDcxbzilcn/ef/bDvn2G/h4vBV3XfTGpAKmf8xLMx8QpPlp/+8+Xl/arCYTv oxqlPwS5IZYJEqU0aG2LIlIbdcY2ejfhMk3p+hMt/aMddmOdE9b7rjDNKTrDJgYH3TNi Tdv55HnhcAUR7xs8+aMHmUiAYjx/qXQb6zupdb67Wb+vh5ZxxagNu6JEzGuHqk4QG0eG wNS/rzLj1Kn0BbcHT2F2DoXiW/yBAvF3Ld+feDJy3zZTGsRWNq6xzPlFBnPWJl0nHCqX BtokqBLXafzsyw3x0LVdhbBk9d/PcYobi1t/THl6Fqd4MtNI+LH9br4WtnnVmE6gGEpY JvfA== X-Gm-Message-State: AOJu0Yx3pXb4QojvUR+D2Wta8EkgAfbtwfaHKsrMBEjpU8Yf4XIO6PjF W5c8NP2S/+411aDV976KiBtyIfrFPRPjWG3oglss0r0lkj5MPgmBwy2PkX8+xrqThVips6prTZU aWZk= X-Google-Smtp-Source: AGHT+IE8u2/Wy/h0QQmUJBU7uXeX3BNqiFYqg2ugvjEo9hv8lxpdlXIEp4jZRS4D8MUDebMgvcxN0A== X-Received: by 2002:a05:600c:5029:b0:426:59fc:cdec with SMTP id 5b1f17b1804b1-429ed7af8f1mr96536805e9.21.1724107893073; Mon, 19 Aug 2024 15:51:33 -0700 (PDT) Received: from localhost.localdomain (88-178-97-237.subs.proxad.net. [88.178.97.237]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-429ed7945cesm122571805e9.40.2024.08.19.15.51.31 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 19 Aug 2024 15:51:32 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Heinrich Schuchardt , Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 03/20] qemu-options.hx: correct formatting -smbios type=4 Date: Tue, 20 Aug 2024 00:50:59 +0200 Message-ID: <20240819225116.17928-4-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240819225116.17928-1-philmd@linaro.org> References: <20240819225116.17928-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=philmd@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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org From: Heinrich Schuchardt processor-family and processor-id can be assigned independently. Add missing brackets. Fixes: b5831d79671c ("smbios: add processor-family option") Signed-off-by: Heinrich Schuchardt Reviewed-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240729204816.11905-1-heinrich.schuchardt@canonical.com> Signed-off-by: Philippe Mathieu-Daudé --- qemu-options.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu-options.hx b/qemu-options.hx index cee0da2014..d99084a5ee 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -2704,7 +2704,7 @@ DEF("smbios", HAS_ARG, QEMU_OPTION_smbios, " specify SMBIOS type 3 fields\n" "-smbios type=4[,sock_pfx=str][,manufacturer=str][,version=str][,serial=str]\n" " [,asset=str][,part=str][,max-speed=%d][,current-speed=%d]\n" - " [,processor-family=%d,processor-id=%d]\n" + " [,processor-family=%d][,processor-id=%d]\n" " specify SMBIOS type 4 fields\n" "-smbios type=8[,external_reference=str][,internal_reference=str][,connector_type=%d][,port_type=%d]\n" " specify SMBIOS type 8 fields\n" From patchwork Mon Aug 19 22:51:00 2024 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: 13769140 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 01C88C52D7C for ; Mon, 19 Aug 2024 22:52:56 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sgBEx-0001pS-4r; Mon, 19 Aug 2024 18:52:44 -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 1sgBE0-0000Sv-Se for qemu-devel@nongnu.org; Mon, 19 Aug 2024 18:51:47 -0400 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sgBDx-0000gP-MF for qemu-devel@nongnu.org; Mon, 19 Aug 2024 18:51:43 -0400 Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-37182eee02dso2551176f8f.1 for ; Mon, 19 Aug 2024 15:51:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1724107898; x=1724712698; darn=nongnu.org; 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=i7OiajvUnedKpMidKrs6amtZmafu3g3RvoaYWNpbOxM=; b=ytpHSYRW+xglkcWV22WOLrlTASBcRUqjsdkYxqkBJAhYlGRj7moZx4O/mQRHMwv0KD M2UKbde9TfKh3XeidvtoTcwbQnAqmTlgftQ+4M/c+QCjXcemn0KzdxJb1/m6xcYcbgiV ezki/Nk6uqMz+tirc9qjCL3hMcxk1kSJNrbS4HFGYnyntYK91UDozRW96xilw7WFNcCI K16Trk2E7Xb7l6shqK9OFA1OK079bwV2ogprvUXo+DUuuuN9ecW+9lDMXKkDshNsXscy Z62aiB8tn0I4ZD+MgJ8b13UArYVzLFn2WB76ROY9ihiNvPRFp5wTZEOSOYXPuLVBUL0l GcPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724107898; x=1724712698; 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=i7OiajvUnedKpMidKrs6amtZmafu3g3RvoaYWNpbOxM=; b=PwMDpZJCz387qPlvT/+vUTSfLjO2LzF95WeLLD0ZzZUD3+FK9jzUUSF+F+fCZCe6sS DFvTWHByC8e20UitkTX2wTqtsMJU9+GdnHcSKg/WHBr3tvuWgoIbPejq84/umm8f9GT/ uS4ECUjXIb9UqCXmIdquSDczdN7nWIqzGi4eEEgj5Os7vhoGjxu9IM7/Rt1n43YT6jiI 25hceNoLJm/az6eiPMFsyHsVN+9Ygm9y6iIVdkudBoiP2hN6+5EMRTbhJzFb3623nfd6 5BC1VcDv80eZefroH2nbv81l0Et+BaTUkHKogH1+aCvnFFaNpghfb1dGEdFCM5Z+haS+ bJuQ== X-Gm-Message-State: AOJu0YyyzdJiP4ezT2Gc6BBTz/W8ZyxwRfuhkCfdTZYdPa1/KZbBJ3eu oXn4pepEs5ZZqN11hsMNXoGlGSnzF2dyqGkD5o2gxUwBe+GIUXSWVUmz2R9dguvAvlj2F6e6M/V BIrI= X-Google-Smtp-Source: AGHT+IGJ/6BQN7EHB0Vjds3FAJVLjOJS3T5dkTnXgVuQZGUQm5fmFCzRlNOkWS7znc5i4oHJnZT+Gg== X-Received: by 2002:a5d:5144:0:b0:36b:ea2d:fd5a with SMTP id ffacd0b85a97d-371c4ab1d82mr487659f8f.22.1724107897592; Mon, 19 Aug 2024 15:51:37 -0700 (PDT) Received: from localhost.localdomain (88-178-97-237.subs.proxad.net. [88.178.97.237]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37189896bf0sm11537030f8f.73.2024.08.19.15.51.36 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 19 Aug 2024 15:51:37 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson Subject: [PULL 04/20] target/mips: Pass page table entry size as MemOp to get_pte() Date: Tue, 20 Aug 2024 00:51:00 +0200 Message-ID: <20240819225116.17928-5-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240819225116.17928-1-philmd@linaro.org> References: <20240819225116.17928-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=philmd@linaro.org; helo=mail-wr1-x42b.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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org In order to simplify the next commit, pass the PTE size as MemOp. Rename: native_shift -> native_op directory_shift -> directory_mop leaf_shift -> leaf_mop Suggested-by: Richard Henderson Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Message-ID: <20240814090452.2591-2-philmd@linaro.org> --- target/mips/tcg/sysemu/tlb_helper.c | 58 ++++++++++++++--------------- 1 file changed, 27 insertions(+), 31 deletions(-) diff --git a/target/mips/tcg/sysemu/tlb_helper.c b/target/mips/tcg/sysemu/tlb_helper.c index 3ba6d369a6..60147ba0af 100644 --- a/target/mips/tcg/sysemu/tlb_helper.c +++ b/target/mips/tcg/sysemu/tlb_helper.c @@ -592,13 +592,13 @@ static void raise_mmu_exception(CPUMIPSState *env, target_ulong address, * resulting in a TLB or XTLB Refill exception. */ -static bool get_pte(CPUMIPSState *env, uint64_t vaddr, int entry_size, +static bool get_pte(CPUMIPSState *env, uint64_t vaddr, MemOp op, uint64_t *pte) { - if ((vaddr & ((entry_size >> 3) - 1)) != 0) { + if ((vaddr & (memop_size(op) - 1)) != 0) { return false; } - if (entry_size == 64) { + if (op == MO_64) { *pte = cpu_ldq_code(env, vaddr); } else { *pte = cpu_ldl_code(env, vaddr); @@ -607,8 +607,9 @@ static bool get_pte(CPUMIPSState *env, uint64_t vaddr, int entry_size, } static uint64_t get_tlb_entry_layout(CPUMIPSState *env, uint64_t entry, - int entry_size, int ptei) + MemOp op, int ptei) { + unsigned entry_size = memop_size(op) << 3; uint64_t result = entry; uint64_t rixi; if (ptei > entry_size) { @@ -624,14 +625,12 @@ static uint64_t get_tlb_entry_layout(CPUMIPSState *env, uint64_t entry, static int walk_directory(CPUMIPSState *env, uint64_t *vaddr, int directory_index, bool *huge_page, bool *hgpg_directory_hit, uint64_t *pw_entrylo0, uint64_t *pw_entrylo1, - unsigned directory_shift, unsigned leaf_shift, int ptw_mmu_idx) + MemOp directory_mop, MemOp leaf_mop, int ptw_mmu_idx) { int dph = (env->CP0_PWCtl >> CP0PC_DPH) & 0x1; int psn = (env->CP0_PWCtl >> CP0PC_PSN) & 0x3F; int hugepg = (env->CP0_PWCtl >> CP0PC_HUGEPG) & 0x1; int pf_ptew = (env->CP0_PWField >> CP0PF_PTEW) & 0x3F; - uint32_t direntry_size = 1 << (directory_shift + 3); - uint32_t leafentry_size = 1 << (leaf_shift + 3); uint64_t entry; uint64_t paddr; int prot; @@ -643,14 +642,14 @@ static int walk_directory(CPUMIPSState *env, uint64_t *vaddr, /* wrong base address */ return 0; } - if (!get_pte(env, *vaddr, direntry_size, &entry)) { + if (!get_pte(env, *vaddr, directory_mop, &entry)) { return 0; } if ((entry & (1 << psn)) && hugepg) { *huge_page = true; *hgpg_directory_hit = true; - entry = get_tlb_entry_layout(env, entry, leafentry_size, pf_ptew); + entry = get_tlb_entry_layout(env, entry, leaf_mop, pf_ptew); w = directory_index - 1; if (directory_index & 0x1) { /* Generate adjacent page from same PTE for odd TLB page */ @@ -658,7 +657,7 @@ static int walk_directory(CPUMIPSState *env, uint64_t *vaddr, *pw_entrylo0 = entry & ~lsb; /* even page */ *pw_entrylo1 = entry | lsb; /* odd page */ } else if (dph) { - int oddpagebit = 1 << leaf_shift; + int oddpagebit = 1 << leaf_mop; uint64_t vaddr2 = *vaddr ^ oddpagebit; if (*vaddr & oddpagebit) { *pw_entrylo1 = entry; @@ -669,10 +668,10 @@ static int walk_directory(CPUMIPSState *env, uint64_t *vaddr, ptw_mmu_idx) != TLBRET_MATCH) { return 0; } - if (!get_pte(env, vaddr2, leafentry_size, &entry)) { + if (!get_pte(env, vaddr2, leaf_mop, &entry)) { return 0; } - entry = get_tlb_entry_layout(env, entry, leafentry_size, pf_ptew); + entry = get_tlb_entry_layout(env, entry, leaf_mop, pf_ptew); if (*vaddr & oddpagebit) { *pw_entrylo0 = entry; } else { @@ -711,7 +710,7 @@ static bool page_table_walk_refill(CPUMIPSState *env, vaddr address, /* Native pointer size */ /*For the 32-bit architectures, this bit is fixed to 0.*/ - int native_shift = (((env->CP0_PWSize >> CP0PS_PS) & 1) == 0) ? 2 : 3; + MemOp native_op = (((env->CP0_PWSize >> CP0PS_PS) & 1) == 0) ? MO_32 : MO_64; /* Indices from PWField */ int pf_gdw = (env->CP0_PWField >> CP0PF_GDW) & 0x3F; @@ -728,11 +727,10 @@ static bool page_table_walk_refill(CPUMIPSState *env, vaddr address, /* Other HTW configs */ int hugepg = (env->CP0_PWCtl >> CP0PC_HUGEPG) & 0x1; - unsigned directory_shift, leaf_shift; + MemOp directory_mop, leaf_mop; /* Offsets into tables */ unsigned goffset, uoffset, moffset, ptoffset0, ptoffset1; - uint32_t leafentry_size; /* Starting address - Page Table Base */ uint64_t vaddr = env->CP0_PWBase; @@ -759,23 +757,21 @@ static bool page_table_walk_refill(CPUMIPSState *env, vaddr address, } /* HTW Shift values (depend on entry size) */ - directory_shift = (hugepg && (ptew == 1)) ? native_shift + 1 : native_shift; - leaf_shift = (ptew == 1) ? native_shift + 1 : native_shift; + directory_mop = (hugepg && (ptew == 1)) ? native_op + 1 : native_op; + leaf_mop = (ptew == 1) ? native_op + 1 : native_op; - goffset = gindex << directory_shift; - uoffset = uindex << directory_shift; - moffset = mindex << directory_shift; - ptoffset0 = (ptindex >> 1) << (leaf_shift + 1); - ptoffset1 = ptoffset0 | (1 << (leaf_shift)); - - leafentry_size = 1 << (leaf_shift + 3); + goffset = gindex << directory_mop; + uoffset = uindex << directory_mop; + moffset = mindex << directory_mop; + ptoffset0 = (ptindex >> 1) << (leaf_mop + 1); + ptoffset1 = ptoffset0 | (1 << (leaf_mop)); /* Global Directory */ if (gdw > 0) { vaddr |= goffset; switch (walk_directory(env, &vaddr, pf_gdw, &huge_page, &hgpg_gdhit, &pw_entrylo0, &pw_entrylo1, - directory_shift, leaf_shift, ptw_mmu_idx)) + directory_mop, leaf_mop, ptw_mmu_idx)) { case 0: return false; @@ -792,7 +788,7 @@ static bool page_table_walk_refill(CPUMIPSState *env, vaddr address, vaddr |= uoffset; switch (walk_directory(env, &vaddr, pf_udw, &huge_page, &hgpg_udhit, &pw_entrylo0, &pw_entrylo1, - directory_shift, leaf_shift, ptw_mmu_idx)) + directory_mop, leaf_mop, ptw_mmu_idx)) { case 0: return false; @@ -809,7 +805,7 @@ static bool page_table_walk_refill(CPUMIPSState *env, vaddr address, vaddr |= moffset; switch (walk_directory(env, &vaddr, pf_mdw, &huge_page, &hgpg_mdhit, &pw_entrylo0, &pw_entrylo1, - directory_shift, leaf_shift, ptw_mmu_idx)) + directory_mop, leaf_mop, ptw_mmu_idx)) { case 0: return false; @@ -827,10 +823,10 @@ static bool page_table_walk_refill(CPUMIPSState *env, vaddr address, ptw_mmu_idx) != TLBRET_MATCH) { return false; } - if (!get_pte(env, vaddr, leafentry_size, &dir_entry)) { + if (!get_pte(env, vaddr, leaf_mop, &dir_entry)) { return false; } - dir_entry = get_tlb_entry_layout(env, dir_entry, leafentry_size, pf_ptew); + dir_entry = get_tlb_entry_layout(env, dir_entry, leaf_mop, pf_ptew); pw_entrylo0 = dir_entry; /* Leaf Level Page Table - Second half of PTE pair */ @@ -839,10 +835,10 @@ static bool page_table_walk_refill(CPUMIPSState *env, vaddr address, ptw_mmu_idx) != TLBRET_MATCH) { return false; } - if (!get_pte(env, vaddr, leafentry_size, &dir_entry)) { + if (!get_pte(env, vaddr, leaf_mop, &dir_entry)) { return false; } - dir_entry = get_tlb_entry_layout(env, dir_entry, leafentry_size, pf_ptew); + dir_entry = get_tlb_entry_layout(env, dir_entry, leaf_mop, pf_ptew); pw_entrylo1 = dir_entry; refill: From patchwork Mon Aug 19 22:51:01 2024 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: 13769154 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1C616C52D7C for ; Mon, 19 Aug 2024 22:55:43 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sgBF7-0002Ox-Dt; Mon, 19 Aug 2024 18:52:55 -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 1sgBE2-0000T2-FS for qemu-devel@nongnu.org; Mon, 19 Aug 2024 18:51:49 -0400 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sgBE0-0000gV-LF for qemu-devel@nongnu.org; Mon, 19 Aug 2024 18:51:46 -0400 Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-37182eee02dso2551230f8f.1 for ; Mon, 19 Aug 2024 15:51:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1724107902; x=1724712702; darn=nongnu.org; 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=nd77jbfvrLILzXcHedj2gSAGQaYl7M6K1uhrf65ne10=; b=URbGPzgX/DJiRLTIYSW46iqzl+KtpGiXlJXGkLKmmErHWJBWm8jqUrDT1p0uSVa2VD NnhC+BPFuV14sAJF/BYbvhewCYwc8EY3oh7oluVPIvQ+M9Ka00ssmiN++Z2V4mhLk/R+ 7iei8FR6jDSTHkSCvHuXDQy28yPIkIaXd8iuGQXXx2JdrOJkJbb9rlaf8b8h9DKRHqbn q04+Dig69KtNJNoct8ye3XVKnHCjFdWWF/NH6V640A/wOtIP093xeK0qX+rWeWaOKffa bTqiaB7bQtSLsI5IQvttnYFrEAn8RFPiDFZbSe3Vt9nCuWz1lvYBdwcraPDgnyEOQJFo ZXjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724107902; x=1724712702; 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=nd77jbfvrLILzXcHedj2gSAGQaYl7M6K1uhrf65ne10=; b=kW3iCoSkbo2/2eB7hcnMk8fOrDVhQAjgSR7lRyym9XjkpHlzTnbg8dsCZ5Ne0g71jc nrcwJq+sLgutvGQJhvYS7maFU+QFqMZmhApf8IEeIVRT9lH7kktEtPyUdlS/Fy3FPdJ4 sDtE9g5pMyZN+79WMBlrK2z1zhmVc153Ywjv1HB2KmMUgJCoFMCDCikkeVH7MxKoC7PL rW95g8Nbxmy8w6z3gRQGnTkyn3tJ0eMNjYRcPtyp01yO/pvPVsImtR8QmgYaB7l30YBk sGtxiwAlvfoo7NhMafmi23YoUxBO/p6ugEIC/4OdsLlVM//4dARlFl0LHGpynxzN7AiL BWJg== X-Gm-Message-State: AOJu0YySaKmawEzka+ls467WLzOA6qsox+1oJOqwdcZZTBjt86n1kd4n DUjNYyc/sUdaVKq+Rf52PsakJUu6GPUHOcvN9X8vi4kX3xeoN/TQb0xLEZjWP7pwyXhWjMz+nup AQYg= X-Google-Smtp-Source: AGHT+IGor8W9PkmhMbF5zZLQUdhb/zhmNCVLIQn5x0Sk5Z7uxD1NHUgZ3RU5K+SjSU5Or0U+qLRImQ== X-Received: by 2002:a5d:5e04:0:b0:366:dfc4:3790 with SMTP id ffacd0b85a97d-371c4a63393mr463587f8f.0.1724107902137; Mon, 19 Aug 2024 15:51:42 -0700 (PDT) Received: from localhost.localdomain (88-178-97-237.subs.proxad.net. [88.178.97.237]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3718983a38csm11705599f8f.6.2024.08.19.15.51.41 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 19 Aug 2024 15:51:41 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Thomas Petazzoni , Waldemar Brodkorb , Richard Henderson Subject: [PULL 05/20] target/mips: Use correct MMU index in get_pte() Date: Tue, 20 Aug 2024 00:51:01 +0200 Message-ID: <20240819225116.17928-6-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240819225116.17928-1-philmd@linaro.org> References: <20240819225116.17928-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=philmd@linaro.org; helo=mail-wr1-x42d.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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org When refactoring page_table_walk_refill() in commit 4e999bf419 we missed the indirect call to cpu_mmu_index() in get_pte(): page_table_walk_refill() -> get_pte() -> cpu_ld[lq]_code() -> cpu_mmu_index() Since we don't mask anymore the modes in hflags, cpu_mmu_index() can return UM or SM, while we only expect KM or ERL. Fix by propagating ptw_mmu_idx to get_pte(), and use the cpu_ld/st_code_mmu() API with the correct MemOpIdx. Reported-by: Thomas Petazzoni Reported-by: Waldemar Brodkorb Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2470 Fixes: 4e999bf419 ("target/mips: Pass ptw_mmu_idx down from mips_cpu_tlb_fill") Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-ID: <20240814090452.2591-3-philmd@linaro.org> --- target/mips/tcg/sysemu/tlb_helper.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/target/mips/tcg/sysemu/tlb_helper.c b/target/mips/tcg/sysemu/tlb_helper.c index 60147ba0af..0e94e00a5f 100644 --- a/target/mips/tcg/sysemu/tlb_helper.c +++ b/target/mips/tcg/sysemu/tlb_helper.c @@ -593,16 +593,21 @@ static void raise_mmu_exception(CPUMIPSState *env, target_ulong address, */ static bool get_pte(CPUMIPSState *env, uint64_t vaddr, MemOp op, - uint64_t *pte) + uint64_t *pte, unsigned ptw_mmu_idx) { + MemOpIdx oi; + if ((vaddr & (memop_size(op) - 1)) != 0) { return false; } + + oi = make_memop_idx(op | MO_TE, ptw_mmu_idx); if (op == MO_64) { - *pte = cpu_ldq_code(env, vaddr); + *pte = cpu_ldq_code_mmu(env, vaddr, oi, 0); } else { - *pte = cpu_ldl_code(env, vaddr); + *pte = cpu_ldl_code_mmu(env, vaddr, oi, 0); } + return true; } @@ -642,7 +647,7 @@ static int walk_directory(CPUMIPSState *env, uint64_t *vaddr, /* wrong base address */ return 0; } - if (!get_pte(env, *vaddr, directory_mop, &entry)) { + if (!get_pte(env, *vaddr, directory_mop, &entry, ptw_mmu_idx)) { return 0; } @@ -668,7 +673,7 @@ static int walk_directory(CPUMIPSState *env, uint64_t *vaddr, ptw_mmu_idx) != TLBRET_MATCH) { return 0; } - if (!get_pte(env, vaddr2, leaf_mop, &entry)) { + if (!get_pte(env, vaddr2, leaf_mop, &entry, ptw_mmu_idx)) { return 0; } entry = get_tlb_entry_layout(env, entry, leaf_mop, pf_ptew); @@ -823,7 +828,7 @@ static bool page_table_walk_refill(CPUMIPSState *env, vaddr address, ptw_mmu_idx) != TLBRET_MATCH) { return false; } - if (!get_pte(env, vaddr, leaf_mop, &dir_entry)) { + if (!get_pte(env, vaddr, leaf_mop, &dir_entry, ptw_mmu_idx)) { return false; } dir_entry = get_tlb_entry_layout(env, dir_entry, leaf_mop, pf_ptew); @@ -835,7 +840,7 @@ static bool page_table_walk_refill(CPUMIPSState *env, vaddr address, ptw_mmu_idx) != TLBRET_MATCH) { return false; } - if (!get_pte(env, vaddr, leaf_mop, &dir_entry)) { + if (!get_pte(env, vaddr, leaf_mop, &dir_entry, ptw_mmu_idx)) { return false; } dir_entry = get_tlb_entry_layout(env, dir_entry, leaf_mop, pf_ptew); From patchwork Mon Aug 19 22:51:02 2024 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: 13769141 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2A46BC3DA4A for ; Mon, 19 Aug 2024 22:53:53 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sgBFg-0004c0-Ed; Mon, 19 Aug 2024 18:53:28 -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 1sgBE7-0000X4-N1 for qemu-devel@nongnu.org; Mon, 19 Aug 2024 18:51:54 -0400 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sgBE5-0000gk-6d for qemu-devel@nongnu.org; Mon, 19 Aug 2024 18:51:50 -0400 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-4280b3a7efaso38042435e9.0 for ; Mon, 19 Aug 2024 15:51:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1724107907; x=1724712707; darn=nongnu.org; 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=Es9COWayATyZP7U12SucfNzKx1xwYMI0HkJSQW4xD1k=; b=m8STNsU3p9+JRGwnJx3GppyTYLlx0aaYXQcQGA9d+mLriJYej3mNZMwHUNeKfIw7g1 e8i2CkAgGfyccB8FftBvJ3riauS2mDka/VVJ2uE+3bDxBJIG5XidASx++DKZtrpDnDNQ je/R+xjR1tfgiJL2oUShtJyLDt5b14SN5FzH6bEVeqStn/+H4sPZ5Q/x52C+HAjMUbR1 jpTdsZMYnHSNEObFF4gYolSztBXBfNMHKNNNc9NH8+su4sEhBVyX2QOiPjXXW14Og6JJ rTZyVDy8U/n4CiWFMpnFl3Pk0qMa0+fJyfALACDa7vVV6XaPEt+chJ1yN7GodAu0sHo8 h0nA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724107907; x=1724712707; 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=Es9COWayATyZP7U12SucfNzKx1xwYMI0HkJSQW4xD1k=; b=HtKCTTDqbtvn4DMSVHMoxAYRrr9Ur4C11dOHiSJvoe3YCb2NAMC1ERIfmfEVMOOchN EeVhUFUQQ4WhX8W7SceVWVeQKAtqgAZstWxm9aST582ipCBI8wzVXcfRX+vZ7lp4N1E0 pgnyJDt88u2bPt/fQ6yRkk5f//9waGhg05wC1+DQBuOF76Qt2+m/dt33xdgu3OzNUtwm r7mdTRJ2Cbe1DUDLb534Mw+DSvA4iekSjA1kDFfSCzWiea8I4iNSrLkPmJaXsMWEuTKN opWYFtMTNZJhehfj+wHjq2rkY81N0o5vp0e4XhZ+u9CY4gIER2yaO4/r6PeZ2OneJPaM 2Syg== X-Gm-Message-State: AOJu0Yw4uDgruPKn9m36coUzszOFIk1rRWc1AvD2L2a/KrYShK/SBmyy 2qg3lktH8ILNT3sLvS8IM3GcifhEcPzxt02dkazfGzoB6L4vHAW+re6gpxgKDRxk7OjiaSevPdm r6pY= X-Google-Smtp-Source: AGHT+IGEuiw+9T9LqSLNqWovnBMjgvUFgPm/ifS0/aTdLcW7r64oYbCRfypl8KIrQUXYQExv7gcktQ== X-Received: by 2002:a05:600c:a45:b0:426:627e:37af with SMTP id 5b1f17b1804b1-429ed77d75amr74890135e9.3.1724107906636; Mon, 19 Aug 2024 15:51:46 -0700 (PDT) Received: from localhost.localdomain (88-178-97-237.subs.proxad.net. [88.178.97.237]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-429ed79be15sm122097625e9.48.2024.08.19.15.51.45 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 19 Aug 2024 15:51:46 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson Subject: [PULL 06/20] target/mips: Load PTE as DATA Date: Tue, 20 Aug 2024 00:51:02 +0200 Message-ID: <20240819225116.17928-7-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240819225116.17928-1-philmd@linaro.org> References: <20240819225116.17928-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=philmd@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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org PTE is not CODE so load it as normal DATA access. Fixes: 074cfcb4da ("Implement hardware page table walker for MIPS32") Suggested-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-ID: <20240814090452.2591-4-philmd@linaro.org> --- target/mips/tcg/sysemu/tlb_helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/mips/tcg/sysemu/tlb_helper.c b/target/mips/tcg/sysemu/tlb_helper.c index 0e94e00a5f..3836137750 100644 --- a/target/mips/tcg/sysemu/tlb_helper.c +++ b/target/mips/tcg/sysemu/tlb_helper.c @@ -603,9 +603,9 @@ static bool get_pte(CPUMIPSState *env, uint64_t vaddr, MemOp op, oi = make_memop_idx(op | MO_TE, ptw_mmu_idx); if (op == MO_64) { - *pte = cpu_ldq_code_mmu(env, vaddr, oi, 0); + *pte = cpu_ldq_mmu(env, vaddr, oi, 0); } else { - *pte = cpu_ldl_code_mmu(env, vaddr, oi, 0); + *pte = cpu_ldl_mmu(env, vaddr, oi, 0); } return true; From patchwork Mon Aug 19 22:51:03 2024 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: 13769142 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BEAB7C52D7C for ; Mon, 19 Aug 2024 22:53:57 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sgBEa-0000oK-Ml; Mon, 19 Aug 2024 18:52:22 -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 1sgBEB-0000Z8-3G for qemu-devel@nongnu.org; Mon, 19 Aug 2024 18:51:57 -0400 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sgBE9-0000hC-JH for qemu-devel@nongnu.org; Mon, 19 Aug 2024 18:51:54 -0400 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-42803bbf842so53102355e9.1 for ; Mon, 19 Aug 2024 15:51:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1724107911; x=1724712711; darn=nongnu.org; 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=fkmnMIiYe+27d0sNHWNILcAXDpFi/s5I0/diI446638=; b=sCYybkAExAFTgUSsJjYl8bw6c5CARMkMn45Lg5noMMOO0IkSraUe4WlM0qePXN2ZVt M8oIJvSP5eRo+9JdNnEWxKwGrMd/p0TcUtD65OaC/d15jhy+55QGoOp4SF/twNdS+Qq0 c8OcHYdDOy0NvWKbo0jkPU80EXPKAU/jZWcX+FDzrEFM3/OtzY87T0Tx2AFPA0Qyf69e tRhaIEdsaWPAi379BwOkjreP1aj8Y2Qne7+34EiKw0xmzf6x1/oPHHQ8ha8qKCLQzldE jtfbHfU7SVN2yvOUk2pUAPtnEGxsy+nuGYy1U4jVCkRhBV9tIxPE16Him56jYhkfsOpb kyeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724107911; x=1724712711; 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=fkmnMIiYe+27d0sNHWNILcAXDpFi/s5I0/diI446638=; b=qNVh/9jMERrcqKz49REKGWWtVVNO6GgAkHIhFWyXEeTpYxeBKoTjB6rL1VLAns3dIY qTikD0LOzlM2hQ6LRGxOygoFlfXcj6vWLSRuorNTwDOh7vB5K0dpyQCfLtCQjbp8zwMZ KM1krWBzXTK8K+l00O0y0/WyrtLdlkDdaGJyDaqe39kWQhlNLkZNBrwaPhPAYwn8ELtr +WgFocNznxqo7MnFuFw2+/3WFFt2gWerbfxQ++Pku7KoVGV5rc3Me/09tChI3DLgYc4R YXCeM4QEAbM92uxceeeb6oFiFfoeQRdwRpHh4JHIxCVytsR7QFnZOr5EVOLv7XxEmPIK L6Xg== X-Gm-Message-State: AOJu0YxaBe0HQNjQtBlCpzSkyDOSACjt/M4XRP+dkVIPu3GPkyj9MyvV j1vi79V/1McA0pM8DbclMwrxI0CtHeA0P9DnwqKCdHjEpu36KmFEQgG/sq+GCp6xyVV9Y//MrcN CXhs= X-Google-Smtp-Source: AGHT+IEWFQ1diX4iQPNwxuhhSfv9gv4sajZEOm9lJhZtI7t6aIpOjbgDL2wey6AKmNBKpdKicHNeFA== X-Received: by 2002:a05:600c:1549:b0:429:d43e:dbc3 with SMTP id 5b1f17b1804b1-429ed7ee077mr103606855e9.34.1724107911263; Mon, 19 Aug 2024 15:51:51 -0700 (PDT) Received: from localhost.localdomain (88-178-97-237.subs.proxad.net. [88.178.97.237]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3718985d9d6sm11572563f8f.64.2024.08.19.15.51.50 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 19 Aug 2024 15:51:50 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Peter Maydell , Richard Henderson , Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 07/20] hw/dma/xilinx_axidma: Use semicolon at end of statement, not comma Date: Tue, 20 Aug 2024 00:51:03 +0200 Message-ID: <20240819225116.17928-8-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240819225116.17928-1-philmd@linaro.org> References: <20240819225116.17928-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=philmd@linaro.org; helo=mail-wm1-x32e.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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org From: Peter Maydell In axidma_class_init() we accidentally used a comma at the end of a statement rather than a semicolon. This has no ill effects, but it's obviously not intended and it means that Coccinelle scripts for instance will fail to match on the two statements. Use a semicolon instead. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Reviewed-by: Thomas Huth Message-ID: <20240813165250.2717650-6-peter.maydell@linaro.org> Signed-off-by: Philippe Mathieu-Daudé --- hw/dma/xilinx_axidma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/dma/xilinx_axidma.c b/hw/dma/xilinx_axidma.c index c9cfc3169b..7707634253 100644 --- a/hw/dma/xilinx_axidma.c +++ b/hw/dma/xilinx_axidma.c @@ -626,7 +626,7 @@ static void axidma_class_init(ObjectClass *klass, void *data) { DeviceClass *dc = DEVICE_CLASS(klass); - dc->realize = xilinx_axidma_realize, + dc->realize = xilinx_axidma_realize; dc->reset = xilinx_axidma_reset; device_class_set_props(dc, axidma_properties); } From patchwork Mon Aug 19 22:51:04 2024 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: 13769147 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B0290C3DA4A for ; Mon, 19 Aug 2024 22:54:29 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sgBEz-00022x-EN; Mon, 19 Aug 2024 18:52:47 -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 1sgBEF-0000em-FD for qemu-devel@nongnu.org; Mon, 19 Aug 2024 18:52:01 -0400 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sgBED-0000im-RW for qemu-devel@nongnu.org; Mon, 19 Aug 2024 18:51:59 -0400 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-429e29933aaso36681315e9.0 for ; Mon, 19 Aug 2024 15:51:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1724107916; x=1724712716; darn=nongnu.org; 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=r9dq7opeWVZG3BtwY0r0XLR76Nuys55wAqLRnBp/jbM=; b=gfI7ZNmZYRuHprksljSI+Wz5RAIY1tuAU4cLs0RdH79qsOHfdW0ha3ar7div2HX8G1 ZQcjFxdg/l5eSh2IMz7pjlm7lzI/28BnXUA8E051Bge6cx1wA/t3fy1AIWakvoZt30D0 ni+SzjBsLdZ5VDpneOj57wcz0+4bVQYF8VYcgvcrfzZVKsNBhvMzCwELv3SPTCxIcT3q 43PAVsyJXjfHvYOZ405ZzhLwPoInAPAiVTeaMmvHongxhba9RYxvJ8yuTrTNEwOH8K3b nx1YgNzc7YOrg22Og8/G9MA66nXkmKOBxAcL3uYvYGNw9CKDh5nbcQgB8MEIe3lV/BWg 1I0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724107916; x=1724712716; 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=r9dq7opeWVZG3BtwY0r0XLR76Nuys55wAqLRnBp/jbM=; b=GCj6ogLiAvWncai7HCJRDQ+fkBV1Cbs7e34XXUzDRrpXVaeMWPgF23+ShlPg6B8s9W acYnbgZOrUoXoufXTvziL9snNTzv7cb7C4RS1nwX6mZRHj6Z1PjJH4wlWWcUA4J3txhh EJBnDj5q1Nxyqqo/bpcobOhGvNZ4a4CqLBMLUxj6+VIeNvCD9Xq6pfTrcR7ud2e9f87Z d5tH6w5VA6Y4QCADqwnq25B3YpwPsJuKN9bOUH+OziESalnVVCXlnalxR3t7z5uFQ502 K/pmoMk5VYL7be2TXxpBB1xdnveUcjfRVPsyWNkBc1q1gNe32xMbQItfjLg22jVPIaL/ +tvg== X-Gm-Message-State: AOJu0YyV27fAhQYHfT88KKfrku8Y/3Bxmu2WR7VhtbVUiALSzbRJC/+T Pszklr1a3Dqzw6S2zQKfpWZbChSHfs5wTkS/XUqPrKRPqU0pQ/jZEnlfcgb3tX9a6sIu9J7Gqzh Q4AY= X-Google-Smtp-Source: AGHT+IH3avEpLYouBO8BKbwI8iTPf+GWGZA41+Mzx3b0n30Arpea26YUrQ7BRhLJ0NgNpMs0cGe5kA== X-Received: by 2002:a05:600c:310f:b0:426:5b21:97fa with SMTP id 5b1f17b1804b1-429ed7e432cmr101753805e9.29.1724107915886; Mon, 19 Aug 2024 15:51:55 -0700 (PDT) Received: from localhost.localdomain (88-178-97-237.subs.proxad.net. [88.178.97.237]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-429ded1813dsm181831585e9.7.2024.08.19.15.51.55 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 19 Aug 2024 15:51:55 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Peter Maydell , Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= Subject: [PULL 08/20] hw/remote/message.c: Don't directly invoke DeviceClass:reset Date: Tue, 20 Aug 2024 00:51:04 +0200 Message-ID: <20240819225116.17928-9-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240819225116.17928-1-philmd@linaro.org> References: <20240819225116.17928-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=philmd@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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org From: Peter Maydell Directly invoking the DeviceClass::reset method is a bad idea, because if the device is using three-phase reset then it relies on transitional reset machinery which is likely to disappear at some point. Reset the device in the standard way, by calling device_cold_reset(). Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240813165250.2717650-7-peter.maydell@linaro.org> Signed-off-by: Philippe Mathieu-Daudé --- hw/remote/message.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/hw/remote/message.c b/hw/remote/message.c index 50f6bf2d49..38ae6c75b4 100644 --- a/hw/remote/message.c +++ b/hw/remote/message.c @@ -215,13 +215,10 @@ fail: static void process_device_reset_msg(QIOChannel *ioc, PCIDevice *dev, Error **errp) { - DeviceClass *dc = DEVICE_GET_CLASS(dev); DeviceState *s = DEVICE(dev); MPQemuMsg ret = { 0 }; - if (dc->reset) { - dc->reset(s); - } + device_cold_reset(s); ret.cmd = MPQEMU_CMD_RET; From patchwork Mon Aug 19 22:51:05 2024 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: 13769143 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CE7D9C52D7C for ; Mon, 19 Aug 2024 22:54:05 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sgBFP-0003g3-3t; Mon, 19 Aug 2024 18:53:11 -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 1sgBEK-0000ko-F7 for qemu-devel@nongnu.org; Mon, 19 Aug 2024 18:52:07 -0400 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sgBEI-0000jR-Sd for qemu-devel@nongnu.org; Mon, 19 Aug 2024 18:52:04 -0400 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-42817bee9e8so37480285e9.3 for ; Mon, 19 Aug 2024 15:52:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1724107920; x=1724712720; darn=nongnu.org; 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=/KeoVIja/7tKrspHJMKvsDmwZQwxRpxJr8dhRzojKqI=; b=MfLifjU2i555wbFMdf1MFblMU9IH48g34wEGdX2EzVjPjKNXvApoufP7FDTOzfY/oN TUeDK1Dm7IRQGh/OVMuyvbI0ITmABytCy4nCTTEZxE29H7pgN0aQFSmVJoivQQ1865MS L9TmMK/t7I2zi4MUqDxSZb7Kja5eb/2xUVsl/anFijHBWDMvXnX4vS8nZ0u6o2XoM6SB nzEk7Enr5vmnJ7sPPgXuDyBdSIg5JRARXv8B8HuLdKrxFHBDay8GXbN92kukyQxCXIWc wh6euSks82YjLK7MiM0aiQfXaMlEE2BOjoFYhw+Vzmq88ZmWm7g9/SIVHy1nGfemAWXB 5Adg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724107920; x=1724712720; 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=/KeoVIja/7tKrspHJMKvsDmwZQwxRpxJr8dhRzojKqI=; b=HgyPSqSRkCkjcXDMDrMkDraZxIofOEbXbZFWCBIXuNfTdl2pjKVDdzPK768CU/2MgZ xgAqTUCQuWwFIbyH+iG4pv94nJWimgB+U3ttBx3abntB3wmVzCnqBQTTJ+thrf2GHbPv EQy6CejQzV9Fob8zaDgNiD3S67F4qQy7isQ0fN9RMpa06lE8FTC1fCnqHr/wOaS5XTqB sUNbul+twhU8xgqeKkyUBb45bRtscEgcMZt91sBpBffmHmX0pgs4wwt6uWwT31BxUO0g iOqehSBHsZO/kksMhfNAUZjtzWzDBmtloe5YD80XcVg6f3g+Z28mVVbHvhR7HIYVubAN 56rA== X-Gm-Message-State: AOJu0Yz+lDeTMPcgDuz/jWzFW5PIK8/8KYNfs/h7zn+H17Nb5yPd01CX RZGRiKhrAzxoS3dXT7ZzfbloKQW/1NXOQyoSgm6uBDeR7wlk7LeH2ag6SqYUMSoY9m36v3529uA GrqU= X-Google-Smtp-Source: AGHT+IEEN29pAplJanjaz4jgjl2pcEqL13XSEHtlqMX2TMaK/f/PAzUwEtRBCOeFQTe0VBrK2vzdLw== X-Received: by 2002:adf:f707:0:b0:368:4c38:a669 with SMTP id ffacd0b85a97d-3719431e865mr7125144f8f.10.1724107920329; Mon, 19 Aug 2024 15:52:00 -0700 (PDT) Received: from localhost.localdomain (88-178-97-237.subs.proxad.net. [88.178.97.237]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-371898bb588sm11561680f8f.115.2024.08.19.15.51.59 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 19 Aug 2024 15:51:59 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson Subject: [PULL 09/20] linux-user/mips: Do not try to use removed R5900 CPU Date: Tue, 20 Aug 2024 00:51:05 +0200 Message-ID: <20240819225116.17928-10-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240819225116.17928-1-philmd@linaro.org> References: <20240819225116.17928-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=philmd@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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org R5900 emulation was removed in commit 823f2897bd. Remove it from ELF parsing in order to avoid: $ qemu-mipsn32 ./test5900 qemu-mipsn32: unable to find CPU model 'R5900' This reverts commit 4d9e5a0eb7df6e98ac6cf5e16029f35dd05b9537. Fixes: 823f2897bd ("target/mips: Disable R5900 support") Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20240814133928.6746-2-philmd@linaro.org> --- linux-user/mips/target_elf.h | 3 --- linux-user/mips64/target_elf.h | 3 --- 2 files changed, 6 deletions(-) diff --git a/linux-user/mips/target_elf.h b/linux-user/mips/target_elf.h index b965e86b2b..71a32315a8 100644 --- a/linux-user/mips/target_elf.h +++ b/linux-user/mips/target_elf.h @@ -12,9 +12,6 @@ static inline const char *cpu_get_model(uint32_t eflags) if ((eflags & EF_MIPS_ARCH) == EF_MIPS_ARCH_32R6) { return "mips32r6-generic"; } - if ((eflags & EF_MIPS_MACH) == EF_MIPS_MACH_5900) { - return "R5900"; - } if (eflags & EF_MIPS_NAN2008) { return "P5600"; } diff --git a/linux-user/mips64/target_elf.h b/linux-user/mips64/target_elf.h index 5f2f2df29f..ec55d8542a 100644 --- a/linux-user/mips64/target_elf.h +++ b/linux-user/mips64/target_elf.h @@ -12,9 +12,6 @@ static inline const char *cpu_get_model(uint32_t eflags) if ((eflags & EF_MIPS_ARCH) == EF_MIPS_ARCH_64R6) { return "I6400"; } - if ((eflags & EF_MIPS_MACH) == EF_MIPS_MACH_5900) { - return "R5900"; - } return "5KEf"; } #endif From patchwork Mon Aug 19 22:51:06 2024 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: 13769146 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 58169C52D7C for ; Mon, 19 Aug 2024 22:54:29 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sgBG3-0006OM-2R; Mon, 19 Aug 2024 18:53:51 -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 1sgBEP-0000pO-Oh for qemu-devel@nongnu.org; Mon, 19 Aug 2024 18:52:14 -0400 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sgBEN-0000jf-0s for qemu-devel@nongnu.org; Mon, 19 Aug 2024 18:52:09 -0400 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-4281faefea9so37930355e9.2 for ; Mon, 19 Aug 2024 15:52:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1724107925; x=1724712725; darn=nongnu.org; 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=EWWwpfQxRAAbj0joei2mdKLyEuAn6gjZiKaYfsPccaM=; b=At6IbjmEJ25Pv1TJEUlw3Sy/P4BWMFCMeXU3ttOV0T52VUm7GP6Fy/wo2qaK4JXebw yyZ6/7cQw7onkWvNdadNnJ8aW/ARtre07vIFR5t7JSnPMRfsG04DY5nN6Hrb2VxgqpIF 0PWfYYka5HvZAqn7eBEoz07/aGKCbnFAGFNs46IBN6Dx8A/aC3k8gTEhLTZu2G2GCzhs rcZrKmxu4Y78I4zxt2iv12t4+epXL6sygnXdQbPq7c95h8WJlP/yTued/atGtKYKhLT+ wM5pVaCAzZQ+XAMD3qCksgXyXjp4ajs1wBmU2DST+9oRpPQoH1d47sb6k9ngmdHzmDGW oIqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724107925; x=1724712725; 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=EWWwpfQxRAAbj0joei2mdKLyEuAn6gjZiKaYfsPccaM=; b=BlpwPHSjRGxsl09enGX3fYHehma1JGBMYrLRBD6802P/7wi63KcPKI0+T0eZPGEFiW o+mmBncQcVYtr6QG3Ne0FOjq1eM9v42mekwjV41LWqb34DfDJJyL270CVYs0Y2YAhPPS HRDCLyORFzZFurBpdMWi5xfzDUet/yo9M8h5AYAVGQtaBkIFr2vMTdWS3GHFkLq7hQZY JZepPettnvqVJmkk+DX30T1rZBLZg0j9Q1GeYykTuEkEm/BcEpNvsFTTx1m3uC/eyOcE 7sPROPt1OT0xv4KEx4nvJxgylyTasSm7VTKks2Cgh92v+Doad/zu91RQqNYOd4/F7Lge 6ncw== X-Gm-Message-State: AOJu0Yz0BtvCU0ifdzo2kLBMeyTajw/FK3aiTvAm0379CaUWhPcwcJIo 7blvELdtX6iO/1NAQRTUak2Ffem5U3DsfRpSpZn4wmytoyKFYaMN+25Nq0seNaKUDy03QsX+mBq uiOo= X-Google-Smtp-Source: AGHT+IFzDFbCIAxlgQLRx00KeagIgsITOuejAYij0/ID88tPUOz8tw6CuQSnEpwqqL3Y6fyrBoKCuw== X-Received: by 2002:a05:600c:30d2:b0:42a:b0a4:8828 with SMTP id 5b1f17b1804b1-42ab0a48880mr26857165e9.37.1724107924923; Mon, 19 Aug 2024 15:52:04 -0700 (PDT) Received: from localhost.localdomain (88-178-97-237.subs.proxad.net. [88.178.97.237]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-429ded180dcsm176905445e9.4.2024.08.19.15.52.04 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 19 Aug 2024 15:52:04 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?b?Sm9obmF0aGFuIEjhu691IFRyw60=?= , Richard Henderson Subject: [PULL 10/20] linux-user/mips: Select Octeon68XX CPU for Octeon binaries Date: Tue, 20 Aug 2024 00:51:06 +0200 Message-ID: <20240819225116.17928-11-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240819225116.17928-1-philmd@linaro.org> References: <20240819225116.17928-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=philmd@linaro.org; helo=mail-wm1-x333.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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org The Octeon68XX CPU is available since commit 9a6046a655 ("target/mips: introduce Cavium Octeon CPU model"). Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1722 Reported-by: Johnathan Hữu Trí Suggested-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20240814133928.6746-3-philmd@linaro.org> --- linux-user/mips64/target_elf.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/linux-user/mips64/target_elf.h b/linux-user/mips64/target_elf.h index ec55d8542a..ce6fb6541e 100644 --- a/linux-user/mips64/target_elf.h +++ b/linux-user/mips64/target_elf.h @@ -9,6 +9,14 @@ #define MIPS64_TARGET_ELF_H static inline const char *cpu_get_model(uint32_t eflags) { + switch (eflags & EF_MIPS_MACH) { + case EF_MIPS_MACH_OCTEON: + case EF_MIPS_MACH_OCTEON2: + case EF_MIPS_MACH_OCTEON3: + return "Octeon68XX"; + default: + break; + } if ((eflags & EF_MIPS_ARCH) == EF_MIPS_ARCH_64R6) { return "I6400"; } From patchwork Mon Aug 19 22:51:07 2024 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: 13769144 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C01D2C3DA4A for ; Mon, 19 Aug 2024 22:54:06 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sgBFw-0005Ly-3Z; Mon, 19 Aug 2024 18:53:49 -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 1sgBEa-00010C-QU for qemu-devel@nongnu.org; Mon, 19 Aug 2024 18:52:22 -0400 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sgBER-0000js-Je for qemu-devel@nongnu.org; Mon, 19 Aug 2024 18:52:20 -0400 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-42817bee9e8so37480995e9.3 for ; Mon, 19 Aug 2024 15:52:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1724107930; x=1724712730; darn=nongnu.org; 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=XgKEfpdnr3u1IGXLtsU83x2uUd6qWPUEdCyP1ZB8Zys=; b=l6V1S+N4+OlIlH46fA580k7re6wCpFSSmdoaaaV6CX8zz13svKfoPSsvlS4SJGVj8n ODk6mNETHGfexhPCL1Kf3AVPOBOdPDPlq/a3PWdtO27bk8v7/9PnbMJT299O9ro1B1Sq DILBdBy1lINSuQrRm5Y7G/53UJDk+JggbxRJ+3ooOI+zQfvqWWAOfrEjAPmHiqo0m1MK G4zKyoONN7iBP9URkIkWR1uG+rLmoZhyN9UEcJ3XTSpCyDbTtiSa8rVNcpYqtjzYRxCz JxmaXeg9AcsLTvw6hJ8I5sQtk+sDFM+KaEQzCEwMxgEXbzZq7gEJQD0s41g7+UIs2yLN 02ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724107930; x=1724712730; 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=XgKEfpdnr3u1IGXLtsU83x2uUd6qWPUEdCyP1ZB8Zys=; b=rWeKAL29JBaSbJjDc2dD7hEFW5/mKGa7pGxpHtTIE6FsFqGCluLp7RVqBibO+6EJjS RXi3JXyRk3aErOYXn2upGjRiPnRG8Wtgad2PrpCbC03WX6Fhkh6oC1WjMUb3HNZT73bh +qKe4Ydvgmp9fWGFOFeQmSf1/GLHxB//KRv7pWjk53ZyvWj6VcDtMK9X960SqNqFu+i1 OVKE2qUcTPoNty9NB5CIK+2VVBtPV3DdskVUasy6uiXElQlXUCHEtPPaewYZ/LwbfCpJ BpFqxoKe8oFnNJh1viAZE0+FX9m4XU525NWNhDBFWyfefltPmJI8kN/HhwnuWFp3tK1W nBDw== X-Gm-Message-State: AOJu0YxgqPcDrReP1PfJOxorcKKdm0hfSeniY/9iZTb5LAVD6k/mSDKd rbsHmfcBZq1fO35XCG9JJLwFt1+ndogpR+gh9G94HYK6ZVwMWLljjRQ7hxdFVWx4L/Fh8FXApsO Mqj8= X-Google-Smtp-Source: AGHT+IHO05bBYLBKnHwEwyBYs0v3AMbbgTHCiEVHRdk7MoRJIL53irnGQ7wxhyZUbz5td4hHz9dTFA== X-Received: by 2002:a7b:c4d3:0:b0:428:e820:37ae with SMTP id 5b1f17b1804b1-429ed785f4dmr82092565e9.1.1724107929919; Mon, 19 Aug 2024 15:52:09 -0700 (PDT) Received: from localhost.localdomain (88-178-97-237.subs.proxad.net. [88.178.97.237]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-429ed794640sm122901125e9.41.2024.08.19.15.52.08 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 19 Aug 2024 15:52:09 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , YunQiang Su , Jiaxun Yang , Richard Henderson Subject: [PULL 11/20] linux-user/mips: Select MIPS64R2-generic for Rel2 binaries Date: Tue, 20 Aug 2024 00:51:07 +0200 Message-ID: <20240819225116.17928-12-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240819225116.17928-1-philmd@linaro.org> References: <20240819225116.17928-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=philmd@linaro.org; helo=mail-wm1-x32e.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, 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Cc: YunQiang Su Reported-by: Jiaxun Yang Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20240814133928.6746-4-philmd@linaro.org> --- linux-user/mips64/target_elf.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/linux-user/mips64/target_elf.h b/linux-user/mips64/target_elf.h index ce6fb6541e..a3a8b2e385 100644 --- a/linux-user/mips64/target_elf.h +++ b/linux-user/mips64/target_elf.h @@ -17,8 +17,13 @@ static inline const char *cpu_get_model(uint32_t eflags) default: break; } - if ((eflags & EF_MIPS_ARCH) == EF_MIPS_ARCH_64R6) { + switch (eflags & EF_MIPS_ARCH) { + case EF_MIPS_ARCH_64R6: return "I6400"; + case EF_MIPS_ARCH_64R2: + return "MIPS64R2-generic"; + default: + break; } return "5KEf"; } From patchwork Mon Aug 19 22:51:08 2024 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: 13769145 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9EBE7C3DA4A for ; Mon, 19 Aug 2024 22:54:19 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sgBFV-0003y5-3X; Mon, 19 Aug 2024 18:53:20 -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 1sgBEY-0000wM-MR for qemu-devel@nongnu.org; Mon, 19 Aug 2024 18:52:22 -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 1sgBEW-0000k6-F3 for qemu-devel@nongnu.org; Mon, 19 Aug 2024 18:52:17 -0400 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-42819654737so37535685e9.1 for ; Mon, 19 Aug 2024 15:52:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1724107934; x=1724712734; darn=nongnu.org; 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=gH5ZVKOWkjk4IlT33UjiZBwifnlYiOD0/fyxwxSrNuk=; b=Vz9NUEdmngJJ7rRYp54QNUv49p7JmFrC0uYgt4bG/DxNmDYY1mMlYAFmqeAb8aqJLc Q4fxgzZnf0nh87ZxU9S3hRUDBKINw91flDUsP+ppl3apEBPXZrKE8R7SVTAKrToHyVmV gQnQou/dqAOVXE3E1wJpCODG03nukGClFwJjmxsMiACyEEM2CLNE+7hs8e/HRoQU8vRc yjByaJJrer0EWCxbJmP3LRev/XhaafLua8wkmGE1I6+6Ansk3FEj9jBOd0aoXY8TCKhK 3TyGBetRKKE1Xb0radJ3u/XpA7dIx4mb+RULPN3ZYBvpqlbD/fPBP8WzJxNEXWgDCwld hA5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724107934; x=1724712734; 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=gH5ZVKOWkjk4IlT33UjiZBwifnlYiOD0/fyxwxSrNuk=; b=MXU+SU6Q9EGzYckGim7UFwL8IlpQaP3odw8AMYlMcQ3sAx8SvDxSpFbWHL+H1oCL75 AkaPd6taGbf9tWP41sRvbEpI+wcbdYS8DL9ZixfMvx4oYgfLBV3vMjk4Nyi0XENyt4ZF ROro3oysfCTFwiwh+d3jlEgx0GgBeFaK5DBCF7yhQ1UtxDRd65RyBebUZgzq5p0dkYD6 r67ReYHzAGSi7XM64F4+bhRDqmHpRcGbkBjPt+zm0MdV4/I/xGLeBuoBYedeGIwxhpiB 8TwYwJVOk0cXpO5540uwXnoS/IPhrYYkDPJ8Kp2KBbaOLskLaM50ZvLZgQrGNa/Ixi2c Ca4g== X-Gm-Message-State: AOJu0Yy5MC5TgDDDBvIRG1QzWiSkBwuUdEPgtiGnqT5hCpSStiH1yssU NUDhqowktkmIZH9fxxa8vtWofIPJ0IHgINw/kOujrpvz9gokmqr27qBDg+8h4l+yQTq2HnovLQ8 SMhY= X-Google-Smtp-Source: AGHT+IGAgZ8Nebntb1v26tGrEE4MkMcJ25HwcDm3w8PL/mnReUCAK5Mo2gjFpzpkx+uscjVr+PElNQ== X-Received: by 2002:a7b:cc04:0:b0:42a:a6d2:3270 with SMTP id 5b1f17b1804b1-42aa6d23365mr69737375e9.21.1724107934480; Mon, 19 Aug 2024 15:52:14 -0700 (PDT) Received: from localhost.localdomain (88-178-97-237.subs.proxad.net. [88.178.97.237]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-429ed4a857bsm124559175e9.0.2024.08.19.15.52.13 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 19 Aug 2024 15:52:14 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson Subject: [PULL 12/20] linux-user/mips: Select Loongson CPU for Loongson binaries Date: Tue, 20 Aug 2024 00:51:08 +0200 Message-ID: <20240819225116.17928-13-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240819225116.17928-1-philmd@linaro.org> References: <20240819225116.17928-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, 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20240814133928.6746-5-philmd@linaro.org> --- linux-user/mips64/target_elf.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/linux-user/mips64/target_elf.h b/linux-user/mips64/target_elf.h index a3a8b2e385..502af9d278 100644 --- a/linux-user/mips64/target_elf.h +++ b/linux-user/mips64/target_elf.h @@ -14,6 +14,12 @@ static inline const char *cpu_get_model(uint32_t eflags) case EF_MIPS_MACH_OCTEON2: case EF_MIPS_MACH_OCTEON3: return "Octeon68XX"; + case EF_MIPS_MACH_LS2E: + return "Loongson-2E"; + case EF_MIPS_MACH_LS2F: + return "Loongson-2F"; + case EF_MIPS_MACH_LS3A: + return "Loongson-3A1000"; default: break; } From patchwork Mon Aug 19 22:51:09 2024 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: 13769148 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BB3D8C3DA4A for ; Mon, 19 Aug 2024 22:54:49 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sgBG7-00078d-Ko; Mon, 19 Aug 2024 18:53:55 -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 1sgBEd-00013p-0Q for qemu-devel@nongnu.org; Mon, 19 Aug 2024 18:52:25 -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 1sgBEb-0000kR-Ct for qemu-devel@nongnu.org; Mon, 19 Aug 2024 18:52:22 -0400 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-3718706cf8aso3057250f8f.3 for ; Mon, 19 Aug 2024 15:52:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1724107940; x=1724712740; darn=nongnu.org; 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=i525VHbDEEdaYNDK1SbTy9eAffjoVCoTHAg3yOkOeL4=; b=YCbxlXOcQw/1wfI80a4tUMlaW6O/Ls60Tspa/tcTA3iyMCyKIzdFGO27njlsjeM3Bs ouwNO03szdjhn1KD4eRxpWSxgmuYn5txOeziivBVJCzWRMaJDIvkO9cbIHy3fgTjtkgY xBUR+EuGzX8kJF/LOAaMUKFoRT35k/3H/iQHT+3qMfGveiw7pKmyMgNy7Rtq8kUDHkPy hcsBcH9cm/BT4XHFHsQHDhXy8w+DJVy55KsHxNl+UfwE8szbBjyfZ1XQfYDkiKnIxzE+ JsFjOeOBXHAaMaAXVtG0md3glm+R1lt3sj8Gu0txXrFcBAyrJJS+PnoPhCzFYlhzsFYu 2BIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724107940; x=1724712740; 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=i525VHbDEEdaYNDK1SbTy9eAffjoVCoTHAg3yOkOeL4=; b=oiSxYU42J+WwZHkkZ1NMKDqQeHvdn0p2U6qjr5f0muT/xQvaxh0GKsHlj3/owBKXM1 +CjQyBk+ZBDRxlr+ewKJxUtK7NMsBFAQO0YMywnV0nppzOhQp36gUb8BZG9raoNkVQmu BVbjzb74lWOn+VKc+n26JPEV+lNkV1UB6Wd5DNrIa2IsWsU2RdZDMVokxBBMo+Ugvz7w G3KJMevpqGWDrcJJbhMCLj0KqOrmf49Xc9uLtlm+68FZ8DWYAVftQJNEHSO+HhtepmQp W8sRLjlod5EhtOQ0U8z4AdXLrHlY+T0HgyfVcnvWHxo7pdZWY2VddnYZ2Ql3kn53EoJ5 elRw== X-Gm-Message-State: AOJu0YwEkmNQifVOtuswNAVhC15gyEFZOTfXCzETQ3YjLKH0r8xIJLzd UQFbIHYBfMliK4lAyzV0FpUFZcHnDAIVVKNz78xYayoPeBDyUFmLtRV65TUhG4XiKqhSJ7WH0tm nozg= X-Google-Smtp-Source: AGHT+IHNfQLkqA2Cyy3T06sUUzcs+V5NfBtNgOyyq/MrTopBY32pDIND7ZknCm2RrCUmQPGCxLsy6Q== X-Received: by 2002:adf:b307:0:b0:368:4edc:611e with SMTP id ffacd0b85a97d-37194344041mr7950257f8f.14.1724107939545; Mon, 19 Aug 2024 15:52:19 -0700 (PDT) Received: from localhost.localdomain (88-178-97-237.subs.proxad.net. [88.178.97.237]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-429ded367ebsm179600455e9.25.2024.08.19.15.52.18 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 19 Aug 2024 15:52:19 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Nicholas Piggin , Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 13/20] tests/avocado: exec_command should not consume console output Date: Tue, 20 Aug 2024 00:51:09 +0200 Message-ID: <20240819225116.17928-14-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240819225116.17928-1-philmd@linaro.org> References: <20240819225116.17928-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, 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org From: Nicholas Piggin _console_interaction reads data from the console even when there is only an input string to send, and no output data to wait on. This can cause lines to be missed by wait_for_console_pattern calls that follows an exec_command. Fix this by not reading the console if there is no pattern to wait for. This solves occasional hangs in ppc_hv_tests.py, usually when run on KVM hosts that are fast enough to output important lines quickly enough to be consumed by exec_command, so they get missed by subsequent wait for pattern calls. Signed-off-by: Nicholas Piggin Reviewed-by: Thomas Huth Message-ID: <20240805232814.267843-2-npiggin@gmail.com> Signed-off-by: Philippe Mathieu-Daudé --- tests/avocado/avocado_qemu/__init__.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/avocado/avocado_qemu/__init__.py b/tests/avocado/avocado_qemu/__init__.py index a3da2a96bb..ef935614cf 100644 --- a/tests/avocado/avocado_qemu/__init__.py +++ b/tests/avocado/avocado_qemu/__init__.py @@ -135,6 +135,13 @@ def _console_interaction(test, success_message, failure_message, vm.console_socket.sendall(send_string.encode()) if not keep_sending: send_string = None # send only once + + # Only consume console output if waiting for something + if success_message is None and failure_message is None: + if send_string is None: + break + continue + try: msg = console.readline().decode().strip() except UnicodeDecodeError: From patchwork Mon Aug 19 22:51:10 2024 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: 13769156 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C3EB1C3DA4A for ; Mon, 19 Aug 2024 22:55:47 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sgBGK-0000YN-BT; Mon, 19 Aug 2024 18:54:08 -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 1sgBEk-0001XQ-7d for qemu-devel@nongnu.org; Mon, 19 Aug 2024 18:52:32 -0400 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sgBEi-0000lF-8H for qemu-devel@nongnu.org; Mon, 19 Aug 2024 18:52:29 -0400 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-428178fc07eso36558065e9.3 for ; Mon, 19 Aug 2024 15:52:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1724107944; x=1724712744; darn=nongnu.org; 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=zTcmfZovDL+2at9UVP/rP8+xQ32AOJCb5fxO6lUcn8c=; b=iVejb+2gPz99XEHK8h1RETbg9cK8rfLjdGDAfDjlbKl/32I00aV8+KcUvl4ZomZXyF L9bon/fVj17yjVEalWdDnm1MLktf+qLQXKjzFC5ZdXhuZ5FISlU5KgOd7LyKNMhy7nal 2aq8DB6igQ3RejcFyCuWDosllzm5m22CRM1bQhCefWTWLEFKlUCC1a9VPMkcADbTgWVV 7sKSOLwFC4j6GPc9wlbIDGSFr4OItbLVE/bjv+YN6thaQqKfg9Q2qh1Pd6VSGlpKPUt9 ZRMg3Xb1KeFJ633QqwneG80tCayuFjOAiN9aHdQ46cunUUudd6sVcEa5CCC3rV4KD+sx irVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724107944; x=1724712744; 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=zTcmfZovDL+2at9UVP/rP8+xQ32AOJCb5fxO6lUcn8c=; b=c0XvAoSYWvaMtnHqowkT9EH28YgLgezXG0dnXszz+leE/tpD9GNoXQOgCkSB2tD+3K K6ob8YIcqb0CHqwmIx9uj3hPq7/LCaoF6SAWr3A4EYBDZDkCHX1lhWC8iXCtvOOqr8Qg Q5hD2kNZDn72C7uWkT8+dkAJwoeKYv0zee+ZLSEaOUZ6R54MrCQYNYbf/9nKVNNGvFo6 MeQhJAlqbZefa3V08aXq1cQ2JoysecuWr7I8gHVFxl9Goeiq6XN7n7oOJ0TQwo7Cd6OV UMHSwHZT3eeaNzz6s4/6PmKHDjxlZfJQP1mNZ+3nBFyJvJ/03wyGUIPvdrglI8vAHpbQ zmzA== X-Gm-Message-State: AOJu0YypHU9NZeKhTbaQ+8JqrqX6UTLsVTtE8cRS3R/Nq2Z5NC7B1nSR 6TdT9yAuuh88aXrrwrTWiTRhq+f+6k19rk0Lox6RzPeTlGuYUXONVLZRbgjDKogLgB30tDvEeDx nxaQ= X-Google-Smtp-Source: AGHT+IHudnoR6LWmE2RVxE9W9gG2+NwY6H/GTDeY9O1ynzVttZGeR3lWRbgHRUCneLg9BfNStPVTfg== X-Received: by 2002:a05:600c:4455:b0:427:d8f7:b718 with SMTP id 5b1f17b1804b1-429ed7e43d7mr87042175e9.24.1724107944227; Mon, 19 Aug 2024 15:52:24 -0700 (PDT) Received: from localhost.localdomain (88-178-97-237.subs.proxad.net. [88.178.97.237]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3718985a6ddsm11569150f8f.58.2024.08.19.15.52.23 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 19 Aug 2024 15:52:23 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Nicholas Piggin , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= Subject: [PULL 14/20] tests/avocado: Mark ppc_hv_tests.py as non-flaky after fixed console interaction Date: Tue, 20 Aug 2024 00:51:10 +0200 Message-ID: <20240819225116.17928-15-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240819225116.17928-1-philmd@linaro.org> References: <20240819225116.17928-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=philmd@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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org From: Nicholas Piggin Now that exec_command doesn't incorrectly consume console output, and guest time is set correctly, ppc_hv_tests.py is working more reliably. Try marking it non-flaky. Signed-off-by: Nicholas Piggin Message-ID: <20240805232814.267843-3-npiggin@gmail.com> Signed-off-by: Philippe Mathieu-Daudé --- tests/avocado/ppc_hv_tests.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/avocado/ppc_hv_tests.py b/tests/avocado/ppc_hv_tests.py index bf8822bb97..0e83bbac71 100644 --- a/tests/avocado/ppc_hv_tests.py +++ b/tests/avocado/ppc_hv_tests.py @@ -45,7 +45,6 @@ def missing_deps(): # QEMU already installed and use that. # XXX: The order of these tests seems to matter, see git blame. @skipIf(missing_deps(), 'dependencies (%s) not installed' % ','.join(deps)) -@skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test sometimes gets stuck due to console handling problem') @skipUnless(os.getenv('AVOCADO_ALLOW_LARGE_STORAGE'), 'storage limited') @skipUnless(os.getenv('SPEED') == 'slow', 'runtime limited') class HypervisorTest(QemuSystemTest): From patchwork Mon Aug 19 22:51:11 2024 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: 13769152 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C547EC5321D for ; Mon, 19 Aug 2024 22:55:35 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sgBGH-0008LZ-Ap; Mon, 19 Aug 2024 18:54:05 -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 1sgBEm-0001er-SW for qemu-devel@nongnu.org; Mon, 19 Aug 2024 18:52:37 -0400 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sgBEl-0000lV-0M for qemu-devel@nongnu.org; Mon, 19 Aug 2024 18:52:32 -0400 Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-3718e416297so2192366f8f.2 for ; Mon, 19 Aug 2024 15:52:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1724107949; x=1724712749; darn=nongnu.org; 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=YLodpe9emd/ELJf5C6nKnsNO7KrpM2yyxOGgNuXlJKo=; b=HuP6PAhQ1CEo2lALJ/3qCnOhQoiX47grui/E/8RmnJf6VZtYK5UwyMVyRp7TdFy5M2 MWRtC60+dy0hfpqHVDd71M1y/SvjDK8TiZDg7lkRfERcqJeVxoCd/lNyWhSJWJ8uEVFe kzveIRb1h2JR0QB236FDJenNdi4HgeqAlWVV6cbWnYlm0FIiaeOugGftyoe7dXIO07BC bYI8/l/nwfMlV+i8Um8QcrFjkIZ4LLiXk7a/Syhc+Dh6XR31BY1YUzttOuppYXegStm1 HHvskCIpysMjKyBBApdHHhgzYNWlEzDlKsmMFRjljOvzvNs11Cu9bDlDNeTT9jqwb9dr Rw/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724107949; x=1724712749; 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=YLodpe9emd/ELJf5C6nKnsNO7KrpM2yyxOGgNuXlJKo=; b=jX/Ux8ilF6+gl8dHgzJYPFfNT0EHa8lpbjHr3dmVWKuFfG/s3dSIKQMm66QoI81mpN ftDnkmmAXEK0vOzMouKbSZ4KtZZnpnCBok0morbNTcpPmTRSMEjLlmNAOBZ+aEuwUOaR Xq1avN8RHAJGt71DZqnQfbx6RH46H1HvC3fLfO9PgAcvTqAKC8J6NTHDKHtgP+LLrDix slMg8KmnQ9KbdOU+BH/JDPtrq51zUoeqKskgUPQjP2yuTofDBwUICSmY9ikOM6pyk+/F J2w1YgzUH8eQg7Nji4iGNKgo+sSwIux2GyAEl6BPw6zz2QtYVTyM4c3SVSKCN372444d ULPA== X-Gm-Message-State: AOJu0YyWRGyMkAePi6P3s6NYNakjjid80TPHVra7VJO+24I1g0uA/igq 6AMc8v2n7VT+8lknJRwrsSGj7IYz4OS8mBfKBJTDAAjv//RVLWiD0Papa3leyBG3x5jzRchSXqB SHkQ= X-Google-Smtp-Source: AGHT+IH4QyNjHxSTCswrtiCsxg78C4gM8AFwE1pH3jIjZI4n+euGbm6aoq/O6alaOdiudfXfh1rp/Q== X-Received: by 2002:a05:6000:1112:b0:371:728e:d000 with SMTP id ffacd0b85a97d-3719431768fmr7207896f8f.1.1724107948725; Mon, 19 Aug 2024 15:52:28 -0700 (PDT) Received: from localhost.localdomain (88-178-97-237.subs.proxad.net. [88.178.97.237]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-371aa455abesm7173818f8f.111.2024.08.19.15.52.27 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 19 Aug 2024 15:52:28 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 15/20] contrib/plugins/execlog: Fix shadowed declaration warning Date: Tue, 20 Aug 2024 00:51:11 +0200 Message-ID: <20240819225116.17928-16-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240819225116.17928-1-philmd@linaro.org> References: <20240819225116.17928-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=philmd@linaro.org; helo=mail-wr1-x42d.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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org From: Pierrick Bouvier Found on debian stable. ../contrib/plugins/execlog.c: In function ‘vcpu_tb_trans’: ../contrib/plugins/execlog.c:236:22: error: declaration of ‘n’ shadows a previous local [-Werror=shadow=local] 236 | for (int n = 0; n < all_reg_names->len; n++) { | ^ ../contrib/plugins/execlog.c:184:12: note: shadowed declaration is here 184 | size_t n = qemu_plugin_tb_n_insns(tb); | Signed-off-by: Pierrick Bouvier Reviewed-by: Thomas Huth Message-ID: <20240814233645.944327-2-pierrick.bouvier@linaro.org> Signed-off-by: Philippe Mathieu-Daudé --- contrib/plugins/execlog.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/plugins/execlog.c b/contrib/plugins/execlog.c index 1c1601cc0b..d67d010761 100644 --- a/contrib/plugins/execlog.c +++ b/contrib/plugins/execlog.c @@ -181,8 +181,8 @@ static void vcpu_tb_trans(qemu_plugin_id_t id, struct qemu_plugin_tb *tb) bool check_regs_this = rmatches; bool check_regs_next = false; - size_t n = qemu_plugin_tb_n_insns(tb); - for (size_t i = 0; i < n; i++) { + size_t n_insns = qemu_plugin_tb_n_insns(tb); + for (size_t i = 0; i < n_insns; i++) { char *insn_disas; uint64_t insn_vaddr; From patchwork Mon Aug 19 22:51:12 2024 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: 13769150 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 68ECFC3DA4A for ; Mon, 19 Aug 2024 22:55:31 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sgBGC-0007qd-Lr; Mon, 19 Aug 2024 18:54:00 -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 1sgBEr-0001rZ-QW for qemu-devel@nongnu.org; Mon, 19 Aug 2024 18:52:40 -0400 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sgBEp-0000mg-8n for qemu-devel@nongnu.org; Mon, 19 Aug 2024 18:52:36 -0400 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-4281ca54fd3so38751555e9.2 for ; Mon, 19 Aug 2024 15:52:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1724107953; x=1724712753; darn=nongnu.org; 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=CfFtvwBUu6O5iys7XE1dWmkEu565Z9xC0zCU21IHrTk=; b=dUQya8JDiDTeZj10U3FuTExL9MYWkrIW9I6W9reYNgC9WQ0eG9EEkVkHGAS1ColXHR 5oTwuVDeaqvtFEn/j0qmycx+IjNNQmYc6Nw+pxplOpJKxoT1rRK1/Dkh/8/qJ4wdodHE Fo9Jlgdfn/K8RxDo0nyt3k8xJhgCWfr0fg8z7OONdNHih9PG4/9k0KJg82WPsUAam/fh u5dBu2nC6UQ/aApMowBQ9K9NxN8kNH4TBEAjhJnvhklL2JdEMAagPVEt3tjGRFIlNXYR NVj34ZHKF75iFg/c0cwHqBdrY+PwYjg8o1OUkBkYOM9Zvh8syO3+0nrIQ9AlTqKmPacZ kgWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724107953; x=1724712753; 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=CfFtvwBUu6O5iys7XE1dWmkEu565Z9xC0zCU21IHrTk=; b=RCYGTvyTr9h561UOX2dYuq9jIzCosz9OH+oRoclHwmOJyRh/F1rSlNNWJ9nLJ+6dNH BwPOxQp+zydaYlYOkLY8j01Zx9o1gVHLevjSDNDUR9DqR51vmL5p/AG8oUXKUPXpzqOl gi1crrbCbLMqec67o5Ctpx4cUap/k0cKgdWaWjdPZC4l8LUfg+knhyAitfe+GHVj0HQd RxtZxMabFZaY6JPuF7RbYRY8cKnP6Klf9ou94qwtNfJGMWRCt/tUcBnNr5XpcVbHlCBk gYgCSv0OwCeqMmmxdWe4PtKsE8ZITS++wMnvKTGUF6VlTw1mLWHeUtHbbQg1RLP0PdHA ohNw== X-Gm-Message-State: AOJu0Yyx42akQu1UMRFYY+g2bS6w9AiSL8gdYnfdLbH0bafp6b7TRojT FKG++IlswqwQnhpOk4WvgjPf+cBODHVRjnURKNS44Lrd9aMSojNeSdukvJdr0tQ+ZSMvIg7FSPN Ilrw= X-Google-Smtp-Source: AGHT+IHrQr4YwIT9vzFLmUWWj50emigoEoElZZMUbBMnBJhvxKUtG8dDJm3ZwXFuFNKG2TBfWqcy9A== X-Received: by 2002:adf:a408:0:b0:368:4910:8f49 with SMTP id ffacd0b85a97d-37194315ae6mr10221794f8f.12.1724107953195; Mon, 19 Aug 2024 15:52:33 -0700 (PDT) Received: from localhost.localdomain (88-178-97-237.subs.proxad.net. [88.178.97.237]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37189896be4sm11657731f8f.77.2024.08.19.15.52.32 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 19 Aug 2024 15:52:32 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , qemu-stable@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 16/20] target/sparc: Restrict STQF to sparcv9 Date: Tue, 20 Aug 2024 00:51:12 +0200 Message-ID: <20240819225116.17928-17-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240819225116.17928-1-philmd@linaro.org> References: <20240819225116.17928-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=philmd@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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org From: Richard Henderson Prior to sparcv9, the same encoding was STDFQ. Cc: qemu-stable@nongnu.org Fixes: 06c060d9e5b ("target/sparc: Move simple fp load/store to decodetree") Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240816072311.353234-2-richard.henderson@linaro.org> Signed-off-by: Philippe Mathieu-Daudé --- target/sparc/insns.decode | 2 +- target/sparc/translate.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/target/sparc/insns.decode b/target/sparc/insns.decode index fbcb4f7aef..5fd478191a 100644 --- a/target/sparc/insns.decode +++ b/target/sparc/insns.decode @@ -644,7 +644,7 @@ STF 11 ..... 100100 ..... . ............. @r_r_ri_na STFSR 11 00000 100101 ..... . ............. @n_r_ri STXFSR 11 00001 100101 ..... . ............. @n_r_ri { - STQF 11 ..... 100110 ..... . ............. @q_r_ri_na + STQF 11 ..... 100110 ..... . ............. @q_r_ri_na # v9 STDFQ 11 ----- 100110 ----- - ------------- } STDF 11 ..... 100111 ..... . ............. @d_r_ri_na diff --git a/target/sparc/translate.c b/target/sparc/translate.c index 113639083b..c803e8d1ba 100644 --- a/target/sparc/translate.c +++ b/target/sparc/translate.c @@ -4521,7 +4521,7 @@ static bool do_st_fpr(DisasContext *dc, arg_r_r_ri_asi *a, MemOp sz) TRANS(STF, ALL, do_st_fpr, a, MO_32) TRANS(STDF, ALL, do_st_fpr, a, MO_64) -TRANS(STQF, ALL, do_st_fpr, a, MO_128) +TRANS(STQF, 64, do_st_fpr, a, MO_128) TRANS(STFA, 64, do_st_fpr, a, MO_32) TRANS(STDFA, 64, do_st_fpr, a, MO_64) From patchwork Mon Aug 19 22:51:13 2024 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: 13769155 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A2814C3DA4A for ; Mon, 19 Aug 2024 22:55:43 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sgBG7-00078Q-CO; Mon, 19 Aug 2024 18:53:55 -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 1sgBEx-000265-7a for qemu-devel@nongnu.org; Mon, 19 Aug 2024 18:52:45 -0400 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sgBEu-0000nl-82 for qemu-devel@nongnu.org; Mon, 19 Aug 2024 18:52:41 -0400 Received: by mail-wr1-x432.google.com with SMTP id ffacd0b85a97d-37196229343so2253264f8f.0 for ; Mon, 19 Aug 2024 15:52:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1724107957; x=1724712757; darn=nongnu.org; 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=z09RW6IFcneNIVHjMWauhlzcbq2Ve54pkQqfOcA3PEg=; b=ElViYo1jGB/IydxtVP/35FT7U3FFTpX/428tiEaJLxqRZB4tTZ9WeRMPX7Swu2jFfr XqtvjTHtMIm5IWyj7R8+2K0Kj7ith2tYYEdP7z9WMlSgnHfS1si+XRj7yaEoZ8hFxfUE w8dPyabSsTVef0ENlT5J8FSC1QRPbI9B7MMZMfnVqx13nmdzaCuJEgM7pAqfCxO2HDKT P6hDyGUq9TKz69gpr6afpbybBZwqZ9ifp99CcUlTrXsrHLGHdknIX6IYtQdadR7xhOgy KNnObPjIybEAPDLqnfxRtsV92RRIW3r720Sg6ppBvu+UdULVKBzx8n5Gye+NDBFR8yax thoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724107957; x=1724712757; 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=z09RW6IFcneNIVHjMWauhlzcbq2Ve54pkQqfOcA3PEg=; b=Edwg6IiexN59XPFobe0lvy3Krq2BrMt1/e4mzCoS4JzOULCdcVfl9h9xk0k8Py0Wtb HSFhN4UtCLTZaeUHRxlNAfHB5KUv0xvd4ZdLnU5FL6vGl6xHJflPDsf2Yvrhpoa3F20M km8YOn/pFM/eb5QKoyN+iesBWvCcq5iKdeOCLocEJ2Ojb26I7QfceE0Hvxx3w5XfOVQG ZcSjDgkFo9KaDIFB8tO6OyJyvNWr56CZuVHujI1TWO1hxOxZzYyGDNt9aHxBmL3/P/jY tTLt+t+JNS12cDBdNSR3kZRF50tAmOjxoJCxo0U6Ymp53DEaBE3xLnnbE5aJihv0dTzp 5fwA== X-Gm-Message-State: AOJu0YxhExjoiMrzyL0NEecQiU/nQUPGIA3BqM4j3vvVLq2Vq+vo5jAf Vn1+SnglESO1Ic9MoOX5Yj9szvx4NOA/I9U/9DTpXSmvkCP0L7LSub1QmJnGUCEsjOJEdoiLhHq gA3s= X-Google-Smtp-Source: AGHT+IFppZc2C2k0jzdRIXeMYR2BrPwxSECWzKO6v6Mvlb+8GJrm4Spb218TdNBcu+z6fuTLjTe1qw== X-Received: by 2002:adf:9785:0:b0:371:8e67:7a90 with SMTP id ffacd0b85a97d-371946a4f3emr7195327f8f.49.1724107957546; Mon, 19 Aug 2024 15:52:37 -0700 (PDT) Received: from localhost.localdomain (88-178-97-237.subs.proxad.net. [88.178.97.237]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37189849831sm11585295f8f.30.2024.08.19.15.52.36 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 19 Aug 2024 15:52:37 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Bernhard Beschow , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= Subject: [PULL 17/20] hw/ppc/Kconfig: Add missing SERIAL_ISA dependency to POWERNV machine Date: Tue, 20 Aug 2024 00:51:13 +0200 Message-ID: <20240819225116.17928-18-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240819225116.17928-1-philmd@linaro.org> References: <20240819225116.17928-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::432; envelope-from=philmd@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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org From: Bernhard Beschow The machine calls serial_hds_isa_init() which is provided by serial-isa.c, guarded by SERIAL_ISA. Signed-off-by: Bernhard Beschow Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20240814181534.218964-4-shentey@gmail.com> Signed-off-by: Philippe Mathieu-Daudé --- hw/ppc/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/ppc/Kconfig b/hw/ppc/Kconfig index c235519881..5addad1124 100644 --- a/hw/ppc/Kconfig +++ b/hw/ppc/Kconfig @@ -39,6 +39,7 @@ config POWERNV select PCI_POWERNV select PCA9552 select PCA9554 + select SERIAL_ISA select SSI select SSI_M25P80 select PNV_SPI From patchwork Mon Aug 19 22:51:14 2024 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: 13769149 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 226C7C3DA4A for ; Mon, 19 Aug 2024 22:54:59 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sgBGC-0007qv-Nv; Mon, 19 Aug 2024 18:54:00 -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 1sgBF0-0002Pa-BQ for qemu-devel@nongnu.org; Mon, 19 Aug 2024 18:52:47 -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 1sgBEy-0000pr-NS for qemu-devel@nongnu.org; Mon, 19 Aug 2024 18:52:46 -0400 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-428141be2ddso37493345e9.2 for ; Mon, 19 Aug 2024 15:52:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1724107962; x=1724712762; darn=nongnu.org; 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=3pBm6V4tkAnYFc+ZirSS/Y/4pdgPe/X+of3pcxo2Q7E=; b=INfzaB0Ks+ahSo489RyNOjB7L15rmMqUWzCuft3oyjRsJJsvpEAwQCri1RdKMjhvht jw+KeHFuKQYb9zy1Ux4b7YJH7SfpMsWs/2mtJV7MSE7bVTeBNVhMxqDm1bl/nWnz7vQX 4avz+ME0I6I41NJYM4fueDTYdWuG9WQASlUuis0Qmv6au3YIG1tVjUUghGcvJxDxynmb SLyQyFKQYQSI5j3ych84IckmVwvPLRFT870LcQwpbL2YS5hVyPAA0h0PETlRjWBOBNZE 0UqCLjpXXbfB7wKiBFVCFNHhSM0hfUGbQ7YVo2s1nQx1xUV9a+J8DeZB84vHikf4PYjx VU+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724107962; x=1724712762; 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=3pBm6V4tkAnYFc+ZirSS/Y/4pdgPe/X+of3pcxo2Q7E=; b=aBJUjQEX/Uk38t3zrzIxgfb0f16/JJAvHeYm7fjhWletgkrNZk3XWynhVoTErCVym6 asKiz61S1k1dXJ82pTadQsWy7bhqYNZ07WMHn0n+ZVlypafzvQm1m6GnfYGtNWhyp3NB gLLOaMWe5sdK0IrYETRUmLWEUnXBukOaUNbNS3eQ46j7FtQT0mCjCT4e0WoTu/5ufr3Y Hn/KcDqcdcLA57iBgtzsPqg1SqD4QKLfh5hGJr04Ribkyn8DrfQG+JevU5xI0DAQicjR 36Gz2qufPWlajf9+ImKXTY0LYEBwkXJ56eX4CLaJcjsKIgLRQ+ocP1EL+ztpj2G3JfM4 U5pA== X-Gm-Message-State: AOJu0YyANwwngx6xsiqr27b7mJT0z3EBTjG7ePKOzSuqP+6VhVxxBOq9 KGO8MNSgPKeZ4a/i/CftN+4brRmJe0ShpE6PkOUO9aZIg1BCWSMf4oFt5P4Cbe20HSWjxExQOg9 QGYg= X-Google-Smtp-Source: AGHT+IGCsDoBkmmL9a6NkyCXQz+PNOWnKA5h4I+zJkmOwB+9ePw3LsP+7F1zreFZlQw+OcjjwrSc3Q== X-Received: by 2002:a05:600c:1f83:b0:426:5e91:3ff1 with SMTP id 5b1f17b1804b1-429ed7d1a13mr84497905e9.24.1724107962118; Mon, 19 Aug 2024 15:52:42 -0700 (PDT) Received: from localhost.localdomain (88-178-97-237.subs.proxad.net. [88.178.97.237]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-371898497f0sm11573714f8f.39.2024.08.19.15.52.41 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 19 Aug 2024 15:52:41 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Kamil_Szcz=C4=99k?= , Bernhard Beschow , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 18/20] hw/i386/pc: Unify vmport=auto handling Date: Tue, 20 Aug 2024 00:51:14 +0200 Message-ID: <20240819225116.17928-19-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240819225116.17928-1-philmd@linaro.org> References: <20240819225116.17928-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, 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org From: Kamil Szczęk The code which translates vmport=auto to on/off is currently separate for each PC machine variant, while being functionally equivalent. This moves the translation into a shared initialization function, while also tightening the enum assertion. Signed-off-by: Kamil Szczęk Reviewed-by: Bernhard Beschow Reviewed-by: Philippe Mathieu-Daudé Message-ID: Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/pc.c | 5 +++++ hw/i386/pc_piix.c | 5 ----- hw/i386/pc_q35.c | 5 ----- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index c74931d577..72229a24ff 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1217,6 +1217,11 @@ void pc_basic_device_init(struct PCMachineState *pcms, isa_realize_and_unref(pcms->pcspk, isa_bus, &error_fatal); } + assert(pcms->vmport >= 0 && pcms->vmport < ON_OFF_AUTO__MAX); + if (pcms->vmport == ON_OFF_AUTO_AUTO) { + pcms->vmport = xen_enabled() ? ON_OFF_AUTO_OFF : ON_OFF_AUTO_ON; + } + /* Super I/O */ pc_superio_init(isa_bus, create_fdctrl, pcms->i8042_enabled, pcms->vmport != ON_OFF_AUTO_ON); diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index d9e69243b4..347afa4c37 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -310,11 +310,6 @@ static void pc_init1(MachineState *machine, const char *pci_type) pc_vga_init(isa_bus, pcmc->pci_enabled ? pcms->pcibus : NULL); - assert(pcms->vmport != ON_OFF_AUTO__MAX); - if (pcms->vmport == ON_OFF_AUTO_AUTO) { - pcms->vmport = xen_enabled() ? ON_OFF_AUTO_OFF : ON_OFF_AUTO_ON; - } - /* init basic PC hardware */ pc_basic_device_init(pcms, isa_bus, x86ms->gsi, x86ms->rtc, !MACHINE_CLASS(pcmc)->no_floppy, 0x4); diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 9d108b194e..f2d8edfa84 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -276,11 +276,6 @@ static void pc_q35_init(MachineState *machine) x86_register_ferr_irq(x86ms->gsi[13]); } - assert(pcms->vmport != ON_OFF_AUTO__MAX); - if (pcms->vmport == ON_OFF_AUTO_AUTO) { - pcms->vmport = ON_OFF_AUTO_ON; - } - /* init basic PC hardware */ pc_basic_device_init(pcms, isa_bus, x86ms->gsi, x86ms->rtc, !mc->no_floppy, 0xff0104); From patchwork Mon Aug 19 22:51:15 2024 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: 13769151 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A96A3C52D7C for ; Mon, 19 Aug 2024 22:55:31 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sgBGH-00009C-Ii; Mon, 19 Aug 2024 18:54:06 -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 1sgBF4-0002mk-PK for qemu-devel@nongnu.org; Mon, 19 Aug 2024 18:52:53 -0400 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sgBF2-0000qE-ML for qemu-devel@nongnu.org; Mon, 19 Aug 2024 18:52:50 -0400 Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-37196229343so2253352f8f.0 for ; Mon, 19 Aug 2024 15:52:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1724107967; x=1724712767; darn=nongnu.org; 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=8Rpj0D5ZMl/IBwW6NXczoFAZCXLiZ4uNQ1t/B/Sarn0=; b=uhN6TedFXli2mt+RFohEyh5171RnC2ndEU8AUp9Sh8L7WG4ROgCceYy/A5IS9Oaw9s 2xAT5QBU6tbILcgcfsLeWeknNwTCC0Aimsiyon+GtE4nQp9IWPpNZ6lSpjZdLXgSZ2Z+ 6mNtZM9fbQZ0fLX4ORdC2o1wV6058lbLITOXIBQaLZWahb9COHwjdoU//2KQN6jCbJ2Z dWBzroGChHkSgbTLanzLUuhYQAgO1mQqfSOXnzJ2//CmpSwRz0WidwpobnLd1HglkixL WKDEUrbICbpHLL6t5FbWomYvx5e7nwYbSGf2Mv+4P/5GXEy+/mpAgcv0GA1BjT9RKzzS Y2AA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724107967; x=1724712767; 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=8Rpj0D5ZMl/IBwW6NXczoFAZCXLiZ4uNQ1t/B/Sarn0=; b=vwmI/Z9m8x1cFppGwgvi0izTNJbgTEmTD5y9Zi9pGwfFEd8YatALGsRm3I3FdXyrk9 nCVfUdShT5Sjs7ob7D1wbr3fHm6m99vUIeHmaFzE8D2+kaxGkY6ANXxPuE2ij+2l2wjT MBl9rlBkm69uGygunkAbOXbx4F0FL5Dljqb/jEYUy+ATHYGcBiAyB0CHrTJFJpN0FwJ/ AjysBgocZVP1OCFXzeRovKSUVKAl7zBny6onrLpLrjukPItEwQvzWyIaEBZ84Mx3f7Jn bNqEtfWSyh+rXvc5nUb/kbo9N1NZoIh+ydQ78KnMes27EYq8/rGNv9u2VtPLLXMqhaIB 8CkQ== X-Gm-Message-State: AOJu0YwIVkSkHQzOBCZGGLxh1PTIEXVO8WbdYWzhoawqPNweGRoouHP6 CN/rMUp5d23KxC5dNPdajWwqQkrjrDCV8Hs/bs7YgggYEzCDuVWFFGoIsuAPou48LnpY94zmDOE nQxU= X-Google-Smtp-Source: AGHT+IELigD0cS7VR5ltft6sqKDFpDlXbKn8GNqQVP3OgcfVSDZPkpns+vxxwwSrXm6C12yjX28iTw== X-Received: by 2002:adf:ec04:0:b0:371:7e73:eb43 with SMTP id ffacd0b85a97d-37194694f88mr8068307f8f.42.1724107966740; Mon, 19 Aug 2024 15:52:46 -0700 (PDT) Received: from localhost.localdomain (88-178-97-237.subs.proxad.net. [88.178.97.237]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-429ded2931asm173290985e9.17.2024.08.19.15.52.45 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 19 Aug 2024 15:52:46 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Kamil_Szcz=C4=99k?= , Bernhard Beschow , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 19/20] hw/i386/pc: Ensure vmport prerequisites are fulfilled Date: Tue, 20 Aug 2024 00:51:15 +0200 Message-ID: <20240819225116.17928-20-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240819225116.17928-1-philmd@linaro.org> References: <20240819225116.17928-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=philmd@linaro.org; helo=mail-wr1-x429.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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org From: Kamil Szczęk Since commit 4ccd5fe22feb95137d325f422016a6473541fe9f ('pc: add option to disable PS/2 mouse/keyboard'), the vmport will not be created unless the i8042 PS/2 controller is enabled. To avoid confusion, let's fail if vmport was explicitly requested, but the i8042 controller is disabled. This also changes the behavior of vmport=auto to take i8042 controller availability into account. Signed-off-by: Kamil Szczęk Reviewed-by: Bernhard Beschow Message-ID: <0MS3y5E-hHqODIhiuFxmCnIrXd612JIGq31UuMsz4KGCKZ_wWuF-PHGKTRSGS0nWaPEddOdF4YOczHdgorulECPo792OhWov7O9BBF6UMX4=@szczek.dev> Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/pc.c | 11 ++++++++--- qemu-options.hx | 4 ++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 72229a24ff..7779c88a91 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1075,7 +1075,7 @@ static const MemoryRegionOps ioportF0_io_ops = { }; static void pc_superio_init(ISABus *isa_bus, bool create_fdctrl, - bool create_i8042, bool no_vmport) + bool create_i8042, bool no_vmport, Error **errp) { int i; DriveInfo *fd[MAX_FD]; @@ -1100,6 +1100,10 @@ static void pc_superio_init(ISABus *isa_bus, bool create_fdctrl, } if (!create_i8042) { + if (!no_vmport) { + error_setg(errp, + "vmport requires the i8042 controller to be enabled"); + } return; } @@ -1219,12 +1223,13 @@ void pc_basic_device_init(struct PCMachineState *pcms, assert(pcms->vmport >= 0 && pcms->vmport < ON_OFF_AUTO__MAX); if (pcms->vmport == ON_OFF_AUTO_AUTO) { - pcms->vmport = xen_enabled() ? ON_OFF_AUTO_OFF : ON_OFF_AUTO_ON; + pcms->vmport = (xen_enabled() || !pcms->i8042_enabled) + ? ON_OFF_AUTO_OFF : ON_OFF_AUTO_ON; } /* Super I/O */ pc_superio_init(isa_bus, create_fdctrl, pcms->i8042_enabled, - pcms->vmport != ON_OFF_AUTO_ON); + pcms->vmport != ON_OFF_AUTO_ON, &error_fatal); } void pc_nic_init(PCMachineClass *pcmc, ISABus *isa_bus, PCIBus *pci_bus) diff --git a/qemu-options.hx b/qemu-options.hx index d99084a5ee..d94e2cbbae 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -68,8 +68,8 @@ SRST ``vmport=on|off|auto`` Enables emulation of VMWare IO port, for vmmouse etc. auto says - to select the value based on accel. For accel=xen the default is - off otherwise the default is on. + to select the value based on accel and i8042. For accel=xen or + i8042=off the default is off otherwise the default is on. ``dump-guest-core=on|off`` Include guest memory in a core dump. The default is on. From patchwork Mon Aug 19 22:51:16 2024 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: 13769153 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AB948C52D7C for ; Mon, 19 Aug 2024 22:55:35 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sgBGJ-0000TE-Lh; Mon, 19 Aug 2024 18:54:07 -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 1sgBF9-0002zh-8l for qemu-devel@nongnu.org; Mon, 19 Aug 2024 18:52:59 -0400 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sgBF7-0000qa-DC for qemu-devel@nongnu.org; Mon, 19 Aug 2024 18:52:54 -0400 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-42819654737so37538355e9.1 for ; Mon, 19 Aug 2024 15:52:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1724107971; x=1724712771; darn=nongnu.org; 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=ZEmJWyUe5Z7mps33C1UMKOWEUqjAklVcCYaJjEGW1x0=; b=TriDJmWKIhuEaOCa2LRFASnKLIjdbBSHhcmakHsJnEkugPiMvpub2OZsCeIpCV9DRE 5ydszRT+DDeA2UVOB6gaDstDwQ90MXxp2Cti8uszVNgioW/HrwBbTOksWfUY1hflbRt4 3Vb1XuAqfPrO21mikfp3S9FhKIfQxVJIPtO404hzgEilPH6hpNi3BvOWYq1flZVk72KK 2khCRjZ9dcfxWZuhFNX/rwLMDpOv+8z3rkEbCgTUWN0t6Zq59Rgo5ygzgjzwYIJlOrhE GiM+qrdua8UYSC+LBoneIV4txLNV9Y1l7UvGaWanEH0BVxPoT7jI7DD5tGbkSfiDe4Jj 1+rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724107971; x=1724712771; 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=ZEmJWyUe5Z7mps33C1UMKOWEUqjAklVcCYaJjEGW1x0=; b=o6shGNJYc1tcdkQjCGiggZI4MKYMyswxmf4HaIsRazVH1plTFo+3s7BZvJU0Q7dhG2 Zo3xXeyHGcXbWvpmB1iYfxSZiQvqmIqKEyKaOOXWJtzYiG0fcZxeC2FEt1rlNcHt2heV InJ+8AX0YxCuDTzG+AxOX5IMVhscBpRXm0PUzOH7Lx4Auyb+C1yfplooCQLITmobc8Ib xqaQXARuz1jIrr26PVUOUYz2uestyBID6fMqQ0OUuaMZnQD5ORR9sTMC1ZoqLstQnzHR kzj2ZkGedmcJkpEHPy+tv8yh/0UQqgA46UsSbsD7gUQQ6Ha6UTSNi7uMyJcL6/0KyL9I 0/zQ== X-Gm-Message-State: AOJu0YzdF1Stbb/hf/Lv8V1r7x9mfyTMfN5GXaf2hpGNXJ21f89v4fwf rY2EJMjr2vLA07rI42uTjktmb3yJeTwYEy+6p3yMH+q4eArEYUFW32RMr3epr93dRZqTtBBy1rt O2K0= X-Google-Smtp-Source: AGHT+IFIlse8M2XwYV+nLLXCUt3xIk/rkiVIEMkbetMSezMb9lFm4NYfrXmzGtX8YIgqmYCY+kH9eA== X-Received: by 2002:adf:b652:0:b0:367:9088:fecd with SMTP id ffacd0b85a97d-3719431e602mr7867047f8f.7.1724107971108; Mon, 19 Aug 2024 15:52:51 -0700 (PDT) Received: from localhost.localdomain (88-178-97-237.subs.proxad.net. [88.178.97.237]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-429ded18630sm175647555e9.1.2024.08.19.15.52.50 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 19 Aug 2024 15:52:50 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Peter Maydell , qemu-stable@nongnu.org, =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= , =?utf-8?q?Phi?= =?utf-8?q?lippe_Mathieu-Daud=C3=A9?= Subject: [PULL 20/20] crypto/tlscredspsk: Free username on finalize Date: Tue, 20 Aug 2024 00:51:16 +0200 Message-ID: <20240819225116.17928-21-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240819225116.17928-1-philmd@linaro.org> References: <20240819225116.17928-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=philmd@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=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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org From: Peter Maydell When the creds->username property is set we allocate memory for it in qcrypto_tls_creds_psk_prop_set_username(), but we never free this when the QCryptoTLSCredsPSK is destroyed. Free the memory in finalize. This fixes a LeakSanitizer complaint in migration-test: $ (cd build/asan; ASAN_OPTIONS="fast_unwind_on_malloc=0" QTEST_QEMU_BINARY=./qemu-system-x86_64 ./tests/qtest/migration-test --tap -k -p /x86_64/migration/precopy/unix/tls/psk) ================================================================= ==3867512==ERROR: LeakSanitizer: detected memory leaks Direct leak of 5 byte(s) in 1 object(s) allocated from: #0 0x5624e5c99dee in malloc (/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/asan/qemu-system-x86_64+0x218edee) (BuildId: a9e623fa1009a9435c0142c037cd7b8c1ad04ce3) #1 0x7fb199ae9738 in g_malloc debian/build/deb/../../../glib/gmem.c:128:13 #2 0x7fb199afe583 in g_strdup debian/build/deb/../../../glib/gstrfuncs.c:361:17 #3 0x5624e82ea919 in qcrypto_tls_creds_psk_prop_set_username /mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/asan/../../crypto/tlscredspsk.c:255:23 #4 0x5624e812c6b5 in property_set_str /mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/asan/../../qom/object.c:2277:5 #5 0x5624e8125ce5 in object_property_set /mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/asan/../../qom/object.c:1463:5 #6 0x5624e8136e7c in object_set_properties_from_qdict /mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/asan/../../qom/object_interfaces.c:55:14 #7 0x5624e81372d2 in user_creatable_add_type /mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/asan/../../qom/object_interfaces.c:112:5 #8 0x5624e8137964 in user_creatable_add_qapi /mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/asan/../../qom/object_interfaces.c:157:11 #9 0x5624e891ba3c in qmp_object_add /mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/asan/../../qom/qom-qmp-cmds.c:227:5 #10 0x5624e8af9118 in qmp_marshal_object_add /mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/asan/qapi/qapi-commands-qom.c:337:5 #11 0x5624e8bd1d49 in do_qmp_dispatch_bh /mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/asan/../../qapi/qmp-dispatch.c:128:5 #12 0x5624e8cb2531 in aio_bh_call /mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/asan/../../util/async.c:171:5 #13 0x5624e8cb340c in aio_bh_poll /mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/asan/../../util/async.c:218:13 #14 0x5624e8c0be98 in aio_dispatch /mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/asan/../../util/aio-posix.c:423:5 #15 0x5624e8cba3ce in aio_ctx_dispatch /mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/asan/../../util/async.c:360:5 #16 0x7fb199ae0d3a in g_main_dispatch debian/build/deb/../../../glib/gmain.c:3419:28 #17 0x7fb199ae0d3a in g_main_context_dispatch debian/build/deb/../../../glib/gmain.c:4137:7 #18 0x5624e8cbe1d9 in glib_pollfds_poll /mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/asan/../../util/main-loop.c:287:9 #19 0x5624e8cbcb13 in os_host_main_loop_wait /mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/asan/../../util/main-loop.c:310:5 #20 0x5624e8cbc6dc in main_loop_wait /mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/asan/../../util/main-loop.c:589:11 #21 0x5624e6f3f917 in qemu_main_loop /mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/asan/../../system/runstate.c:801:9 #22 0x5624e893379c in qemu_default_main /mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/asan/../../system/main.c:37:14 #23 0x5624e89337e7 in main /mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/asan/../../system/main.c:48:12 #24 0x7fb197972d8f in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16 #25 0x7fb197972e3f in __libc_start_main csu/../csu/libc-start.c:392:3 #26 0x5624e5c16fa4 in _start (/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/asan/qemu-system-x86_64+0x210bfa4) (BuildId: a9e623fa1009a9435c0142c037cd7b8c1ad04ce3) SUMMARY: AddressSanitizer: 5 byte(s) leaked in 1 allocation(s). Cc: qemu-stable@nongnu.org Signed-off-by: Peter Maydell Reviewed-by: Daniel P. Berrangé Message-ID: <20240819145021.38524-1-peter.maydell@linaro.org> Signed-off-by: Philippe Mathieu-Daudé --- crypto/tlscredspsk.c | 1 + 1 file changed, 1 insertion(+) diff --git a/crypto/tlscredspsk.c b/crypto/tlscredspsk.c index 546cad1c5a..0d6b71a37c 100644 --- a/crypto/tlscredspsk.c +++ b/crypto/tlscredspsk.c @@ -243,6 +243,7 @@ qcrypto_tls_creds_psk_finalize(Object *obj) QCryptoTLSCredsPSK *creds = QCRYPTO_TLS_CREDS_PSK(obj); qcrypto_tls_creds_psk_unload(creds); + g_free(creds->username); } static void