From: Alexander Gordeev <alexander.gordeev@opensynergy.com>
To: Alexandre Courbot <acourbot@chromium.org>
Cc: "Cornelia Huck" <cohuck@redhat.com>,
virtio-dev@lists.oasis-open.org,
"Keiichi Watanabe" <keiichiw@chromium.org>,
"Alex Bennée" <alex.bennee@linaro.org>,
"Marcin Wojtas" <mwojtas@google.com>,
"Matti Möll" <Matti.Moell@opensynergy.com>,
"Andrew Gazizov" <andrew.gazizov@opensynergy.com>,
"Enrico Granata" <egranata@google.com>,
"Gustavo Padovan" <gustavo.padovan@collabora.com>,
"Peter Griffin" <peter.griffin@linaro.org>,
"Bartłomiej Grzesik" <bag@semihalf.com>,
"Tomasz Figa" <tfiga@chromium.org>,
"Daniel Almeida" <daniel.almeida@collabora.com>,
"Enric Balletbo i Serra" <eballetb@redhat.com>,
"Albert Esteve" <aesteve@redhat.com>
Subject: Re: [virtio-dev] Re: [RFC PATCH v6] virtio-video: Add virtio video device specification
Date: Thu, 27 Apr 2023 17:12:46 +0200 [thread overview]
Message-ID: <4fe9b619-c2b3-fe22-d7ac-b92ffc90a80e@opensynergy.com> (raw)
In-Reply-To: <CAPBb6MVWaBHR-d6aqaMXTxuX5ns3RNY4cNJhak5ijoicfTvoAw@mail.gmail.com>
On 27.04.23 15:23, Alexandre Courbot wrote:
> On Thu, Apr 27, 2023 at 12:52 AM Alexander Gordeev
> <alexander.gordeev@opensynergy.com> wrote:
>>
>> On 21.04.23 06:02, Alexandre Courbot wrote:
>>> On Wed, Apr 19, 2023 at 4:39 PM Alexander Gordeev
>>> <alexander.gordeev@opensynergy.com> wrote:
>>>>
>>>> On 17.04.23 16:43, Cornelia Huck wrote:
>>>>> On Mon, Apr 17 2023, Alexander Gordeev <alexander.gordeev@opensynergy.com> wrote:
>>>>>
>>>>>> OpenSynergy, the company that I work for, develops a proprietary
>>>>>> hypervisor called COQOS mainly for automotive and aerospace domains. We
>>>>>> have our proprietary device implementations, but overall our goal is to
>>>>>> bring open standards into these quite closed domains and we're betting
>>>>>> big on virtio. The idea is to run safety-critical functions like cockpit
>>>>>> controller alongside with multimedia stuff in different VMs on the same
>>>>>> physical board. Right now they have it on separate physical devices. So
>>>>>> they already have maximum isolation. And we're trying to make this
>>>>>> equally safe on a single board. The benefit is the reduced costs and
>>>>>> some additional features. Of course, we also need features here, but at
>>>>>> the same time security and ease of certification are among the top of
>>>>>> our priorities. Nobody wants cars or planes to have security problems,
>>>>>> right? Also nobody really needs DVB and even more exotic devices in cars
>>>>>> and planes AFAIK.
>>>>>>
>>>>>> For the above mentioned reasons our COQOS hypervisor is running on bare
>>>>>> metal. Also memory management for the guests is mostly static. It is
>>>>>> possible to make a shared memory region between a device and a driver
>>>>>> managed by device in advance. But definitely no mapping of random host
>>>>>> pages on the fly is supported.
>>>>>>
>>>>>> AFAIU crosvm is about making Chrome OS more secure by putting every app
>>>>>> in its own virtualized environment, right? Both the host and guest are
>>>>>> linux. In this case I totally understand why V4L2 UAPI pass-through
>>>>>> feels like a right move. I guess, you'd like to make the switch to
>>>>>> virtualized apps as seemless as possible for your users. If they can't
>>>>>> use their DVBs anymore, they complain. And adding the virtualization
>>>>>> makes the whole thing more secure anyway. So I understand the desire to
>>>>>> have the range of supported devices as broad as possible. It is also
>>>>>> understandable that priorities are different with desktop
>>>>>> virtualization. Also I'm not trying to diminish the great work, that you
>>>>>> have done. It is just that from my perspective this looks like a step in
>>>>>> the wrong direction because of the mentioned concerns. So I'm going to
>>>>>> continue being a skeptic here, sorry.
>>>>>>
>>>>>> Of course, I don't expect that you continue working on the old approach
>>>>>> now as you have put that many efforts into the V4L2 UAPI pass-through.
>>>>>> So I think it is best to do the evolutionary changes in scope of virtio
>>>>>> video device specification, and create a new device specification
>>>>>> (virtio-v4l2 ?) for the revolutionary changes. Then I'd be glad to
>>>>>> continue the virtio-video development. In fact I already started making
>>>>>> draft v7 of the spec according to the comments. I hope it will be ready
>>>>>> for review soon.
>>>>>>
>>>>>> I hope this approach will also help fix issues with virtio-video spec
>>>>>> and driver development misalignment as well as V4L2 compliance issues
>>>>>> with the driver. I believe the problems were caused partly by poor
>>>>>> communication between us and by misalignment of our development cycles,
>>>>>> not by the driver complexity.
>>>>>>
>>>>>> So in my opinion it is OK to have different specs with overlapping
>>>>>> functionality for some time. My only concern is if this would be
>>>>>> accepted by the community and the committee. How the things usually go
>>>>>> here: preferring features and tolerating possible security issues or the
>>>>>> other way around? Also how acceptable is having linux-specific protocols
>>>>>> at all?
>>>>> My main question is: What would be something that we can merge as a
>>>>> spec, that would either cover the different use cases already, or that
>>>>> could be easily extended to cover the use cases it does not handle
>>>>> initially?
>>>>>
>>>>> For example, can some of the features that would be useful in crosvm be
>>>>> tucked behind some feature bit(s), so that the more restricted COQOS
>>>>> hypervisor would simply not offer them? (Two feature bits covering two
>>>>> different mechanisms, like the current approach and the v4l2 approach,
>>>>> would also be good, as long as there's enough common ground between the
>>>>> two.)
>>>>>
>>>>> If a staged approach (adding features controled by feature bits) would
>>>>> be possible, that would be my preferred way to do it.
>>>>
>>>> Hmm, I see several ways how we can use the feature flags:
>>>> 1. Basically making two feature flags: one for the current video spec
>>>> and one for the V4L2 UAPI pass through. Kind of the same as having two
>>>> different specs, but within one device. Not sure which way is better.
>>>> Probably having two separate devices would be easier to review and merge.
>>>
>>> Having two different devices with their own IDs would indeed be less
>>> confusing than using feature bits.
>>>
>>> That being said, the whole point of proposing virtio-v4l2 is to end up
>>> with *less* specification, not more. Having two concurrent and largely
>>> overlapping approaches will result in fragmentation and duplicated
>>> work, so my suggestion would be to decide on one or the other and
>>> stick to it.
>>
>> Hmm, Enrico pointed out, that having virtio-v4l2 would also be good
>> because of much better compatibility with Android right now. I don't
>> think the specification length should be our ultimate goal. Cornelia
>> said, that her ultimate goal is to have a spec everyone is happy with,
>> regardless on how we arrive there. Well, I can only say, that I also
>> think this should be our goal.
>
> Try to put yourself into the shoes of someone who needs to write a new
> video device using virtio. Oh, there are two ways to do it. This guest
> OS only supports virtio-video. But this guest OS only supports
> virtio-v4l2. Great, now you need to support two interfaces with your
> device, or write two different devices.
I think this is a hypothetical issue. IMO it makes sense to use V4L2
UAPI only on Linux host with V4L2 devices + Linux/Android guest.
virtio-video driver is already available for Linux. We already know our
priorities and limitations, so building a decision tree for a potential
device developer would be very easy.
>>> * Having two overlapping specifications for video is overkill and will
>>> just fragment virtio (as tempting as it is, I won't link to XKCD). I
>>> strongly advise against that.
>>
>> I think they're not going to create more problems, than virtio-blk,
>> virtio-scsi and virtio-fs, for example.
>
> At least these devices work at different layers, that makes them more
> justifiable. virtio-video and virtio-v4l2 are just going to provide
> the same API for video devices, only with different structures and
> commands.
Hmm, I think virtio-blk and virtio-scsi work on the same level, aren't
they? They could also say this is basically the same thing.
>> The decision can be made like this:
>> 1. You have a V4L2 device, you don't need any more processing, just want
>> it inside a Linux/Android VM => use virtio-v4l2.
>> 2. You don't have a V4L2 device, or your host is not Linux, or your
>> maybe your guest is not Linux/Android, or you want some extra processing
>> on the host (say you have a third-party proprietary library or whatever)
>> => use virtio-video.
>
> That would make sense if 2. could not be done just as easily by also
> using virtio-v4l2, which I believe it can be.
I'm sorry, I think a potential developer would just look into V4L2 docs,
see struct v4l2_buffer (AFAIU with patches in the spec for the
host/guest/object memory types on top) and run back to the cleanliness
and simplicity of virtio-video. That's basically my story. :)
Iterating on formats in VIDIOC_ENUM_FMT looks quite weird to me too.
Thankfully this is not a big deal usually.
Also it depends on the use-case of a potential developer. If the
priority is on security, if they only need decoding/encoding video or not.
--
Alexander Gordeev
Senior Software Engineer
OpenSynergy GmbH
Rotherstr. 20, 10245 Berlin
Phone: +49 30 60 98 54 0 - 88
Fax: +49 (30) 60 98 54 0 - 99
EMail: alexander.gordeev@opensynergy.com
www.opensynergy.com
Handelsregister/Commercial Registry: Amtsgericht Charlottenburg, HRB 108616B
Geschäftsführer/Managing Director: Régis Adjamah
Please mind our privacy notice<https://www.opensynergy.com/datenschutzerklaerung/privacy-notice-for-business-partners-pursuant-to-article-13-of-the-general-data-protection-regulation-gdpr/> pursuant to Art. 13 GDPR. // Unsere Hinweise zum Datenschutz gem. Art. 13 DSGVO finden Sie hier.<https://www.opensynergy.com/de/datenschutzerklaerung/datenschutzhinweise-fuer-geschaeftspartner-gem-art-13-dsgvo/>
---------------------------------------------------------------------
To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org
next prev parent reply other threads:[~2023-04-27 15:12 UTC|newest]
Thread overview: 93+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-08 7:23 [virtio-dev] [RFC PATCH v6] virtio-video: Add virtio video device specification Alexandre Courbot
2022-12-08 15:00 ` Cornelia Huck
2022-12-27 5:38 ` Alexandre Courbot
2023-01-11 8:45 ` Cornelia Huck
2023-01-12 6:32 ` Alexandre Courbot
2023-01-12 15:23 ` Cornelia Huck
2022-12-19 16:59 ` [virtio-dev] " Alexander Gordeev
2022-12-20 9:51 ` Cornelia Huck
2022-12-20 10:35 ` Alexander Gordeev
2022-12-20 17:39 ` Cornelia Huck
2022-12-21 14:56 ` Alexander Gordeev
2022-12-27 7:31 ` Alexandre Courbot
2023-01-11 18:42 ` Alexander Gordeev
2023-01-11 20:13 ` Alex Bennée
2023-01-12 6:40 ` Alexandre Courbot
2023-01-12 6:39 ` Alexandre Courbot
2023-01-18 23:06 ` Alexander Gordeev
2023-02-06 14:12 ` Cornelia Huck
2023-02-07 6:16 ` Alexandre Courbot
2023-02-07 13:59 ` Cornelia Huck
2023-03-10 10:50 ` Cornelia Huck
2023-03-10 13:19 ` Alexandre Courbot
2023-03-10 14:20 ` Cornelia Huck
2023-03-14 5:06 ` Alexandre Courbot
2023-03-16 10:12 ` Alexander Gordeev
2023-03-17 7:24 ` Alexandre Courbot
2023-04-17 12:51 ` Alexander Gordeev
2023-04-17 14:43 ` Cornelia Huck
2023-04-19 7:39 ` Alexander Gordeev
2023-04-19 21:34 ` Enrico Granata
2023-04-21 14:48 ` Alexander Gordeev
2023-04-21 4:02 ` Alexandre Courbot
2023-04-21 16:01 ` Alexander Gordeev
2023-04-24 7:52 ` Alexander Gordeev
2023-04-25 16:04 ` Cornelia Huck
2023-04-26 6:29 ` Alexandre Courbot
2023-04-27 14:10 ` Alexander Gordeev
2023-04-28 4:02 ` Alexandre Courbot
2023-04-28 8:54 ` Alexander Gordeev
2023-05-02 1:07 ` Alexandre Courbot
2023-05-02 11:12 ` Alexander Gordeev
2023-04-26 5:52 ` Alexandre Courbot
2023-04-27 14:20 ` Alexander Gordeev
2023-04-28 3:22 ` Alexandre Courbot
2023-04-28 8:22 ` Alexander Gordeev
2023-04-26 15:52 ` Alexander Gordeev
2023-04-27 13:23 ` Alexandre Courbot
2023-04-27 15:12 ` Alexander Gordeev [this message]
2023-04-28 3:24 ` Alexandre Courbot
2023-04-28 8:31 ` Alexander Gordeev
[not found] ` <CALgKJBqKWng508cB_F_uD2fy9EAvQ36rYR3fRb57sFd3ihpUFw@mail.gmail.com>
2023-04-26 16:00 ` Alexander Gordeev
2023-04-27 10:13 ` Bartłomiej Grzesik
2023-04-27 14:34 ` Alexander Gordeev
2023-04-28 3:22 ` Alexandre Courbot
2023-04-28 7:57 ` Alexander Gordeev
2023-04-21 4:02 ` Alexandre Courbot
2023-04-26 15:11 ` Alexander Gordeev
2023-04-27 13:16 ` Alexandre Courbot
2023-04-28 7:47 ` Alexander Gordeev
2023-05-03 14:04 ` Cornelia Huck
2023-05-03 15:11 ` Alex Bennée
2023-05-03 15:53 ` Cornelia Huck
2023-05-05 9:57 ` Alexander Gordeev
[not found] ` <168329085253.1880445.14002473591422425775@Monstersaurus>
2023-05-05 15:55 ` Alex Bennée
2023-05-16 12:57 ` Alexander Gordeev
[not found] ` <20230506081229.GA8114@pendragon.ideasonboard.com>
[not found] ` <20230506081633.GB8114@pendragon.ideasonboard.com>
2023-05-08 8:00 ` [virtio-dev] Re: [libcamera-devel] " Alexandre Courbot
2023-05-16 13:50 ` Alexander Gordeev
2023-05-17 3:58 ` Tomasz Figa
2023-05-05 12:28 ` Alexander Gordeev
2023-05-05 11:54 ` Alexander Gordeev
2023-05-08 4:55 ` Alexandre Courbot
2023-05-11 8:50 ` Alexander Gordeev
2023-05-11 9:00 ` Alexander Gordeev
2023-05-12 4:15 ` Alexandre Courbot
2023-05-17 7:35 ` Alexander Gordeev
2023-05-12 4:09 ` Alexandre Courbot
2023-05-16 14:53 ` Alexander Gordeev
2023-05-17 16:28 ` Cornelia Huck
2023-05-18 6:29 ` Alexander Gordeev
2023-05-18 19:35 ` Michael S. Tsirkin
2023-05-17 11:04 ` Alexander Gordeev
2023-03-27 13:00 ` Albert Esteve
2023-04-15 5:58 ` Alexandre Courbot
2023-04-17 12:56 ` Cornelia Huck
2023-04-17 13:13 ` Alexander Gordeev
2023-04-17 13:22 ` Cornelia Huck
2023-02-07 11:11 ` Alexander Gordeev
2023-02-07 6:51 ` Alexandre Courbot
2023-02-07 10:57 ` Alexander Gordeev
2023-01-11 17:04 ` Alexander Gordeev
2023-01-12 6:32 ` Alexandre Courbot
2023-01-12 22:24 ` Alexander Gordeev
2023-01-11 18:45 ` Alexander Gordeev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4fe9b619-c2b3-fe22-d7ac-b92ffc90a80e@opensynergy.com \
--to=alexander.gordeev@opensynergy.com \
--cc=Matti.Moell@opensynergy.com \
--cc=acourbot@chromium.org \
--cc=aesteve@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=andrew.gazizov@opensynergy.com \
--cc=bag@semihalf.com \
--cc=cohuck@redhat.com \
--cc=daniel.almeida@collabora.com \
--cc=eballetb@redhat.com \
--cc=egranata@google.com \
--cc=gustavo.padovan@collabora.com \
--cc=keiichiw@chromium.org \
--cc=mwojtas@google.com \
--cc=peter.griffin@linaro.org \
--cc=tfiga@chromium.org \
--cc=virtio-dev@lists.oasis-open.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox