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 X-Spam-Level: X-Spam-Status: No, score=0.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DC490C433DB for ; Mon, 18 Jan 2021 18:54:58 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 81FE8206D4 for ; Mon, 18 Jan 2021 18:54:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 81FE8206D4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:43980 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l1Zg1-0000FM-IR for qemu-devel@archiver.kernel.org; Mon, 18 Jan 2021 13:54:57 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:37874) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l1Zev-0007mU-Ce for qemu-devel@nongnu.org; Mon, 18 Jan 2021 13:53:49 -0500 Received: from mail-pj1-x1032.google.com ([2607:f8b0:4864:20::1032]:50283) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l1Zet-0006XM-FT for qemu-devel@nongnu.org; Mon, 18 Jan 2021 13:53:49 -0500 Received: by mail-pj1-x1032.google.com with SMTP id md11so10125411pjb.0 for ; Mon, 18 Jan 2021 10:53:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=t1zkc7rmsvwPqrVFutdI/DwvMfrlIuyvE4D07Z+63cc=; b=rGJeVuFFCmSgqCwlylTpLUtHJqDhiYAWKDsJQEDr9y/NAy1XYE+U6N3TdDHeeEcBAe 3vgdameAlkxqMe/IPol/MT3cyP2IR7wdiIR9Yp+L7QYyzYTCpr2kguMjuhZQrr6jLupr PoMCHkQiRQsu+Fp62eSliuVCIqhW88dUv6M/6B4SoF5mUeQycvyEZIdFhiTa1QQUm3+R MZ7nsgmNWhEpNAS7oTPLREUw0heC53nxDBUDusQ+INOUrPQKPFVRnvLgQFCuC9smU0Oy 0DNbEb/JWa2YS3hLXyZfsFjw24NoWw18lVvIzhKDlQec/TTbT6f9x165qSyqNMq+t4h3 ZkwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=t1zkc7rmsvwPqrVFutdI/DwvMfrlIuyvE4D07Z+63cc=; b=cC63g80089GvlT2v0oDkTTn2qWqP1jHV+2KvulgnzBaJQeJIEmmV5+mmPsvyRdA+SQ E5qJoXYIh8blUXlmpRvaPYVKCJqdTIZqb2nWnHyPzezvkLoE3KXOChh1YEM6/aJV26ns 0SQXabiqcD4GbaC5ZLEFrgbNZpioVBTWReeFju8bvWEtTTDDWH+heeuNU/7AByRrF9Hl sMf7H/ih3lVXfeM0dooRt2bkwGRvSgESULKdU+gk54DqGBYZP60twYPCUOhdivXzSvEh y/F7dxCYBqVn4haKsUiqjF2wx3giikra+4xCOW/SjcaVhYj3EbEAbMN4Mzqkzz4fSRj9 MSLA== X-Gm-Message-State: AOAM533tn2WR2d2Sb5hxSo1s44AztEDFYfsz/u6HvFY11IUytl5iWaa8 C63N7Rd/bfUJty703Z8pccl2FcF6YgOGHGglqQA= X-Google-Smtp-Source: ABdhPJzIYZCWCMHa6W6MKOHvUCLVA0XDo1cJuhQzHv1/plCnngZSNJiO4BAh6mXUmjxeUWk4I6HIZfmcTTHJNqzjNWg= X-Received: by 2002:a17:90a:1082:: with SMTP id c2mr702407pja.183.1610996025589; Mon, 18 Jan 2021 10:53:45 -0800 (PST) MIME-Version: 1.0 References: <87a6tm2sxb.fsf@linaro.org> <878s941x85.fsf@linaro.org> <20210108083433.pfzhxrd4rezk6yxe@sirius.home.kraxel.org> <878s8zptrf.fsf@linaro.org> <87ft33l8an.fsf@linaro.org> In-Reply-To: From: Shreyansh Chouhan Date: Tue, 19 Jan 2021 00:23:34 +0530 Message-ID: Subject: Re: Fwd: VirtioSound device emulation implementation To: =?UTF-8?B?QWxleCBCZW5uw6ll?= Content-Type: multipart/alternative; boundary="000000000000d700b805b9313d3e" Received-SPF: pass client-ip=2607:f8b0:4864:20::1032; envelope-from=chouhan.shreyansh2702@gmail.com; helo=mail-pj1-x1032.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 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, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, 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-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Gerd Hoffmann , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" --000000000000d700b805b9313d3e Content-Type: text/plain; charset="UTF-8" I will make it an in-QEMU pci device. After it is done and the device is working, I can write a vhost-user daemon and move the device out of QEMU should it be needed. This way I'd already have the virtio-pci device tested out by the time I get to the vhost-user daemon. Also I'll be a lot more familiar to sound and virtio devices by then hopefully. I hope this is fine? As for the implementation plan, I will start out by writing the structure for the device, `VirtIOSnd` or `VirtIOSound`. Since QEMU already has a base `VirtIODevice` with common implementation along with the `VirtQueue`s, this shouldn't be very difficult. Following this I will start implementing the methods mentioned in the `VirtIODeviceClass`. This would include creating a separate `virtio-sound-pci.c` file with the `realize`, `unrealize` and various init functions. After that, I will start writing the `get`, `set` and validate functions mentioned in the `VirtioDeviceClass`. QEMU already has an implementation for `start_ioeventfd` and `stop_ioeventfd`. This should get us done with the configuration plane. I am thinking of writing a few tests at this point. I will have to read about the qtest framework first though. This should take at most around a month. I am hoping to get it done earlier than that time (~3 weeks) if things go well. From this most of the time goes to tests. I am taking a bit of a margin to err on the side of caution. This now brings us to the dataplane and processing of the data. I think once the data plane is successfully implemented, processing shouldn't take a lot of time. Once the control queue, event queue, tx queue and rx queues are implemented, I can start implementing the Jack and PCM control requests. I can write tests after completing each of these phases. As of right now, I am not awake enough to give a clear plan on the data plane implementation. I will clear the plan out tomorrow. The dataplane along with the processing should at most take a little over a month to implement I'd guess. I will make sure I write a follow up mail tomorrow with a clearer and complete plan. Apologies for any statements that weren't very clear or mistakes in the language that I used. - Shreyansh Chouhan --000000000000d700b805b9313d3e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I will make it an in-QEMU pci device. After it is don= e and the device is working, I can
write a vhost-user daemon = and move the device out of QEMU should it be needed.
This way= I'd already have the virtio-pci device tested out by the time I get to= the vhost-user
daemon. Also I'll be a lot more familiar to s= ound and virtio devices by then hopefully. I hope
this is fine?

