From patchwork Mon Dec 4 15:25:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 750027 Delivered-To: patch@linaro.org Received: by 2002:adf:9b9d:0:b0:333:3a04:f257 with SMTP id d29csp1181013wrc; Mon, 4 Dec 2023 07:26:54 -0800 (PST) X-Google-Smtp-Source: AGHT+IG5NBPGv0ZNETxcEkKEZvhhPjvNubOWMwpCRU2X+ZK6CRdvlSjrhjbWgPBOc5HUELE4e5uM X-Received: by 2002:a05:6808:1451:b0:3b8:d135:dcfa with SMTP id x17-20020a056808145100b003b8d135dcfamr2231750oiv.34.1701703614033; Mon, 04 Dec 2023 07:26:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701703614; cv=none; d=google.com; s=arc-20160816; b=zrTbK3BqsU0zeYlsyYPEk6MxaiVxRbTRhOAzckb7dRQeFWV9axA9/M/5XSi2/sbHWl osZnVVeoKsD8SK7DcG/idfgGZm+OC2SnxENpo47T5rxhYNaeSShmckWmICbcEVQW6mmh tABjNGK65clrgN8Jh0GLTsofk0UFGSACU8sSwydCkAyf5ilz5VX/MPORQ9hzPY27tuGD 4trCMJl0IKjICN1nnCKjhcNh/bQqLczmxjbfV7Ig9QpGFYrpFPJFV0pwkvsAcCo+iyTZ OpuIY7WV27RtvKF+LB1hje6sJVtAMqNM2f1+pVk6K6KWQItCzlABfYszkvCVG5R1h2Vs W8ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=JZhXIwTdxRXKPCMPSGzqdtq6zXuxgS6BLrIc53hBnkQ=; fh=SiLRZiZEeYdhcGhhtVPW7XyP13TiTTLHxsHvAYt9mus=; b=sa6rpd+i4IYcMUJ8jVd63wxgU3C9MLyxYq0GEPdiZuIQ30Fx6MTy1KUJZnFzGcsYr3 odE8p2E1SHoNrpramS5EFZiDulo0Hc9fcFVgsp0gAIAUepDBu0PU8A7P5/sWI8cB563G 2CpqmBzRVlgieiJopGxIJhgtjSZ7gV3p3csrmMedRK3yrAKSGrigkeEXMKwfn6yFPvQk d4ndqN5DtsO3VgLLAcft9wLCWA1sb0/CIpLIMzWCESwTEa/ubn4Wj4fV8dx7wTQnmXef LQRHoYTUB/UBTk0zqudx+5JuBXgCvQaLHZxcpW7PecUvLTKLcI1VEmIMR2Kjih8juApw 8fuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ik+y3p73; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id dv18-20020a05620a1b9200b0077f01093eafsi5021972qkb.642.2023.12.04.07.26.53 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 04 Dec 2023 07:26:54 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ik+y3p73; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rAApn-000420-Kc; Mon, 04 Dec 2023 10:26:11 -0500 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 1rAApl-00040I-F3 for qemu-devel@nongnu.org; Mon, 04 Dec 2023 10:26:09 -0500 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rAApj-0005Ro-3w for qemu-devel@nongnu.org; Mon, 04 Dec 2023 10:26:09 -0500 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-40b399a6529so35192475e9.1 for ; Mon, 04 Dec 2023 07:26:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701703563; x=1702308363; 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=JZhXIwTdxRXKPCMPSGzqdtq6zXuxgS6BLrIc53hBnkQ=; b=Ik+y3p73xNQfV08P+AWscF27YgM2soO9QqwULde5RKAUM5V6O4fJOaBu+f6F4Fkxdk OJcInbvEUHhxAxlOL/phLcTzgS3yhLdv59DvZuvdIiBGihh/1WkclPpwz7Zio9NozoU5 U53xJShD/AWx5lHWe0R+y50Ljv1LtQL7kimtihmyTJ2ujhzLVQVP8A35O5E+0V3H4kZG oKTFi6w6aJeMvMtFIxvx18siorRt4JoWGKzozBcZ/+X+z5o2os/N+ePhoHnKPOH0TxFf qf+hm97krD4csOQMPCcop1p4wjMu68g/lu+AWsXon7DVy5mupHa19c1a965PPTkdu3Ip cKuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701703563; x=1702308363; 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=JZhXIwTdxRXKPCMPSGzqdtq6zXuxgS6BLrIc53hBnkQ=; b=U/sulzseVenqivcSwkHe7MEthbeyIepVZm28l8dfHUo6EZ0lr2eFDr1kG2iC3O8sEL E/JGBFDoOweBNEKqrru60UnQqpqu104kSb4hhsVDNZXZjo9smVIk1/TDccEwopUx97bx 4rqjmeAmk9PZm8BMzWJD8UpgpomWLUzoWakRHxlKGczh8iAPT1MRLFBZCy5SBRsQJe2t y0hNwexGS0IGFmxIgC8hi1Xj9fNXm+IT76KCaSN3jgrsG2IuNUO4XoeC1zE84Rzqoj11 bjq+1roIa0+W0Ju624WT/Rmn3dnL1NM0yUiUvX+z2WxgLd/hy5ANH/XlSzv7SvN2LjGf iKsg== X-Gm-Message-State: AOJu0Yywax/hL7IsBWSaPmfTyFhsTj7Tmk0CMjmIoJa5wwBUgUuYUcv2 IrVJoL0F1fKoflgTJKQe0v4Gl1py+Gmn8Fg+JVg= X-Received: by 2002:a1c:7712:0:b0:40b:5e56:7b58 with SMTP id t18-20020a1c7712000000b0040b5e567b58mr1265580wmi.161.1701703562831; Mon, 04 Dec 2023 07:26:02 -0800 (PST) Received: from m1x-phil.lan ([176.176.140.35]) by smtp.gmail.com with ESMTPSA id iv11-20020a05600c548b00b0040b4cb14d40sm19082346wmb.19.2023.12.04.07.26.01 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 04 Dec 2023 07:26:02 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-riscv@nongnu.org, Patrick Venture , qemu-stable@nongnu.org, Chris Rauer , Peter Foley , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , David Hildenbrand , Paolo Bonzini , Peter Xu Subject: [PULL 1/4] system/memory: use ldn_he_p/stn_he_p Date: Mon, 4 Dec 2023 16:25:21 +0100 Message-ID: <20231204152524.37803-2-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231204152524.37803-1-philmd@linaro.org> References: <20231204152524.37803-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=philmd@linaro.org; helo=mail-wm1-x32a.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Patrick Venture Using direct pointer dereferencing can allow for unaligned accesses, which was seen during execution with sanitizers enabled. Cc: qemu-stable@nongnu.org Reviewed-by: Chris Rauer Reviewed-by: Peter Foley Signed-off-by: Patrick Venture Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: David Hildenbrand Message-ID: <20231116163633.276671-1-venture@google.com> Signed-off-by: Philippe Mathieu-Daudé --- system/memory.c | 32 ++------------------------------ 1 file changed, 2 insertions(+), 30 deletions(-) diff --git a/system/memory.c b/system/memory.c index 4d9cb0a7ff..798b6c0a17 100644 --- a/system/memory.c +++ b/system/memory.c @@ -1339,22 +1339,7 @@ static uint64_t memory_region_ram_device_read(void *opaque, hwaddr addr, unsigned size) { MemoryRegion *mr = opaque; - uint64_t data = (uint64_t)~0; - - switch (size) { - case 1: - data = *(uint8_t *)(mr->ram_block->host + addr); - break; - case 2: - data = *(uint16_t *)(mr->ram_block->host + addr); - break; - case 4: - data = *(uint32_t *)(mr->ram_block->host + addr); - break; - case 8: - data = *(uint64_t *)(mr->ram_block->host + addr); - break; - } + uint64_t data = ldn_he_p(mr->ram_block->host + addr, size); trace_memory_region_ram_device_read(get_cpu_index(), mr, addr, data, size); @@ -1368,20 +1353,7 @@ static void memory_region_ram_device_write(void *opaque, hwaddr addr, trace_memory_region_ram_device_write(get_cpu_index(), mr, addr, data, size); - switch (size) { - case 1: - *(uint8_t *)(mr->ram_block->host + addr) = (uint8_t)data; - break; - case 2: - *(uint16_t *)(mr->ram_block->host + addr) = (uint16_t)data; - break; - case 4: - *(uint32_t *)(mr->ram_block->host + addr) = (uint32_t)data; - break; - case 8: - *(uint64_t *)(mr->ram_block->host + addr) = data; - break; - } + stn_he_p(mr->ram_block->host + addr, size, data); } static const MemoryRegionOps ram_device_mem_ops = { From patchwork Mon Dec 4 15:25:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 750028 Delivered-To: patch@linaro.org Received: by 2002:adf:9b9d:0:b0:333:3a04:f257 with SMTP id d29csp1181016wrc; Mon, 4 Dec 2023 07:26:54 -0800 (PST) X-Google-Smtp-Source: AGHT+IGnCQLeXxaHfes+EH8wCQUZk8MEuYgKcN5P8VSSxFv805VQr5wMXIRTSFBM9rAKT67Nwh/S X-Received: by 2002:a05:620a:1912:b0:77e:fba3:8203 with SMTP id bj18-20020a05620a191200b0077efba38203mr5279638qkb.153.1701703614249; Mon, 04 Dec 2023 07:26:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701703614; cv=none; d=google.com; s=arc-20160816; b=MIBfOEVnnLLt988Id3qeamkkNljWojrLNQIPB4fJ19gB+6itzbf/AcEkOXU4gmjHFq 7xNvydmer/RruZO3GrjjaUa5b7qKC+cG90o08hORnbIEGWx2t1trcCpqC37oBRSVQxc5 zIq2Z53+AZresyFLg27jI/77GsfY7s6i0e5II6Ksch8P9bAOp3US6TrbERSeMj5WUTmG 7EnLS8WbhAoMA9Q8QJexg3awTHcHY1l6grZgTz9hwbiktQNuOqnXDQplpH3VXka2nIbN lvVHOznSRl0+h+2Zy+Rpy0wNtZ0ApA1N3s8RENLUoCeRRMNGvWzzFfDZQU1gdNJ4I3O0 l+zQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=hwIlmu7y+8erPdoR/Kkd+7013w7hW587KwHOvMnbXVw=; fh=QNnFQb4abKU6f942MKZnWycbxQeNBNBJPadQ7RRwiLM=; b=KFesX+ph4zcHQ8ZAAnluw7Fmf3nHDv6+6Tw6xfxBsbox8ElzJX+oK2IDDfB8HkZZtp DxpoAAuaQp/Lubthe89buGIT6cuXYQX8gKPgkbbGzYPjBKKdKVCDpq6yb2jKr5FIjmXL ehtuhvqNm1iHwVSTYjoP3ckUy7WAKtUkZ76rwPcIu0/uDXQ3f/ZqxtsuWF+2HrsZXyHU chszhsowAuiRdP5k9zYqBiqTbN8PflBJLCbHPiN9OK7BPGQTxeh/4ExEl+DDeqDucjUz ICp0/jylKrqUWWDizMX3NoAztFP00lp76zFEqsQPWPam/ZumOHv7bXtLAdo3Cqf/ahaH Ggog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="MB/sBipi"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id i21-20020a05620a145500b0077d7d37d036si9087553qkl.687.2023.12.04.07.26.54 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 04 Dec 2023 07:26:54 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="MB/sBipi"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rAApx-000450-Hs; Mon, 04 Dec 2023 10:26:21 -0500 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 1rAApp-00042I-0A for qemu-devel@nongnu.org; Mon, 04 Dec 2023 10:26:13 -0500 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 1rAApm-0005T5-6T for qemu-devel@nongnu.org; Mon, 04 Dec 2023 10:26:12 -0500 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-40c0a074e71so12517235e9.1 for ; Mon, 04 Dec 2023 07:26:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701703568; x=1702308368; 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=hwIlmu7y+8erPdoR/Kkd+7013w7hW587KwHOvMnbXVw=; b=MB/sBipiwkb23i9jGyz/FuzYzwo/tL9DvMx8tI32jrTb1hZbXDKQBKGT49F+B84bRw TNndYFi6jP1HjOHggS/8eEvinRohZZ8pWwjBjhrNT48HwqYl3rwuK0VliMh5+Sk+npK+ R+W+nbbdF4QDFcXPPIuSLnYM407qA2HPrlGW7amMpwdTNOCuLbZGNZIyG8ijvHzTh4KE IygEVVjkHodQVjwZJF0YFoBsfsysLk8dq10Sn+0Uqmf2r7bl/41pit2mk/6IqJsIdy/o 6zSTWiJRdsNx9Bg2wcBzhqFDTKPzu7ZlKJxK4E4LwmSlnrA8QeICKXDRYC/vkmvsHZs/ bsbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701703568; x=1702308368; 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=hwIlmu7y+8erPdoR/Kkd+7013w7hW587KwHOvMnbXVw=; b=xA/PlvLAnkJj7kkZe/FlHtaUnkwyLLQWJcpnU9Xz9ylXITUOcEq6Ju1jgrXHKpFXQe 8O0o1MAX2pczghB/eicpoT0oPfOdb7j+G3ySqG7LaZuxjZI7LOvFBPFLbmsvbe5hIu8x 1fjKDaNAI0U9G6XtjOBgn8CIGnEedPBYRK28PHJ/I1dQAaNx6aiYPr4jqh4izxJRt7HU 3mhBQzZclLnl1A2aSUofxEnFmhbbW3LEr8CJPycYwF1HKL8SgX5rEqld30POkcIj6QQ7 IDKZZbou6Roots4J8YMQY5kE++58Umr5vm6mJQDUwYyo3dKmjMXMnr2dlx5deE+x4ptm 7xQg== X-Gm-Message-State: AOJu0Yz3eI+tcOkfStu5D2HQwqrAO/uIdzdr830Eh8EEm3EUOhq9J2TZ 3Koz9/uJBRoai5vZXrUOYC4PwEhlpZjlLHPAYQM= X-Received: by 2002:a05:600c:354f:b0:40b:3645:4671 with SMTP id i15-20020a05600c354f00b0040b36454671mr3949699wmq.10.1701703568398; Mon, 04 Dec 2023 07:26:08 -0800 (PST) Received: from m1x-phil.lan ([176.176.140.35]) by smtp.gmail.com with ESMTPSA id r21-20020a05600c35d500b0040b3e79bad3sm15354298wmq.40.2023.12.04.07.26.07 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 04 Dec 2023 07:26:08 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-riscv@nongnu.org, Daniel Henrique Barboza , =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-Daud=C3=A9?= , Alistair Francis , Palmer Dabbelt , Bin Meng , Weiwei Li , Liu Zhiwei Subject: [PULL 2/4] target/riscv/kvm: fix shadowing in kvm_riscv_(get|put)_regs_csr Date: Mon, 4 Dec 2023 16:25:22 +0100 Message-ID: <20231204152524.37803-3-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231204152524.37803-1-philmd@linaro.org> References: <20231204152524.37803-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Daniel Henrique Barboza KVM_RISCV_GET_CSR() and KVM_RISCV_SET_CSR() use an 'int ret' variable that is used to do an early 'return' if ret > 0. Both are being called in functions that are also declaring a 'ret' integer, initialized with '0', and this integer is used as return of the function. The result is that the compiler is less than pleased and is pointing shadowing errors: ../target/riscv/kvm/kvm-cpu.c: In function 'kvm_riscv_get_regs_csr': ../target/riscv/kvm/kvm-cpu.c:90:13: error: declaration of 'ret' shadows a previous local [-Werror=shadow=compatible-local] 90 | int ret = kvm_get_one_reg(cs, RISCV_CSR_REG(env, csr), ®); \ | ^~~ ../target/riscv/kvm/kvm-cpu.c:539:5: note: in expansion of macro 'KVM_RISCV_GET_CSR' 539 | KVM_RISCV_GET_CSR(cs, env, sstatus, env->mstatus); | ^~~~~~~~~~~~~~~~~ ../target/riscv/kvm/kvm-cpu.c:536:9: note: shadowed declaration is here 536 | int ret = 0; | ^~~ ../target/riscv/kvm/kvm-cpu.c: In function 'kvm_riscv_put_regs_csr': ../target/riscv/kvm/kvm-cpu.c:98:13: error: declaration of 'ret' shadows a previous local [-Werror=shadow=compatible-local] 98 | int ret = kvm_set_one_reg(cs, RISCV_CSR_REG(env, csr), ®); \ | ^~~ ../target/riscv/kvm/kvm-cpu.c:556:5: note: in expansion of macro 'KVM_RISCV_SET_CSR' 556 | KVM_RISCV_SET_CSR(cs, env, sstatus, env->mstatus); | ^~~~~~~~~~~~~~~~~ ../target/riscv/kvm/kvm-cpu.c:553:9: note: shadowed declaration is here 553 | int ret = 0; | ^~~ The macros are doing early returns for non-zero returns and the local 'ret' variable for both functions is used just to do 'return 0', so remove them from kvm_riscv_get_regs_csr() and kvm_riscv_put_regs_csr() and do a straight 'return 0' in the end. For good measure let's also rename the 'ret' variables in KVM_RISCV_GET_CSR() and KVM_RISCV_SET_CSR() to '_ret' to make them more resilient to these kind of errors. Fixes: 937f0b4512 ("target/riscv: Implement kvm_arch_get_registers") Signed-off-by: Daniel Henrique Barboza Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis Message-ID: <20231123101338.1040134-1-dbarboza@ventanamicro.com> Signed-off-by: Philippe Mathieu-Daudé --- target/riscv/kvm/kvm-cpu.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/target/riscv/kvm/kvm-cpu.c b/target/riscv/kvm/kvm-cpu.c index 78fa1fa162..45b6cf1cfa 100644 --- a/target/riscv/kvm/kvm-cpu.c +++ b/target/riscv/kvm/kvm-cpu.c @@ -87,17 +87,17 @@ static uint64_t kvm_riscv_reg_id(CPURISCVState *env, uint64_t type, #define KVM_RISCV_GET_CSR(cs, env, csr, reg) \ do { \ - int ret = kvm_get_one_reg(cs, RISCV_CSR_REG(env, csr), ®); \ - if (ret) { \ - return ret; \ + int _ret = kvm_get_one_reg(cs, RISCV_CSR_REG(env, csr), ®); \ + if (_ret) { \ + return _ret; \ } \ } while (0) #define KVM_RISCV_SET_CSR(cs, env, csr, reg) \ do { \ - int ret = kvm_set_one_reg(cs, RISCV_CSR_REG(env, csr), ®); \ - if (ret) { \ - return ret; \ + int _ret = kvm_set_one_reg(cs, RISCV_CSR_REG(env, csr), ®); \ + if (_ret) { \ + return _ret; \ } \ } while (0) @@ -533,7 +533,6 @@ static int kvm_riscv_put_regs_core(CPUState *cs) static int kvm_riscv_get_regs_csr(CPUState *cs) { - int ret = 0; CPURISCVState *env = &RISCV_CPU(cs)->env; KVM_RISCV_GET_CSR(cs, env, sstatus, env->mstatus); @@ -545,12 +544,12 @@ static int kvm_riscv_get_regs_csr(CPUState *cs) KVM_RISCV_GET_CSR(cs, env, stval, env->stval); KVM_RISCV_GET_CSR(cs, env, sip, env->mip); KVM_RISCV_GET_CSR(cs, env, satp, env->satp); - return ret; + + return 0; } static int kvm_riscv_put_regs_csr(CPUState *cs) { - int ret = 0; CPURISCVState *env = &RISCV_CPU(cs)->env; KVM_RISCV_SET_CSR(cs, env, sstatus, env->mstatus); @@ -563,7 +562,7 @@ static int kvm_riscv_put_regs_csr(CPUState *cs) KVM_RISCV_SET_CSR(cs, env, sip, env->mip); KVM_RISCV_SET_CSR(cs, env, satp, env->satp); - return ret; + return 0; } static int kvm_riscv_get_regs_fp(CPUState *cs) From patchwork Mon Dec 4 15:25:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 750030 Delivered-To: patch@linaro.org Received: by 2002:adf:9b9d:0:b0:333:3a04:f257 with SMTP id d29csp1181274wrc; Mon, 4 Dec 2023 07:27:29 -0800 (PST) X-Google-Smtp-Source: AGHT+IHusOwSEhinyT/Ub6KkfBK0pV1YepCjYyxt0G5B4gcjhY15R8zb1hJuqyPDBjhDPwb8mJ5F X-Received: by 2002:ad4:42ad:0:b0:67a:ca49:4647 with SMTP id e13-20020ad442ad000000b0067aca494647mr1609876qvr.26.1701703647305; Mon, 04 Dec 2023 07:27:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701703647; cv=none; d=google.com; s=arc-20160816; b=QIxTPj68xyquzzNN36FLkIjqyk66S2wFf1qoV1C90lvXg4RV0sEwUktuBhmjkVZsdr OjRtrJvNKKgodJ2repv8NYH4GujzsetidqYmumbMlILVswR0hVQpuQ6Ij02qlcTUuTd6 Y8jClcf+VBTDHnBRWLfCr9F9G0ev99yvEOlxqFE59CTxg3oOjjkEZtOEerPmU5bljAKY SWIJZddWUiEYfIZCObxU/bDjd5c6sFaUU8ZbTKXuN1DR/Lc+4CcjXnT5gJowlLHMqGlP /whSYHbfEUwReUn5PbN0QgWxOX4Vn8XfydhBHzN/LZKDAKcgvLhlTK2gQs9bXsXtKNga eHFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=+FOPF54Ts8pAoe2u+mRITxVWTs2rKpGlxkYcxd5nZGU=; fh=HnT68X4OtrP0JfCm0CfcsYd20A/oK02Xg2AURQ1KFug=; b=Qrx6JTtr0I4UKrKXnwPYoi4YL/ZK5EcCikcpLO4EoS2MUjoux1vm7QCkwaaKiFt7nm U5WGWpFSuhAppfPMgaLbZG9mda4fpV7DGAvHCR5JFxcK7BELnBRQDue/5FY9KFt/hhXb IYpWUhDkhCx0iKoQoeA0CJzW0XGFUoVJQNm3MqoiQ+FjrCAYgTs8oVnMMytqo0YYk15R wrIjYe8Xvxa5fT7mt6R9TwuAqO9ngUIOGzyQWOP8JDA6n54RW0E63xOtoeSsK+XfhYtm dP4iGILU5HJCCq9vkwWeoosqfKZrSrmNIBoJ9CL9FpcgHx6tpEnUIPpJnF8ng4iZqTW4 letw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=unhO0vPO; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id gv13-20020a056214262d00b0067abb4992absi3717719qvb.212.2023.12.04.07.27.26 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 04 Dec 2023 07:27:27 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=unhO0vPO; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rAApz-0004Bu-JL; Mon, 04 Dec 2023 10:26:23 -0500 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 1rAApt-00044g-JV for qemu-devel@nongnu.org; Mon, 04 Dec 2023 10:26:19 -0500 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rAApr-0005Ua-Nm for qemu-devel@nongnu.org; Mon, 04 Dec 2023 10:26:17 -0500 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-40859dee28cso45795295e9.0 for ; Mon, 04 Dec 2023 07:26:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701703574; x=1702308374; 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=+FOPF54Ts8pAoe2u+mRITxVWTs2rKpGlxkYcxd5nZGU=; b=unhO0vPOPsQV3moEqnMZVbwn65CO8XyEKgM1NzWHs7HilesFr6SPvFpUvCdDufLrNT /eaaiUedKax2jnR5Hk2IyZXTBQqXLGvtbIA85mM+ELvKVI0bFeurBZTHXkodpvDWQ1/S LCMSVM2Rh2gQNY4YY9UxnSeWggU1KTFWdKYuv23raIZ/ZT6W5udpQzfASrtakXvoma1v YrBJp+Bs6QcOZ6dG3Zf0Yc+rw+rlwJAZWd89CJXlF9buTBaZ6rm8EALCH5Z9aDzFwUHZ VvOdG9quBLkb3UglbFFBy2xaAaeHyySxhnxTy3mo50lOpEN8iMwZR420Ni+uwa60LdzN 0XNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701703574; x=1702308374; 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=+FOPF54Ts8pAoe2u+mRITxVWTs2rKpGlxkYcxd5nZGU=; b=bNSNpL5xQQ83QwE0Ms39GmvU9MdIPebcHPzkypyPkY0qcnXIwJItJMSch/Zghnizmq 7AkdMBvf2LWpgxraisUaQri5hJHQm0IdNoYg+8hpL6DSwGXVOfVoNz7gfuQS/oYLgyju CrGQiA84N2NBbgrxOWSojUlb3ZY8yRNwvKCzGnGXHYR7NHoKXQA6SNlvH/i5fGZjv081 p9MGVKcIMCb/ASjvfbqZjjNYpEOtE/jDEwMv5cQ5KC71QQKq88/U47OxNGYZn3PFSZvc 9cfVgdNhJYLtbJUz49GrKqUAolENkrE4x3D/SaC7qrzA9/rbRtz/HB+tbS88q3+Isy/+ 8hig== X-Gm-Message-State: AOJu0YzeZPxzjcSIUC9rbKUFne1xYB2LJQ3SQehEZ5HBvaBAYXcohBap lTqdRbgLUrEB9mCWZz+paOe6l29HQFZLbD1lQn8= X-Received: by 2002:a5d:60cf:0:b0:333:3c99:7d28 with SMTP id x15-20020a5d60cf000000b003333c997d28mr2476076wrt.75.1701703574003; Mon, 04 Dec 2023 07:26:14 -0800 (PST) Received: from m1x-phil.lan ([176.176.140.35]) by smtp.gmail.com with ESMTPSA id j19-20020a5d6e53000000b00333423ffcd6sm4629412wrz.51.2023.12.04.07.26.12 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 04 Dec 2023 07:26:13 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-riscv@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Thomas Huth , Aurelien Jarno , Cleber Rosa , Wainer dos Santos Moschetta , Beraldo Leal Subject: [PULL 3/4] tests/avocado: Update yamon-bin-02.22.zip URL Date: Mon, 4 Dec 2023 16:25:23 +0100 Message-ID: <20231204152524.37803-4-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231204152524.37803-1-philmd@linaro.org> References: <20231204152524.37803-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=philmd@linaro.org; helo=mail-wm1-x32c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org http://www.imgtec.com/tools/mips-tools/downloads/ redirects to https://mips.com/downloads/yamon-version-02-22/ then points to an invalid path to a s3 bucket. Use the correct path. The site will eventually be fixed. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Message-Id: <20231201205630.10837-1-philmd@linaro.org> --- tests/avocado/machine_mips_malta.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/avocado/machine_mips_malta.py b/tests/avocado/machine_mips_malta.py index 99bee49e9a..8cf84bd805 100644 --- a/tests/avocado/machine_mips_malta.py +++ b/tests/avocado/machine_mips_malta.py @@ -128,8 +128,9 @@ def test_mips_malta_i6400_framebuffer_logo_8cores(self): class MaltaMachine(QemuSystemTest): def do_test_yamon(self): - rom_url = ('http://www.imgtec.com/tools/mips-tools/downloads/' - 'yamon/yamon-bin-02.22.zip') + rom_url = ('https://s3-eu-west-1.amazonaws.com/' + 'downloads-mips/mips-downloads/' + 'YAMON/yamon-bin-02.22.zip') rom_hash = '8da7ecddbc5312704b8b324341ee238189bde480' zip_path = self.fetch_asset(rom_url, asset_hash=rom_hash) From patchwork Mon Dec 4 15:25:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 750029 Delivered-To: patch@linaro.org Received: by 2002:adf:9b9d:0:b0:333:3a04:f257 with SMTP id d29csp1181257wrc; Mon, 4 Dec 2023 07:27:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IFlCKJEfoKs3i+ROQ/Quc8REv96nSq84KNR2wKJ7pUaGTdnYZ6c9HVWf88Zvyl0KCND9yPj X-Received: by 2002:a05:620a:8c11:b0:77e:ff19:932e with SMTP id qz17-20020a05620a8c1100b0077eff19932emr4215356qkn.26.1701703644905; Mon, 04 Dec 2023 07:27:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701703644; cv=none; d=google.com; s=arc-20160816; b=o1L1kVIMG6t3M+Y58Vv7wmF1mDjV3Mm4E6w4/DkjDtV+wOC2eFsH6FBdf5Eu5d/9AW m95eQx/WLwdiV/bjmgpnQ2FsQRRFAh7WnSqwRV86E6uNRJ1IvOjumu+0QkDFJsmFU4rp dND7oiXZCKdWHt/qa8FR+MWPj13MvF0KZtTJbWTfRtlWOVH37XJQastvycvDJIuOz3BC yXqCUCidqprowGxYCoLAs5HMQtCbp1phwpjcP40umDG45l5NLCnS6YdI9DxFBiq83XQt jUsh3VZPiHtJuHfoD5/zg20IhHNndn0fWHBUNpcm4c5qmiO+g75rBJ4yRW64495I1ewr Sx0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Mc/WowXZKK7/TX1A9Zcf22gua9+ILUXdw0tlS4dSjm8=; fh=UMsi/y+K82fq9QvgcS0c3KXwToQ958azSE7f2NNGZr8=; b=XZNMsDavY7zaWtuL9zH7ry6l365b5gQHhHYXUyltZAbf9HYJ3SDZPcualsLTc7HSum vJgzJM+83jFQUn+hnbJ47RQqJU0550/I1PqPFIVZOAKqqWNgivQm1fqKTrQx73dGVo2c 8O2LCP32vk8Cj687AgD8Au6m26qwCLRqCX3zvpWLALzJk4l7uOAbT7rC7X5XE2P+A2hX LPw28RRi5GO3CZtDti72AFU/kBJyACeONR09U2eDHwZPBV8vSzL5dWSLngPEHAZl7CB2 0LuO4LVDwJNgXAbwBIWg46n82adeBSlLS1CPCi7ZjPsQkOh0IE8xrzENQ+95+TW3CTps g7hQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kP4bBJfg; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id m21-20020a05620a291500b0077f0145090bsi4782962qkp.420.2023.12.04.07.27.24 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 04 Dec 2023 07:27:24 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kP4bBJfg; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rAAq1-0004Fc-GW; Mon, 04 Dec 2023 10:26:25 -0500 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 1rAApz-0004BG-Bn for qemu-devel@nongnu.org; Mon, 04 Dec 2023 10:26:23 -0500 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 1rAApx-0005Ys-7y for qemu-devel@nongnu.org; Mon, 04 Dec 2023 10:26:22 -0500 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-40c08af319cso17433395e9.2 for ; Mon, 04 Dec 2023 07:26:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701703579; x=1702308379; 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=Mc/WowXZKK7/TX1A9Zcf22gua9+ILUXdw0tlS4dSjm8=; b=kP4bBJfgiDaAns7ZPWOng4eKwj8M84b99wi/LaEiEeEJVtzEKorQjCfymII3ePmTi7 MtRt4p4pXRTBQjPYgCdZDT1qGso44cu1OEh5d4pKTcteNPZmZRIOPGqw9JiY+5JqDxe7 QcNuPq/+XUgdonY6ZJ9j4r/oqAvxSv40utKrxow0SNI9jtj/PVioIDVi6/EHy3jmgmIW WpKA0ZJWgI69tp2L00IiGdOpAnDpPuD3a/tjn/lAYgtgc5kAENzTvzji6/1egNlji+dV yOn6qh1wJbp6nm88T739gGqfkwzJpwcXGLNBmSh/5GCZTf5BrRmJgC3mNb4Z4A+W+nAd 9Plw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701703579; x=1702308379; 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=Mc/WowXZKK7/TX1A9Zcf22gua9+ILUXdw0tlS4dSjm8=; b=X9y3W6XgzYnEvwbbBOKLFtwwt8RFoITWAB3DwS+GO6tPHX7hYTdP2tK7KvOOBD+koa 5go4fn3oH3wEp/fgyMhA6n0lPVoRMOo7IyryigE+POPXpDUnsq2pTK1fB3NRnTI55sE1 3LTHYJdArf2NkZiwVqo+gRuaMKownRIMlY3vAHSIrRIA3EDw7uDkBGXn808Puo8440Tv wf9E58WT6MQ/9OthVAi184mHx5pKdpto082SJU0gURdsC9lZkeKvN7dz8pZCFjIshGFl ZOMwPOIR4IQNyxoqLlIGumKsL6fJ8WsvRTLZkamzu5X+1DlICc5ULJIpSncOpLMvI2VZ R68g== X-Gm-Message-State: AOJu0YxwsziONdfRRApExQpXhJwDRSBNBNUqJjBjZIr/6j2u15l2Qu11 oaKkvnkMgGxklumImS/n6QdnwajZIN8/wCXE/YQ= X-Received: by 2002:a05:600c:b45:b0:40b:5e21:ec27 with SMTP id k5-20020a05600c0b4500b0040b5e21ec27mr2617623wmr.89.1701703579710; Mon, 04 Dec 2023 07:26:19 -0800 (PST) Received: from m1x-phil.lan ([176.176.140.35]) by smtp.gmail.com with ESMTPSA id u8-20020a05600c19c800b004030e8ff964sm19132875wmq.34.2023.12.04.07.26.18 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 04 Dec 2023 07:26:19 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-riscv@nongnu.org, =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philippe_M?= =?utf-8?q?athieu-Daud=C3=A9?= , Pavel Dovgalyuk , Paolo Bonzini , Cleber Rosa , Wainer dos Santos Moschetta , Beraldo Leal , Jiaxun Yang Subject: [PULL 4/4] tests/avocado: mark ReplayKernelNormal.test_mips64el_malta as flaky Date: Mon, 4 Dec 2023 16:25:24 +0100 Message-ID: <20231204152524.37803-5-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231204152524.37803-1-philmd@linaro.org> References: <20231204152524.37803-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Alex Bennée I missed this when going through the recent failure logs. I can run the test 30 times without failure locally but it seems to hang pretty reliably on GitLab's CI infra-structure. Cc: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20231201201027.2689404-1-alex.bennee@linaro.org> Signed-off-by: Philippe Mathieu-Daudé --- tests/avocado/replay_kernel.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/avocado/replay_kernel.py b/tests/avocado/replay_kernel.py index af086eab08..c37afa662c 100644 --- a/tests/avocado/replay_kernel.py +++ b/tests/avocado/replay_kernel.py @@ -119,6 +119,8 @@ def test_mips_malta(self): self.run_rr(kernel_path, kernel_command_line, console_pattern, shift=5) + # See https://gitlab.com/qemu-project/qemu/-/issues/2013 + @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable on GitLab') def test_mips64el_malta(self): """ This test requires the ar tool to extract "data.tar.gz" from @@ -134,6 +136,7 @@ def test_mips64el_malta(self): :avocado: tags=arch:mips64el :avocado: tags=machine:malta + :avocado: tags=flaky """ deb_url = ('http://snapshot.debian.org/archive/debian/' '20130217T032700Z/pool/main/l/linux-2.6/'