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 430F8C5B543 for ; Thu, 5 Jun 2025 09:46:10 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uN7Ah-0003y0-DH; Thu, 05 Jun 2025 05:46:03 -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 1uN7Af-0003rv-Vq for qemu-riscv@nongnu.org; Thu, 05 Jun 2025 05:46:02 -0400 Received: from mail-vs1-xe43.google.com ([2607:f8b0:4864:20::e43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uN7Ae-00022u-78 for qemu-riscv@nongnu.org; Thu, 05 Jun 2025 05:46:01 -0400 Received: by mail-vs1-xe43.google.com with SMTP id ada2fe7eead31-4e701c53c84so534818137.0 for ; Thu, 05 Jun 2025 02:45:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1749116759; x=1749721559; 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=5uLtTHnui3FZB+pvN4W3jKkwDUlgYik0UvBfWH5ZE9E=; b=UNvtoHeoCd320+RHwdWctDUK+V3Z4ug9kz192hpFN/HrgkpwcShuMdVNmUAZWIlggR kZ3NS3sObwuhNtAfdm3H66a0eseEcHtSd5I/gjvGfUBAA5ASFnOj6tud6q6LMTQ9/Fs/ MKDHsgJWsWsFSS8/mHN8hg/EK3hzxVohvLgXFC6WFu03F0esgp1PqtU2snoj38RlOZCh omwQxSRQzsG94XVdHYd64PpUSceqtv7bZxG9fp83sMefwDd80BIrlX6nHrEoU5VvKdOH xR309Tps7mJgcygq+T/X9ialQidOUCCyceM/KkcZ7Kh509tUVTTFukv3DKpr8vL0hTtA ytsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1749116759; x=1749721559; 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=5uLtTHnui3FZB+pvN4W3jKkwDUlgYik0UvBfWH5ZE9E=; b=bIcM83KiCg+Gat8Zwr30/mow3OrGH6o+fgWqnvMeofnt4W1IZVc9pF4bU4UVd4lA4B +YLjDBkOBzvQ+Vsn7O6201fgr2FMVLlkXFQXyro+2XI34DGqYtqpmrpkytKZC6Z8V5rr JWFKrt7KOjDHQuCRC3ihLyHdchec8cS5Nj1rLud2KyU3PX0I3ffOx3IZ4zHI0qWZxMc1 VDXnGID53M8Ue18JTD4ZGb+MR6QCGcLQOAieUv9NKAyIceMWhJ6DOQppEPyn8qRwgPqL wIqlIhA8m08mHzxxa2yEMi1D3dgSgK3Pj6Tl6BFKyhsxULizmzhB6XDWFKY7x5M9UQpk MRbg== X-Gm-Message-State: AOJu0YyH2et5HQNr8KaDyWKB4YF2c2hneOp7ravm5tqy3FJSpFv2ezdk ql1QXmjdUqldqd6zZr+EbpN4qb5Mxjnyu8IMvsOxph3eEEChsM8WBn5cSV8nMyZuebk= X-Gm-Gg: ASbGnctAA5gLdVLl3cnITOpKbg6Lyq3tw+umWeoqUmkeqzFuY4xa6kIiMk5VmYpsEW9 miZaug9huylnnDN1A2DvPUTx30/ijDTMfFoyljixhQeKOLzjHBjNbs/6LUG4O8gQnFYXb3ykQjO zjpHxIjCBB3hYMkBau3ApC6ae0XRJLni7nABVSigBqWsgD9W17EDemB/0XWb6PYRYX8tS18WywO x2NwWdw4V6YixRASI4BhFziRUOo50t+qsgyfbAWg5u2baFOzfeYkGYntT5505+m2GiarEO0fvmp im1Rwx+eoRkmCSY98BPSSntgRHBxAlxhiQqMC6D0ztq+TH64GsJ/RamZlJtyKHeobKg= X-Google-Smtp-Source: AGHT+IE4KVHmpyVIwQfdTHULoVRAUI+ppKQhm0O8jLD/BLfVPSq+8RqCs/k2JCS83Ej/21cj0C6ESw== X-Received: by 2002:a05:6102:c88:b0:4e6:d9b8:ddd5 with SMTP id ada2fe7eead31-4e746e63862mr4721512137.17.1749116758962; Thu, 05 Jun 2025 02:45:58 -0700 (PDT) Received: from [192.168.68.110] ([177.188.133.196]) by smtp.gmail.com with ESMTPSA id ada2fe7eead31-4e644499c7csm11249888137.15.2025.06.05.02.45.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 05 Jun 2025 02:45:58 -0700 (PDT) Message-ID: <57693dc5-b624-4697-a26b-097c0fa4cce9@ventanamicro.com> Date: Thu, 5 Jun 2025 06:45:55 -0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] target/riscv/kvm: use qemu_chr_fe_write_all() in SBI_EXT_DBCN_CONSOLE_WRITE_BYTE To: =?UTF-8?Q?Philippe_Mathieu-Daud=C3=A9?= , qemu-devel@nongnu.org Cc: qemu-riscv@nongnu.org, alistair.francis@wdc.com, liwei1518@gmail.com, zhiwei_liu@linux.alibaba.com, palmer@dabbelt.com References: <20250605090012.1268809-1-dbarboza@ventanamicro.com> <0b6b429a-a3bc-4707-9e94-67d9fe8cc363@linaro.org> Content-Language: en-US From: Daniel Henrique Barboza In-Reply-To: <0b6b429a-a3bc-4707-9e94-67d9fe8cc363@linaro.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::e43; envelope-from=dbarboza@ventanamicro.com; helo=mail-vs1-xe43.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 On 6/5/25 6:26 AM, Philippe Mathieu-Daudé wrote: > On 5/6/25 11:00, Daniel Henrique Barboza wrote: >> The SBI spec states, for console write byte: >> >> "This is a blocking SBI call and it will only return after writing the >> specified byte to the debug console. It will also return, with >> SBI_ERR_FAILED, if there are I/O errors." >> >> Being a blocker call will either succeed writing the byte or error out, >> it's feasible to use the blocking qemu_chr_fe_write_all() instead of >> qemu_chr_fe_write(). This is also how SBI_EXT_DBCN_CONSOLE_WRITE is >> implemented, so we're also being more consistent. >> >> Last but not the least, we will duck possible changes in >> qemu_chr_fe_write() where ret = 0 will have a 'zero byte written' >> semantic [1] - something that we're not ready to deal in this current >> state. >> >> [1] https://lore.kernel.org/qemu-devel/ CAFEAcA_kEndvNtw4EHySXWwQPoGs029yAzZGGBcV=zGHaj7KUQ@mail.gmail.com/ >> >> Signed-off-by: Daniel Henrique Barboza >> --- >>   target/riscv/kvm/kvm-cpu.c | 2 +- >>   1 file changed, 1 insertion(+), 1 deletion(-) > > Thank you very much Daniel! No problem :) FYI I just sent a v2 with a small change in the commit msg. Your ack was kept. Thanks, Daniel > > Reviewed-by: Philippe Mathieu-Daudé >