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 94E19D339AF for ; Mon, 28 Oct 2024 18:01:00 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t5U2f-0003Oa-35; Mon, 28 Oct 2024 14:00:37 -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 1t5U2c-0003OE-Ac for qemu-riscv@nongnu.org; Mon, 28 Oct 2024 14:00:34 -0400 Received: from mail-pl1-x62f.google.com ([2607:f8b0:4864:20::62f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t5U2Z-0001Hu-Rn for qemu-riscv@nongnu.org; Mon, 28 Oct 2024 14:00:33 -0400 Received: by mail-pl1-x62f.google.com with SMTP id d9443c01a7336-210e5369b7dso7095795ad.3 for ; Mon, 28 Oct 2024 11:00:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1730138428; x=1730743228; darn=nongnu.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=b0rW5l2XZ6Nw2fu/nZcpUdxNW/V8lTRBDsOwCDhO4vM=; b=OKZjCbpWKlrMXxNhohWQh8C+nPQcrKLGhu5m5jD5ajbe+aSM1vcyBxtZNik1BBA/e7 jv5OGr4lCM0usIh2wE1qBzsHA7u9eOCGGh8veP+pCy++44uoYpcr4Czt8Z4DcsG0g/O9 3ndPxs5Xt0H5CCLRP87d6KOabmUFVgBZjVcf9TlUz/KRD2Xg2K2qR2Zv/t8rcbyUvvmZ WpEQebcdniFq8u3BYyvn+7SAe1WXgJ8y5aHqlBI+yMN5HfrlLQWea73tgmhB/6Y3mVwW Quwu+KKzo1Hs5m56o5jfkuPQk3lyr2itw8RKQV9h5CSs3rW4OzRtC3EIl/KFpOEUCJTW qCUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730138428; x=1730743228; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=b0rW5l2XZ6Nw2fu/nZcpUdxNW/V8lTRBDsOwCDhO4vM=; b=N7RvCzWLGQPmzYMrx28HI3Z70rSOfpc9i0T/AsDNAswRF0qdAUlo8a5XwNgjLwc5xX jMJZ/rMYvPeFJjZt0+lDyQpqsptoKNG+mFMrTJfIBnOGTpnXwP3bELsM0etUCh5lO6gG AUD7BfTgL7kLwot0O7TpoIQuLsmX5xfBGL+rmQ00/sUO0Zeqz6IMF1bk3dUkCT0X30Xi 5Kx/PdP+lUZz2+mqV/yVayfwMxAweueHpfhA/n9ieF7J4XLEfaEP+9zpMJIkqZbPZHSL 1Lj/pX4WCimxrE9j5fyFnYC2LT3SmPNjO98q+p0WBbdAk8ISuL5YDZWRmsPyk81+sKFh Ineg== X-Gm-Message-State: AOJu0Yy60sKH8qMDjTZ6aeCyjHxsmwChG99NRN6S2UfsYIC0iVahdPGY YpXAVvgJjTMeYpzJkRKb6UiufdaTZLR9tw1osCkZad640r/2WZtIkMrnYiHwi5w= X-Google-Smtp-Source: AGHT+IFnATb/+FAwNaLpgWCyPgmeYbk/TYlvB5aqkNF3AVjctXP6rHbInR+JvR4bHPTigH5jRykjnQ== X-Received: by 2002:a17:902:e842:b0:20b:920e:8fd3 with SMTP id d9443c01a7336-210c6c30b32mr128560115ad.35.1730138426895; Mon, 28 Oct 2024 11:00:26 -0700 (PDT) Received: from [192.168.68.110] ([191.8.109.222]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-210bc02ebcdsm52977805ad.223.2024.10.28.11.00.24 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 28 Oct 2024 11:00:26 -0700 (PDT) Message-ID: Date: Mon, 28 Oct 2024 15:00:22 -0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 0/4] target/riscv/kvm: add riscv-aia bool props To: qemu-devel@nongnu.org Cc: qemu-riscv@nongnu.org, alistair.francis@wdc.com, bmeng@tinylab.org, liwei1518@gmail.com, zhiwei_liu@linux.alibaba.com, palmer@rivosinc.com, ajones@ventanamicro.com References: <20240924124407.766495-1-dbarboza@ventanamicro.com> Content-Language: en-US From: Daniel Henrique Barboza In-Reply-To: <20240924124407.766495-1-dbarboza@ventanamicro.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=2607:f8b0:4864:20::62f; envelope-from=dbarboza@ventanamicro.com; helo=mail-pl1-x62f.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-riscv@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-riscv-bounces+qemu-riscv=archiver.kernel.org@nongnu.org Sender: qemu-riscv-bounces+qemu-riscv=archiver.kernel.org@nongnu.org Hi, I had a change of heart w.r.t this work. I still believe that the boolean properties are better to deal with since we don't have to deal with string parsing, and that we should avoid creating new string props in the future. But as far as the user API goes it doesn't matter that much. Having to do -accel kvm,riscv-aia=emul or -accel kvm,riscv-aia-emul=on is basically the same thing. Deprecate properties always creates some form of hassle for existing scripts and whatnot and we should avoid it. String properties aren't that great to report to APIs though, so what we can do is to create internal bools to track the string value and then use it for QMP. Long story short, I'll re-send this series with only patches 1 and 2. Thanks, Daniel On 9/24/24 9:44 AM, Daniel Henrique Barboza wrote: > Hi, > > Boolean properties are easier to deal with in the protocol side (e.g. > QMP) since they don't require string parsing. We should always use them > when applicable. > > This series adds 3 new riscv-aia bool options for the KVM accel driver, > each one representing the possible values (emul, hwaccel and auto). > We're also deprecating the existing 'riscv-aia' string option. > > The idea is to use the new properties to enable AIA support in libvirt. > > Patches based on riscv-to-apply.next. > > Daniel Henrique Barboza (4): > target/riscv/kvm: set 'aia_mode' to default in error path > target/riscv/kvm: clarify how 'riscv-aia' default works > target/riscv/kvm: add kvm-aia bools props > target/riscv/kvm: deprecate riscv-aia string prop > > docs/about/deprecated.rst | 8 +++ > target/riscv/kvm/kvm-cpu.c | 100 +++++++++++++++++++++++++++++++++---- > 2 files changed, 98 insertions(+), 10 deletions(-) >