diff mbox series

[v6,01/11] linux-headers: Update to kernel headers to add venus capset

Message ID 20231219075320.165227-2-ray.huang@amd.com (mailing list archive)
State New
Headers show
Series Support blob memory and venus on qemu | expand

Commit Message

Huang Rui Dec. 19, 2023, 7:53 a.m. UTC
Sync up kernel headers to update venus macro till they are merged into
mainline.

Signed-off-by: Huang Rui <ray.huang@amd.com>
---

Changes in v6:
- Venus capset is applied in kernel, so update it in qemu for future use.

https://lore.kernel.org/lkml/b79dcf75-c9e8-490e-644f-3b97d95f7397@collabora.com/
https://cgit.freedesktop.org/drm-misc/commit/?id=216d86b9a430f3280e5b631c51e6fd1a7774cfa0

 include/standard-headers/linux/virtio_gpu.h | 2 ++
 1 file changed, 2 insertions(+)

Comments

Akihiko Odaki Dec. 19, 2023, 12:20 p.m. UTC | #1
On 2023/12/19 16:53, Huang Rui wrote:
> Sync up kernel headers to update venus macro till they are merged into
> mainline.

Thanks for sorting things out with the kernel and spec.

> 
> Signed-off-by: Huang Rui <ray.huang@amd.com>
> ---
> 
> Changes in v6:
> - Venus capset is applied in kernel, so update it in qemu for future use.
> 
> https://lore.kernel.org/lkml/b79dcf75-c9e8-490e-644f-3b97d95f7397@collabora.com/
> https://cgit.freedesktop.org/drm-misc/commit/?id=216d86b9a430f3280e5b631c51e6fd1a7774cfa0
Please include the link to the upstream commit in the commit message.
Huang Rui Dec. 19, 2023, 1:47 p.m. UTC | #2
On Tue, Dec 19, 2023 at 08:20:22PM +0800, Akihiko Odaki wrote:
> On 2023/12/19 16:53, Huang Rui wrote:
> > Sync up kernel headers to update venus macro till they are merged into
> > mainline.
> 
> Thanks for sorting things out with the kernel and spec.
> 
> > 
> > Signed-off-by: Huang Rui <ray.huang@amd.com>
> > ---
> > 
> > Changes in v6:
> > - Venus capset is applied in kernel, so update it in qemu for future use.
> > 
> > https://lore.kernel.org/lkml/b79dcf75-c9e8-490e-644f-3b97d95f7397@collabora.com/
> > https://cgit.freedesktop.org/drm-misc/commit/?id=216d86b9a430f3280e5b631c51e6fd1a7774cfa0
> Please include the link to the upstream commit in the commit message.

So far, it's in drm maintainers' branch not in kernel mainline yet. Do I
need to wait it to be merged into kernel mainline?

Thanks,
Ray
Peter Maydell Dec. 19, 2023, 2:14 p.m. UTC | #3
On Tue, 19 Dec 2023 at 13:49, Huang Rui <ray.huang@amd.com> wrote:
>
> On Tue, Dec 19, 2023 at 08:20:22PM +0800, Akihiko Odaki wrote:
> > On 2023/12/19 16:53, Huang Rui wrote:
> > > Sync up kernel headers to update venus macro till they are merged into
> > > mainline.
> >
> > Thanks for sorting things out with the kernel and spec.
> >
> > >
> > > Signed-off-by: Huang Rui <ray.huang@amd.com>
> > > ---
> > >
> > > Changes in v6:
> > > - Venus capset is applied in kernel, so update it in qemu for future use.
> > >
> > > https://lore.kernel.org/lkml/b79dcf75-c9e8-490e-644f-3b97d95f7397@collabora.com/
> > > https://cgit.freedesktop.org/drm-misc/commit/?id=216d86b9a430f3280e5b631c51e6fd1a7774cfa0
> > Please include the link to the upstream commit in the commit message.
>
> So far, it's in drm maintainers' branch not in kernel mainline yet. Do I
> need to wait it to be merged into kernel mainline?