As for the implementation plan, I will start out by= writing the structure for the device, `VirtIOSnd`
or `VirtIOSoun= d`. Since QEMU already has a base `VirtIODevice` with common implementation=
along with the `VirtQueue`s, this shouldn't be very difficul= t. Following this I will start implementing
the methods mentioned= in the `VirtIODeviceClass`. This would include creating a separate
`virtio-sound-pci.c` file with the `realize`, `unrealize` and various in= it functions.

After that, I will start writin= g the `get`, `set` and validate functions mentioned in the `VirtioDeviceCla= ss`.
QEMU already has an implementation for `start_ioeventfd` and= `stop_ioeventfd`.
This should get us done with the configur= ation plane. I am thinking of writing
a few tests at this point. = I will have to read about the qtest framework first though.
This = should take at most around a month. I am hoping to get it done earlier than= that
time (~3 weeks) if things go well. From this most of the ti= me goes to tests. I am taking
a bit of a margin to err on the sid= e of caution.

This now brings us to the datapl= ane and processing of the data. I think once the data plane
is su= ccessfully implemented, processing shouldn't take a lot of time. Once t= he control
queue, event queue, tx queue and rx queues are impleme= nted, I can start implementing
the Jack and PCM control requests.= I can write tests after completing each of these
phases. As of r= ight now, I am not awake enough to give
a clear plan on the data = plane implementation. I will clear the plan out tomorrow. The
dataplane along with the processing should at most take a little over a m= onth to implement I'd
guess.

I = will make sure I write a follow up mail tomorrow with a clearer and complet= e plan. Apologies for
any statements that weren't very clear = or mistakes in the language that I used.

- Sh= reyansh Chouhan
--000000000000d700b805b9313d3e--