From patchwork Fri Jul 14 17:43:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Henrique Barboza X-Patchwork-Id: 1807946 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=ventanamicro.com header.i=@ventanamicro.com header.a=rsa-sha256 header.s=google header.b=gOk/fbGP; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4R2f4b6vtsz20c1 for ; Sat, 15 Jul 2023 03:44:47 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qKMpL-0004YT-CF; Fri, 14 Jul 2023 13:43:35 -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 1qKMpJ-0004WD-Oj for qemu-devel@nongnu.org; Fri, 14 Jul 2023 13:43:33 -0400 Received: from mail-oa1-x2d.google.com ([2001:4860:4864:20::2d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qKMpB-0003SN-2S for qemu-devel@nongnu.org; Fri, 14 Jul 2023 13:43:33 -0400 Received: by mail-oa1-x2d.google.com with SMTP id 586e51a60fabf-1b732335e41so1702451fac.3 for ; Fri, 14 Jul 2023 10:43:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1689356604; x=1691948604; 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=jbIXk+TmeIYyzefMBhjUOpovsmWL5FT1431BO4OvqSc=; b=gOk/fbGPNkM2if4Ljt3s8km350nd+SIbi/aOTvLAcB8biKqpGebZ9u9jpTmRqbfNme hJHzdV+oTLYv1ax7woWRtkJ7d460N1Ef4gJoWN3YVWrKf3FIwH2iIT9VEqkb9Cis6B9I CY5n/q+lNX5rSrLAya2Wd/RIMNkeVX1xNSksi/l+/GcJDfkoY5oAg2O1LaqzCsY2rcLi dimc4dOsmmXgyBX5ikcOEq1BT7uQMaPL+InWaSiK23YzwvQKGgxiFXVWldrYRCPlFaKb J7xHRfaFMC9gbhtvcWUcPs7JzoEIDYwykPIq/axEAKOKAlUVLcAjs8iNGLNQ4m650CeX eaMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689356604; x=1691948604; 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=jbIXk+TmeIYyzefMBhjUOpovsmWL5FT1431BO4OvqSc=; b=EF0by1l7CUmSz1vL1SUMg3LEN8/h2Sp3Hhgo6CCoWM0l/0NZaA9kk4spYNkyEvMZSi qENVof3hr1Ca1ZSK2i5ynIpe8iikneIMm4fmgiteTDgXvdSzf75uYlqHyZEL6nYOjqJD PcvUQm6yGHIbMEs5pv2KMgD0u5m+g/BQd+6L7LU4Hq/FoiA8sKkBccuYJAASy/cs7BEi D3LWtSyom1przMeWlkmI6WwFUi0GUKihrQb5mOfmc2FIWQ4XIxGlaUdTv7Fd9qLMlb8y 7WDxQghMK3YLtn/sKNLPk2y4z9TZIbPorvFKbzMre9wSA/nl3sFLtAM04l5/8tqhEYbG dMvg== X-Gm-Message-State: ABy/qLaW0MMZSuArhxGqaB5z0ezbcGhqM36pgPwWVgiIFnjm93Env4q+ KXznvoTvY4iMQp2EQ7tpMaDqw+FZs300YgRaS2k= X-Google-Smtp-Source: APBJJlGYDRy32XQye9/IBlylgPhBrDNBE6IYZYpM+Mr3v2vAXrgjoac+XkqQ++pFlKATHaxPc/HbSA== X-Received: by 2002:a05:6870:4727:b0:1b0:89e4:e260 with SMTP id b39-20020a056870472700b001b089e4e260mr6321359oaq.19.1689356603806; Fri, 14 Jul 2023 10:43:23 -0700 (PDT) Received: from grind.. (201-69-66-19.dial-up.telesp.net.br. [201.69.66.19]) by smtp.gmail.com with ESMTPSA id dw18-20020a056870771200b001b05c4b3b3dsm4240968oab.31.2023.07.14.10.43.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Jul 2023 10:43:23 -0700 (PDT) From: Daniel Henrique Barboza To: qemu-devel@nongnu.org Cc: qemu-riscv@nongnu.org, alistair.francis@wdc.com, bmeng@tinylab.org, liweiwei@iscas.ac.cn, zhiwei_liu@linux.alibaba.com, palmer@rivosinc.com, richard.henderson@linaro.org, Daniel Henrique Barboza Subject: [PATCH for-8.2 v3 2/8] target/riscv/cpu.c: skip 'bool' check when filtering KVM props Date: Fri, 14 Jul 2023 14:43:05 -0300 Message-ID: <20230714174311.672359-3-dbarboza@ventanamicro.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230714174311.672359-1-dbarboza@ventanamicro.com> References: <20230714174311.672359-1-dbarboza@ventanamicro.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2001:4860:4864:20::2d; envelope-from=dbarboza@ventanamicro.com; helo=mail-oa1-x2d.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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org After the introduction of riscv_cpu_options[] all properties in riscv_cpu_extensions[] are booleans. This check is now obsolete. Signed-off-by: Daniel Henrique Barboza Reviewed-by: Alistair Francis --- target/riscv/cpu.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index 3b49a696ed..b165ecfcba 100644 --- a/target/riscv/cpu.c +++ b/target/riscv/cpu.c @@ -1905,17 +1905,11 @@ static void riscv_cpu_add_user_properties(Object *obj) * Set the default to disabled for every extension * unknown to KVM and error out if the user attempts * to enable any of them. - * - * We're giving a pass for non-bool properties since they're - * not related to the availability of extensions and can be - * safely ignored as is. */ - if (prop->info == &qdev_prop_bool) { - object_property_add(obj, prop->name, "bool", - NULL, cpu_set_cfg_unavailable, - NULL, (void *)prop->name); - continue; - } + object_property_add(obj, prop->name, "bool", + NULL, cpu_set_cfg_unavailable, + NULL, (void *)prop->name); + continue; } #endif qdev_property_add_static(dev, prop);