For an RFC patchset, no. For patches to be merged into QEMU
the headers change must be in the kernel mainline, and the
QEMU commit that updates our copy of the headers must be a
full-sync done with scripts/update-linux-headers.sh, not a
manual edit.

thanks
-- PMM
Akihiko Odaki Dec. 21, 2023, 6:55 a.m. UTC | #4
On 2023/12/19 23:14, Peter Maydell wrote:
> On Tue, 19 Dec 2023 at 13:49, Huang Rui <ray.huang@amd.com> wrote:
>>
>> On Tue, Dec 19, 2023 at 08:20:22PM +0800, Akihiko Odaki wrote:
>>> On 2023/12/19 16:53, Huang Rui wrote:
>>>> Sync up kernel headers to update venus macro till they are merged into
>>>> mainline.
>>>
>>> Thanks for sorting things out with the kernel and spec.
>>>
>>>>
>>>> Signed-off-by: Huang Rui <ray.huang@amd.com>
>>>> ---
>>>>
>>>> Changes in v6:
>>>> - Venus capset is applied in kernel, so update it in qemu for future use.
>>>>
>>>> https://lore.kernel.org/lkml/b79dcf75-c9e8-490e-644f-3b97d95f7397@collabora.com/
>>>> https://cgit.freedesktop.org/drm-misc/commit/?id=216d86b9a430f3280e5b631c51e6fd1a7774cfa0
>>> Please include the link to the upstream commit in the commit message.
>>
>> So far, it's in drm maintainers' branch not in kernel mainline yet. Do I
>> need to wait it to be merged into kernel mainline?
> 
> For an RFC patchset, no. For patches to be merged into QEMU
> the headers change must be in the kernel mainline, and the
> QEMU commit that updates our copy of the headers must be a
> full-sync done with scripts/update-linux-headers.sh, not a
> manual edit.

Apparently the kernel change is unlikely to be merged to mainline before 
QEMU 9.0 so we need to come up with some idea to deal with this.

The release of Linux 6.7 is near and the development of 6.8 will start 
soon. So it was nice if the change made into 6.8, but unfortunately it 
missed the *probably last* drm-misc tree pull request for 6.8:
https://lore.kernel.org/all/aqpn5miejmkks7pbcfex7b6u63uwsruywxsnr3x5ljs45qatin@nbkkej2elk46/

It will still get into linux-next so we may retrieve headers from 
linux-next. Or we may add the definition to 
hw/display/virtio-gpu-virgl.c; the duplicate definition warning will 
tell when the definition becomes no longer necessary. I'm fine with 
either option.

Regards,
Akihiko Odaki
Marc-André Lureau Jan. 2, 2024, 10:42 a.m. UTC | #5
Hi

On Thu, Dec 21, 2023 at 10:55 AM Akihiko Odaki <akihiko.odaki@daynix.com> wrote:
>
> On 2023/12/19 23:14, Peter Maydell wrote:
> > On Tue, 19 Dec 2023 at 13:49, Huang Rui <ray.huang@amd.com> wrote:
> >>
> >> On Tue, Dec 19, 2023 at 08:20:22PM +0800, Akihiko Odaki wrote:
> >>> On 2023/12/19 16:53, Huang Rui wrote:
> >>>> Sync up kernel headers to update venus macro till they are merged into
> >>>> mainline.
> >>>
> >>> Thanks for sorting things out with the kernel and spec.
> >>>
> >>>>
> >>>> Signed-off-by: Huang Rui <ray.huang@amd.com>
> >>>> ---
> >>>>
> >>>> Changes in v6:
> >>>> - Venus capset is applied in kernel, so update it in qemu for future use.
> >>>>
> >>>> https://lore.kernel.org/lkml/b79dcf75-c9e8-490e-644f-3b97d95f7397@collabora.com/
> >>>> https://cgit.freedesktop.org/drm-misc/commit/?id=216d86b9a430f3280e5b631c51e6fd1a7774cfa0
> >>> Please include the link to the upstream commit in the commit message.
> >>
> >> So far, it's in drm maintainers' branch not in kernel mainline yet. Do I
> >> need to wait it to be merged into kernel mainline?
> >
> > For an RFC patchset, no. For patches to be merged into QEMU
> > the headers change must be in the kernel mainline, and the
> > QEMU commit that updates our copy of the headers must be a
> > full-sync done with scripts/update-linux-headers.sh, not a
> > manual edit.
>
> Apparently the kernel change is unlikely to be merged to mainline before
> QEMU 9.0 so we need to come up with some idea to deal with this.
>
> The release of Linux 6.7 is near and the development of 6.8 will start
> soon. So it was nice if the change made into 6.8, but unfortunately it
> missed the *probably last* drm-misc tree pull request for 6.8:
> https://lore.kernel.org/all/aqpn5miejmkks7pbcfex7b6u63uwsruywxsnr3x5ljs45qatin@nbkkej2elk46/
>
> It will still get into linux-next so we may retrieve headers from
> linux-next. Or we may add the definition to
> hw/display/virtio-gpu-virgl.c; the duplicate definition warning will
> tell when the definition becomes no longer necessary. I'm fine with
> either option.

