From mboxrd@z Thu Jan 1 00:00:00 1970 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 6AE9FC4345F for ; Wed, 24 Apr 2024 09:44:09 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rzZ9t-0006uX-AH; Wed, 24 Apr 2024 05:43:21 -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 1rzZ9s-0006uK-7H for qemu-devel@nongnu.org; Wed, 24 Apr 2024 05:43:20 -0400 Received: from madrid.collaboradmins.com ([2a00:1098:ed:100::25]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rzZ9q-0005UA-ES for qemu-devel@nongnu.org; Wed, 24 Apr 2024 05:43:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1713951796; bh=BXbvLZz8JvDlWrKMQ5pPPsYvvXMRo+xV6cR4XM6LE28=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=A7N7eoC9j4BNc34nXoboZgcqGtkQnXAOfi891/vUCS0UIab0sGA0xcWbcELUYqqEw fPNZ7+KJtLmYm91XhwNF6B4BQqEsI1NtnjnlnoszhVvFswjdtpeGw8A7y85WOxpEr0 il0/zcOTKnuvyO/LA5JHyny4hIGkVrPqhPrKCjt8MC13wuPKSdT+9k2gMO8/fi2V26 TGM70u+42NUuv/jWhnS6DqiWT1mUmbYuoHPWBe6pU7JS80tWV6lC1ucY6gMA5HeYRs P7q6kv/gVherwF585W65Jgp0l2Dr2xUxPsLpbkD64i9NNZq0Vb52wDHAWm6cO0v3hd dz2v6jOb/1auw== Received: from [100.109.49.129] (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: dmitry.osipenko) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 0EE6837809CE; Wed, 24 Apr 2024 09:43:13 +0000 (UTC) Message-ID: <4c6b3ca0-4813-48f4-87f8-a94e911c02d3@collabora.com> Date: Wed, 24 Apr 2024 12:43:11 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v8 07/11] virtio-gpu: Support suspension of commands processing To: Akihiko Odaki , Huang Rui , =?UTF-8?Q?Marc-Andr=C3=A9_Lureau?= , =?UTF-8?Q?Philippe_Mathieu-Daud=C3=A9?= , Gerd Hoffmann , "Michael S . Tsirkin" , Stefano Stabellini , Anthony PERARD , Antonio Caggiano , "Dr . David Alan Gilbert" , Robert Beckett , Gert Wollny , =?UTF-8?Q?Alex_Benn=C3=A9e?= Cc: qemu-devel@nongnu.org, Gurchetan Singh , ernunes@redhat.com, Alyssa Ross , =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= , Alex Deucher , Stefano Stabellini , =?UTF-8?Q?Christian_K=C3=B6nig?= , Xenia Ragiadakou , Pierre-Eric Pelloux-Prayer , Honglei Huang , Julia Zhang , Chen Jiqian , Yiwei Zhang References: <20240418190040.1110210-1-dmitry.osipenko@collabora.com> <20240418190040.1110210-8-dmitry.osipenko@collabora.com> <8a153bf1-f86c-46c8-a29a-08e9a0197dc3@daynix.com> Content-Language: en-US From: Dmitry Osipenko In-Reply-To: <8a153bf1-f86c-46c8-a29a-08e9a0197dc3@daynix.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=2a00:1098:ed:100::25; envelope-from=dmitry.osipenko@collabora.com; helo=madrid.collaboradmins.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, 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org On 4/19/24 11:53, Akihiko Odaki wrote: > On 2024/04/19 4:00, Dmitry Osipenko wrote: >> Add new "suspended" flag to virtio_gpu_ctrl_command telling cmd >> processor that it should stop processing commands and retry again >> next time until flag is unset. >> >> Signed-off-by: Dmitry Osipenko > > This flag shouldn't be added to virtio_gpu_ctrl_command. suspended is > just !finished in virtio-gpu.c. Only virtio_gpu_virgl_process_cmd() > needs the distinction of suspended and !finished so it is not > appropriate to add this flag the common structure. The VIRTIO_GPU_FILL_CMD() macro returns void and this macro is used by every function processing commands. Changing process_cmd() to return bool will require to change all those functions. Not worthwhile to change it, IMO. The flag reflects the exact command status. The !finished + !suspended means that command is fenced, i.e. these flags don't have exactly same meaning. I'd keep the flag if there are no better suggestions. -- Best regards, Dmitry