From patchwork Fri Apr 7 18:51:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 671026 Delivered-To: patch@linaro.org Received: by 2002:a5d:4d08:0:0:0:0:0 with SMTP id z8csp470475wrt; Fri, 7 Apr 2023 11:53:15 -0700 (PDT) X-Google-Smtp-Source: AKy350ZNFqqMkPhIRmir9zrRzpRQLpr/jy5eX1N4tNvMl2nxj9NdUdIWxM36MJ4pl54T1gC6/d5q X-Received: by 2002:a05:6214:29c5:b0:5c9:a0ce:df0c with SMTP id gh5-20020a05621429c500b005c9a0cedf0cmr165459qvb.22.1680893595432; Fri, 07 Apr 2023 11:53:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680893595; cv=none; d=google.com; s=arc-20160816; b=UX/oLfPqVo/jvfHYUpTROIDgtfu8rKrBCK9nBGnhf/RMMKUGAEFuDJMoTAGHM92R8X VqPXgCZCuR1jQVrW7LCW0SyPPp13P6z2PyU9xd2G/BHjEE/zK2x0+O9i2Ls0t2XHZUeA AmE/2lK9ltKxRZek3m5kY5EPok0711LBg8N3yrHCUDdk/F2Rq5O+guWVlvKz9J6TgkkD O5rgcHPb0mYAAGOmUg9FibMKsJCulRMd447AVkemoJdQu48Y5gFjbNTdXUyJClXHR1vc u+SVvGemTHm6nA3d/QUrQhADV5IYLh+vnoEPiAdloKfC5FLUYbMQ4ofZDYAdLvXhVhdx Gi/A== 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=zTH6CuxWrs3z8O8UOxqSLGt5vbpCwQ7b4HezyRm7T4A=; b=xQJkdVEC+1iich0JgwXH7Y05xs6FPvotQKktqHpeZG6Ptxe2cqic2hQ4Bnq6OSj4Oh MCVMJA/lnhEdMGjOwNLDaFrVBzFrwghMxt6wqitau+V4th/tpMRC7ueC347zxj8jTHsh luZSjEKRZ2AtlIjusfX2k9h+6HHrvj/Sd2LjfWC9ugy7Pn0yxUaEfJ2H2ovWr8jGssFn VHBXiJyDdOfQi0JUcdh5QOlylVBAQhF99rLzmWuZ3762TjAG/iKlKoNWm96VWYVSd1iX 5Z2mjpC6199KO7Rod0JK7ur7UyCjS6gQzk16rE3Fluh5bE5ExQTdEM1384geq3Sd8ZMF 19Ow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ITvzG9Z+; 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 d12-20020a05621421cc00b005e7b68e9a45si2076915qvh.165.2023.04.07.11.53.15 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 07 Apr 2023 11:53:15 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ITvzG9Z+; 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 1pkrBn-00053L-9j; Fri, 07 Apr 2023 14:51:59 -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 1pkrBk-00052K-MY for qemu-devel@nongnu.org; Fri, 07 Apr 2023 14:51:57 -0400 Received: from mail-pj1-x1035.google.com ([2607:f8b0:4864:20::1035]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pkrBh-00087V-GV for qemu-devel@nongnu.org; Fri, 07 Apr 2023 14:51:56 -0400 Received: by mail-pj1-x1035.google.com with SMTP id go23so2421044pjb.4 for ; Fri, 07 Apr 2023 11:51:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680893512; 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=zTH6CuxWrs3z8O8UOxqSLGt5vbpCwQ7b4HezyRm7T4A=; b=ITvzG9Z+LfxLtCWv+7OYOSLDXxlkY8q+kL4+VK9C+PMjZOajRxHU4m69Y/93/zgTup 826AdLSBxO0ooW5RbEJipPGx+st8cOZEHSRuaWJirNUxt5yDWS279QDUvou1WwQsIQaC 3fOg6ijoh06WxWF3BA2ohVHCPa1uiGhYEbSFKMlXcoqOzHaybMjQvtfHPSF673l2QUeY F8ZKrPG+GfbXvJfs+qCNtacBI/NRgPZogRzHv9rQq3Q9wekgeQoSrCny6GRA+RY033Ox CLyzS0IxHtaMwNL/nyKPnYCth8fzoJY15Atm0eZM/FUj53PdKqpyFIwmuveQeg59CdSx Gl9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680893512; 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=zTH6CuxWrs3z8O8UOxqSLGt5vbpCwQ7b4HezyRm7T4A=; b=6r4ME0zVwR3ggXBJBSyguiTKKAISRV4xTCaMY4UQP/9xQsYDjELEEO7kd1KPRQgU32 +IT6ls3347w0IanTed7Y/Ui+b25dwnsjrXj9H7xQmQGN8TFP5r6WucvF6MQFki/6L2gr 9Ui5GtpBUXqEmfZHqapAU4jWr46pxgVMuB4WCj+PVRi6Hl4afFAgMZ9cg3e3wknE3nu4 zzsNhj3Al3EQgWmAc7uENgcB/WuiUhcTsXwgMptAfUQ2VOmCpKBhiVGc3yOTgAPuWP8h Ji1Bk99BbDDzL8Ujfxtxzb8u4WtnIibg4lAgXvfoZ13i6EWG9OYRiqzu4P6Dgk/Y3Wq4 ehMQ== X-Gm-Message-State: AAQBX9ene9KA/JNAUBDEsO+KU7RgTvQ0P6F988+g+F+kUKBnV+c8l/AE 1ZN4MJ0it6B3h/8geqK5iVAd8gWGMceu0wh5xfU= X-Received: by 2002:a17:90b:1802:b0:23f:9d83:ad76 with SMTP id lw2-20020a17090b180200b0023f9d83ad76mr3342835pjb.23.1680893511990; Fri, 07 Apr 2023 11:51:51 -0700 (PDT) Received: from stoup.. ([2602:ae:1541:f901:8bb4:5a9d:7ab7:b4b8]) by smtp.gmail.com with ESMTPSA id v4-20020a1709028d8400b0019c13d032d8sm3205796plo.253.2023.04.07.11.51.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Apr 2023 11:51:51 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org Subject: [PATCH 2/2] target/arm: Copy guarded bit in combine_cacheattrs Date: Fri, 7 Apr 2023 11:51:49 -0700 Message-Id: <20230407185149.3253946-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230407185149.3253946-1-richard.henderson@linaro.org> References: <20230407185149.3253946-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1035; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1035.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org The guarded bit comes from the stage1 walk. Fixes: Coverity CID 1507929 Signed-off-by: Richard Henderson --- target/arm/ptw.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/arm/ptw.c b/target/arm/ptw.c index 58a6de09bc..6d72950a79 100644 --- a/target/arm/ptw.c +++ b/target/arm/ptw.c @@ -2576,6 +2576,7 @@ static ARMCacheAttrs combine_cacheattrs(uint64_t hcr, assert(!s1.is_s2_format); ret.is_s2_format = false; + ret.guarded = s1.guarded; if (s1.attrs == 0xf0) { tagged = true;