The second option seems better to me, as it can avoid pulling unwanted changes.

thanks
Huang Rui Jan. 3, 2024, 5:58 a.m. UTC | #6
On Tue, Dec 19, 2023 at 08:20:22PM +0800, Akihiko Odaki wrote:
> On 2023/12/19 16:53, Huang Rui wrote:
> > Sync up kernel headers to update venus macro till they are merged into
> > mainline.
> 
> Thanks for sorting things out with the kernel and spec.
> 
> > 
> > Signed-off-by: Huang Rui <ray.huang@amd.com>
> > ---
> > 
> > Changes in v6:
> > - Venus capset is applied in kernel, so update it in qemu for future use.
> > 
> > https://lore.kernel.org/lkml/b79dcf75-c9e8-490e-644f-3b97d95f7397@collabora.com/
> > https://cgit.freedesktop.org/drm-misc/commit/?id=216d86b9a430f3280e5b631c51e6fd1a7774cfa0
> Please include the link to the upstream commit in the commit message.

OK, I will add this info in qemu commit message.

Thanks,
Ray
Huang Rui Jan. 3, 2024, 6:03 a.m. UTC | #7
On Tue, Dec 19, 2023 at 10:14:28PM +0800, Peter Maydell wrote:
> On Tue, 19 Dec 2023 at 13:49, Huang Rui <ray.huang@amd.com> wrote:
> >
> > On Tue, Dec 19, 2023 at 08:20:22PM +0800, Akihiko Odaki wrote:
> > > On 2023/12/19 16:53, Huang Rui wrote:
> > > > Sync up kernel headers to update venus macro till they are merged into
> > > > mainline.
> > >
> > > Thanks for sorting things out with the kernel and spec.
> > >
> > > >
> > > > Signed-off-by: Huang Rui <ray.huang@amd.com>
> > > > ---
> > > >
> > > > Changes in v6:
> > > > - Venus capset is applied in kernel, so update it in qemu for future use.
> > > >
> > > > https://lore.kernel.org/lkml/b79dcf75-c9e8-490e-644f-3b97d95f7397@collabora.com/
> > > > https://cgit.freedesktop.org/drm-misc/commit/?id=216d86b9a430f3280e5b631c51e6fd1a7774cfa0
> > > Please include the link to the upstream commit in the commit message.
> >
> > So far, it's in drm maintainers' branch not in kernel mainline yet. Do I
> > need to wait it to be merged into kernel mainline?
> 
> For an RFC patchset, no. For patches to be merged into QEMU
> the headers change must be in the kernel mainline, and the
> QEMU commit that updates our copy of the headers must be a
> full-sync done with scripts/update-linux-headers.sh, not a
> manual edit.
> 

Yes, according to the comment in previous series, I am using
update-linux-headers.sh to generate the patch. But here, the patch is not
merged in mainline yet.

