Re: [PATCH v3 09/15] platform: goldfish: pipe: Move goldfish_pipe to goldfish_pipe_v2

From: Roman Kiryanov
Date: Tue Oct 16 2018 - 17:02:19 EST


> > I don't want to mix v1 and v2.
>
> Why? What is the difference?
> Why do you even need/want 2 different drivers here

In old emulators we implemented the device differently, so we need a
different driver.

> for something that really should be done with the virtio
> interface instead?

We are already looking into virtio. But we did not find a userspace
API that virtio provides to
replace our pipe. The closest we found is virtqueue, but it is a
kernel thing. So we will
need goldfish_pipe_v3.

> > I don't see how userspace could be affected, unless we refer to
> > __FILE__ inside the driver for some important things. I believe we
> > don't.
>
> How does your userspace know what module to automatically load? That's
> what usually breaks if you do not have proper platform binding happening
> automatically.

I am not sure if I understand your question.

Userspace opens the device by its name. The device name is hardcoded:

#define DEVICE_NAME "goldfish_pipe"

https://android.googlesource.com/kernel/goldfish/+/android-goldfish-4.14-dev/drivers/platform/goldfish/goldfish_pipe.h#19

I still don't understand how kernel filenames are involved (and
whether should they) into userpspace.