From patchwork Tue Jan 9 18:09:28 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: 761068 Delivered-To: patch@linaro.org Received: by 2002:a5d:6e02:0:b0:337:62d3:c6d5 with SMTP id h2csp1496221wrz; Tue, 9 Jan 2024 10:13:03 -0800 (PST) X-Google-Smtp-Source: AGHT+IGHHy7MJRs3FfMps5wmhl7RhhLSUkBE3DbmsQIViwdW1oK32A+KJGVK6fzAUU9OZe01KQNP X-Received: by 2002:a05:622a:1a82:b0:429:8a55:9d72 with SMTP id s2-20020a05622a1a8200b004298a559d72mr6010605qtc.81.1704823983036; Tue, 09 Jan 2024 10:13:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704823983; cv=none; d=google.com; s=arc-20160816; b=d6v4ToiLDWshSP3V2DNVnyXtl+WGTSv4vQzS9dK0UXmc/LuEJk3HpyBKrtYLsiqzEc /5m9Ak59wGVHf6mip1DsVyHBhUrn/hIbtFJZBxI96dlrdQvBga/vJaf8+N2Hkb9CBQEF h4+z6reC4z2E5Ulm3QCxOzC9UPAjUzJBo/hzVZ9+V8ITKkLsGTLrnvrqPs/LtNedfwRI EUZc7+KicxNVtQt1z7muF5UhMjPL60UkSB7SNu+wTHgPZ/mFHb7+Ml7r3nwlrpGAD9b1 Fae8JADNNRFdxB5ruGaTEDgCzVSwjgyoFemFOL0lpnLrVQ3lAo4tz/JyotdvLHGCCRqJ rC+g== 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=TTZBSvKw8jVi+klzEjHlnxZcbayvqCJEGNzo5jVRjUI=; fh=v69mdd+nxs/0WeTIWzLZOPCx0ynE2o0vtvId2fSwkBY=; b=HQs+TI3GHaqLTHxUAt2mJJj9MII85cLucnq5byhaqDFnY6ryUxwulc9mi6Pl2e29ym SzliS77rCgJEXnXmchVhCWtfK8mg5kEC81qW9dShfUv09yBfvL8Fqg5lpYGw8BPdpTGI Bni8zR4NOmzpK6PzjaoAJy6QWNaeareuCeICt1WasO+GbqoLTb/Q+8jc3G/2SNmwhGPx aIkbek+b7aF+BYPHtuC6RdS8O+u1sXc2jKOK0O2yIxCp6V5tC7aJRpsLVvWtRXLLlGBD p+T2aOOyH9QfylzvfL9dbjOzqgmx/yIEhgqFabqGT5PJyd81x/THSbSQJumrQ4Sv8h7d MzRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CDLUhKRA; 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 i17-20020ac85c11000000b004236e9c2deasi2548802qti.114.2024.01.09.10.13.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 09 Jan 2024 10:13:03 -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=CDLUhKRA; 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 1rNGZL-0004kD-TB; Tue, 09 Jan 2024 13:11:19 -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 1rNGZ6-0003cL-L3 for qemu-devel@nongnu.org; Tue, 09 Jan 2024 13:11:05 -0500 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 1rNGZ2-0004VS-5W for qemu-devel@nongnu.org; Tue, 09 Jan 2024 13:11:03 -0500 Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-3367601a301so3088135f8f.2 for ; Tue, 09 Jan 2024 10:10:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704823857; x=1705428657; 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=TTZBSvKw8jVi+klzEjHlnxZcbayvqCJEGNzo5jVRjUI=; b=CDLUhKRAHOtJORJkE1WJwN/+s2GrVQ46yPcW3hvoEAefBkv3hmMbYwAmw7aQ/9/r8Q KO1AvcnA6kR8Cj6O4YLJyUm8bvjhi9fHUSvZzCoHEpCr7QtiajgGyZYNBkUFjr57cUxN dRn+cyilZkLH4/vuX54YOLEUI4PAaSbmvoU5hKnx5Wq4k+gqjrDkbmxSC3OXMA432KDJ ninyLSaebENaY75D/+Xz+luZFovRgZMxK8n1iQQyB4GaWoviIY3G9fqNmkCa6BVTau2p EZLF/eMrbjzhxrXXD8CZStxv5118KgjYZFO34f9rzvhke0e03EpSjMhLsJzMm67NT1NV yApw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704823857; x=1705428657; 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=TTZBSvKw8jVi+klzEjHlnxZcbayvqCJEGNzo5jVRjUI=; b=C2knWI9so6x//XTv+ZWV77yQFHF+FJe5vlwY4FAyGYVTM7uw4hgfSbujli/vHiR78i SfHF/qNOFoDkgiViSjNeIXhCaDmTY9wgdah2FECR2VFla4fC0+LUGXscgWKAafAbE5ks gMErhS1nOCKTFLVH2K5bxDiWMb0Eb2Hn3UAkTVFBKHEeUPaTleRpOirvRtZVVxZHUMub cAAfnrMQppDznKcypoUvec6bqqucp3qlzKTY4naPbVJ1O0RnlUpTFVCKGrqi9DrRbdFH MbtKdJmXs/knX207AWm/nf2xc8uxHQthECEuH6ay+GLoKAOjiVCSL9ySmsWlmYBktpDW ad6A== X-Gm-Message-State: AOJu0Yyi/CzgfN5XHzVfBdakdI7BANOPpVfMWOk+c5Nw3q4Bl7OLwE+n E+I6135l3iySe8mlrnpzNqWpysUCcaw4ms4rsqb1ECivpLqwZA== X-Received: by 2002:a5d:50c3:0:b0:336:8940:c4e1 with SMTP id f3-20020a5d50c3000000b003368940c4e1mr475893wrt.30.1704823856733; Tue, 09 Jan 2024 10:10:56 -0800 (PST) Received: from m1x-phil.lan (rsa59-h02-176-184-32-47.dsl.sta.abo.bbox.fr. [176.184.32.47]) by smtp.gmail.com with ESMTPSA id p4-20020a5d6384000000b0033760ad2eabsm2966695wru.69.2024.01.09.10.10.55 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 09 Jan 2024 10:10:56 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, =?utf-8?q?Alex_Benn=C3=A9e?= , Leif Lindholm , Radoslaw Biernacki , Kevin Wolf , Markus Armbruster , "Edgar E. Iglesias" , Igor Mitsyanko , Rob Herring , Alistair Francis , Peter Maydell , Marcin Juszkiewicz , =?utf-8?q?Philippe_Math?= =?utf-8?q?ieu-Daud=C3=A9?= Subject: [PATCH v2 13/14] hw/arm: Prefer cpu_isar_feature(aa64_mte) over property_find(tag-memory) Date: Tue, 9 Jan 2024 19:09:28 +0100 Message-ID: <20240109180930.90793-14-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240109180930.90793-1-philmd@linaro.org> References: <20240109180930.90793-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org The "tag-memory" property is added to ARMCPU when the A64_MTE bit is set in the feature ID register. Rather than checking whether the QOM property is present, directly check the feature bit. Suggested-by: Markus Armbruster Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/virt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 6d1cb24a6e..2ce4a18d73 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -2189,7 +2189,7 @@ static void machvirt_init(MachineState *machine) * The property exists only if MemTag is supported. * If it is, we must allocate the ram to back that up. */ - if (!object_property_find(cpuobj, "tag-memory")) { + if (!cpu_isar_feature(aa64_mte, ARM_CPU(cs))) { error_report("MTE requested, but not supported " "by the guest CPU"); exit(1);