Thanks,
Ray
Huang Rui Jan. 3, 2024, 6:35 a.m. UTC | #8
On Tue, Jan 02, 2024 at 06:42:44PM +0800, Marc-André Lureau wrote:
> Hi
> 
> On Thu, Dec 21, 2023 at 10:55 AM Akihiko Odaki <akihiko.odaki@daynix.com> wrote:
> >
> > On 2023/12/19 23:14, Peter Maydell wrote:
> > > On Tue, 19 Dec 2023 at 13:49, Huang Rui <ray.huang@amd.com> wrote:
> > >>
> > >> On Tue, Dec 19, 2023 at 08:20:22PM +0800, Akihiko Odaki wrote:
> > >>> On 2023/12/19 16:53, Huang Rui wrote:
> > >>>> Sync up kernel headers to update venus macro till they are merged into
> > >>>> mainline.
> > >>>
> > >>> Thanks for sorting things out with the kernel and spec.
> > >>>
> > >>>>
> > >>>> Signed-off-by: Huang Rui <ray.huang@amd.com>
> > >>>> ---
> > >>>>
> > >>>> Changes in v6:
> > >>>> - Venus capset is applied in kernel, so update it in qemu for future use.
> > >>>>
> > >>>> https://lore.kernel.org/lkml/b79dcf75-c9e8-490e-644f-3b97d95f7397@collabora.com/
> > >>>> https://cgit.freedesktop.org/drm-misc/commit/?id=216d86b9a430f3280e5b631c51e6fd1a7774cfa0
> > >>> Please include the link to the upstream commit in the commit message.
> > >>
> > >> So far, it's in drm maintainers' branch not in kernel mainline yet. Do I
> > >> need to wait it to be merged into kernel mainline?
> > >
> > > For an RFC patchset, no. For patches to be merged into QEMU
> > > the headers change must be in the kernel mainline, and the
> > > QEMU commit that updates our copy of the headers must be a
> > > full-sync done with scripts/update-linux-headers.sh, not a
> > > manual edit.
> >
> > Apparently the kernel change is unlikely to be merged to mainline before
> > QEMU 9.0 so we need to come up with some idea to deal with this.

May I know when QEMU 9.0 will be released?

> >
> > The release of Linux 6.7 is near and the development of 6.8 will start
> > soon. So it was nice if the change made into 6.8, but unfortunately it
> > missed the *probably last* drm-misc tree pull request for 6.8:
> > https://lore.kernel.org/all/aqpn5miejmkks7pbcfex7b6u63uwsruywxsnr3x5ljs45qatin@nbkkej2elk46/
> >
> > It will still get into linux-next so we may retrieve headers from
> > linux-next. Or we may add the definition to
> > hw/display/virtio-gpu-virgl.c; the duplicate definition warning will
> > tell when the definition becomes no longer necessary. I'm fine with
> > either option.
> 
> The second option seems better to me, as it can avoid pulling unwanted changes.
> 

I will keep an eye on dri-devel mailing list. And ok, I will add the
definition in virtio-gpu-virgl.c and remove it once kernel patch is merged
by mainline.

Thanks,
Ray
diff mbox series

Patch

diff --git a/include/standard-headers/linux/virtio_gpu.h b/include/standard-headers/linux/virtio_gpu.h
index 2da48d3d4c..2db643ed8f 100644
--- a/include/standard-headers/linux/virtio_gpu.h
+++ b/include/standard-headers/linux/virtio_gpu.h
@@ -309,6 +309,8 @@  struct virtio_gpu_cmd_submit {
 
 #define VIRTIO_GPU_CAPSET_VIRGL 1
 #define VIRTIO_GPU_CAPSET_VIRGL2 2
+/* 3 is reserved for gfxstream */
+#define VIRTIO_GPU_CAPSET_VENUS 4
 
 /* VIRTIO_GPU_CMD_GET_CAPSET_INFO */
 struct virtio_gpu_get_capset_info {