All of lore.kernel.org
 help / color / mirror / Atom feed
* [Bug] virtio-gpu broken with qemu/kvm on arm64 on kernel 5.5+
@ 2020-02-20 12:44 Guillaume Gardet
  2020-02-20 18:40 ` Chia-I Wu
  0 siblings, 1 reply; 9+ messages in thread
From: Guillaume Gardet @ 2020-02-20 12:44 UTC (permalink / raw)
  To: dri-devel; +Cc: Daniel Vetter, nd, Catalin Marinas, Gerd Hoffmann

Hi,

With (guest) kernel 5.5+ with qemu/kvm on arm64, I get lots of display corruptions leading to this kind of screen:
https://openqa.opensuse.org/tests/1174521#step/yast2_i/24

I git bisected it to commit c66df701e783bc666593e6e665f13670760883ee
**********
drm/virtio: switch from ttm to gem shmem helpers

  virtio-gpu basically needs a sg_table for the bo, to tell the host where
  the backing pages for the object are.  So the gem shmem helpers are a
  perfect fit.  Some drm_gem_object_funcs need thin wrappers to update the
  host state, but otherwise the helpers handle everything just fine.
  
  Once the fencing was sorted the switch was surprisingly easy and for the
  most part just removing the ttm code.
  
  v4: fix drm_gem_object_funcs name.
  
  Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
  Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
  Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
  Link: http://patchwork.freedesktop.org/patch/msgid/20190829103301.3539-15-kraxel@redhat.com
**********

I also tested kernel 5.6-rc2 which has the same bug.
Without kvm, the display is fine.

Regards,
Guillaume

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Bug] virtio-gpu broken with qemu/kvm on arm64 on kernel 5.5+
  2020-02-20 12:44 [Bug] virtio-gpu broken with qemu/kvm on arm64 on kernel 5.5+ Guillaume Gardet
@ 2020-02-20 18:40 ` Chia-I Wu
  2020-02-21 10:06   ` Guillaume Gardet
  0 siblings, 1 reply; 9+ messages in thread
From: Chia-I Wu @ 2020-02-20 18:40 UTC (permalink / raw)
  To: Guillaume Gardet
  Cc: Daniel Vetter, nd, Gerd Hoffmann, dri-devel, Catalin Marinas

On Thu, Feb 20, 2020 at 4:44 AM Guillaume Gardet
<Guillaume.Gardet@arm.com> wrote:
>
> Hi,
>
> With (guest) kernel 5.5+ with qemu/kvm on arm64, I get lots of display corruptions leading to this kind of screen:
> https://openqa.opensuse.org/tests/1174521#step/yast2_i/24
Looking at the screenshot, it seems cacheline-related?

There was a change of memory type

  https://lists.freedesktop.org/archives/dri-devel/2019-August/233456.html

While the guest memory type is ignored on Intel, it is honored on ARM.
This attempt to fix it

  https://lists.freedesktop.org/archives/dri-devel/2019-December/248271.html

does not seem to land.


>
> I git bisected it to commit c66df701e783bc666593e6e665f13670760883ee
> **********
> drm/virtio: switch from ttm to gem shmem helpers
>
>   virtio-gpu basically needs a sg_table for the bo, to tell the host where
>   the backing pages for the object are.  So the gem shmem helpers are a
>   perfect fit.  Some drm_gem_object_funcs need thin wrappers to update the
>   host state, but otherwise the helpers handle everything just fine.
>
>   Once the fencing was sorted the switch was surprisingly easy and for the
>   most part just removing the ttm code.
>
>   v4: fix drm_gem_object_funcs name.
>
>   Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
>   Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
>   Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
>   Link: http://patchwork.freedesktop.org/patch/msgid/20190829103301.3539-15-kraxel@redhat.com
> **********
>
> I also tested kernel 5.6-rc2 which has the same bug.
> Without kvm, the display is fine.
>
> Regards,
> Guillaume
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: [Bug] virtio-gpu broken with qemu/kvm on arm64 on kernel 5.5+
  2020-02-20 18:40 ` Chia-I Wu
@ 2020-02-21 10:06   ` Guillaume Gardet
  2020-02-21 18:40     ` Chia-I Wu
  0 siblings, 1 reply; 9+ messages in thread
From: Guillaume Gardet @ 2020-02-21 10:06 UTC (permalink / raw)
  To: Chia-I Wu; +Cc: Daniel Vetter, nd, Gerd Hoffmann, dri-devel, Catalin Marinas

Hi,

> -----Original Message-----
> From: Chia-I Wu <olvaffe@gmail.com>
> Sent: 20 February 2020 19:41
> To: Guillaume Gardet <Guillaume.Gardet@arm.com>
> Cc: dri-devel@lists.freedesktop.org; Gerd Hoffmann <kraxel@redhat.com>;
> Daniel Vetter <daniel.vetter@ffwll.ch>; Catalin Marinas
> <Catalin.Marinas@arm.com>; nd <nd@arm.com>
> Subject: Re: [Bug] virtio-gpu broken with qemu/kvm on arm64 on kernel 5.5+
> 
> On Thu, Feb 20, 2020 at 4:44 AM Guillaume Gardet <Guillaume.Gardet@arm.com>
> wrote:
> >
> > Hi,
> >
> > With (guest) kernel 5.5+ with qemu/kvm on arm64, I get lots of display
> corruptions leading to this kind of screen:
> > https://openqa.opensuse.org/tests/1174521#step/yast2_i/24
> Looking at the screenshot, it seems cacheline-related?

It could be.

> 
> There was a change of memory type
> 
>   https://lists.freedesktop.org/archives/dri-devel/2019-August/233456.html
> 
> While the guest memory type is ignored on Intel, it is honored on ARM.
> This attempt to fix it
> 
>   https://lists.freedesktop.org/archives/dri-devel/2019-December/248271.html
> 
> does not seem to land.

I applied this patch on top of 5.5.4, but it does not fix the problem.
Maybe more similar changes are required?

Regards,
Guillaume

> 
> 
> >
> > I git bisected it to commit c66df701e783bc666593e6e665f13670760883ee
> > **********
> > drm/virtio: switch from ttm to gem shmem helpers
> >
> >   virtio-gpu basically needs a sg_table for the bo, to tell the host where
> >   the backing pages for the object are.  So the gem shmem helpers are a
> >   perfect fit.  Some drm_gem_object_funcs need thin wrappers to update the
> >   host state, but otherwise the helpers handle everything just fine.
> >
> >   Once the fencing was sorted the switch was surprisingly easy and for the
> >   most part just removing the ttm code.
> >
> >   v4: fix drm_gem_object_funcs name.
> >
> >   Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> >   Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> >   Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
> >   Link:
> > http://patchwork.freedesktop.org/patch/msgid/20190829103301.3539-15-kr
> > axel@redhat.com
> > **********
> >
> > I also tested kernel 5.6-rc2 which has the same bug.
> > Without kvm, the display is fine.
> >
> > Regards,
> > Guillaume
> >
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Bug] virtio-gpu broken with qemu/kvm on arm64 on kernel 5.5+
  2020-02-21 10:06   ` Guillaume Gardet
@ 2020-02-21 18:40     ` Chia-I Wu
  2020-02-22  0:47       ` Gurchetan Singh
  0 siblings, 1 reply; 9+ messages in thread
From: Chia-I Wu @ 2020-02-21 18:40 UTC (permalink / raw)
  To: Guillaume Gardet
  Cc: Daniel Vetter, dri-devel, Gurchetan Singh, Gerd Hoffmann,
	Catalin Marinas, nd

On Fri, Feb 21, 2020 at 2:06 AM Guillaume Gardet
<Guillaume.Gardet@arm.com> wrote:
>
> Hi,
>
> > -----Original Message-----
> > From: Chia-I Wu <olvaffe@gmail.com>
> > Sent: 20 February 2020 19:41
> > To: Guillaume Gardet <Guillaume.Gardet@arm.com>
> > Cc: dri-devel@lists.freedesktop.org; Gerd Hoffmann <kraxel@redhat.com>;
> > Daniel Vetter <daniel.vetter@ffwll.ch>; Catalin Marinas
> > <Catalin.Marinas@arm.com>; nd <nd@arm.com>
> > Subject: Re: [Bug] virtio-gpu broken with qemu/kvm on arm64 on kernel 5.5+
> >
> > On Thu, Feb 20, 2020 at 4:44 AM Guillaume Gardet <Guillaume.Gardet@arm.com>
> > wrote:
> > >
> > > Hi,
> > >
> > > With (guest) kernel 5.5+ with qemu/kvm on arm64, I get lots of display
> > corruptions leading to this kind of screen:
> > > https://openqa.opensuse.org/tests/1174521#step/yast2_i/24
> > Looking at the screenshot, it seems cacheline-related?
>
> It could be.
>
> >
> > There was a change of memory type
> >
> >   https://lists.freedesktop.org/archives/dri-devel/2019-August/233456.html
> >
> > While the guest memory type is ignored on Intel, it is honored on ARM.
> > This attempt to fix it
> >
> >   https://lists.freedesktop.org/archives/dri-devel/2019-December/248271.html
> >
> > does not seem to land.
>
> I applied this patch on top of 5.5.4, but it does not fix the problem.
> Maybe more similar changes are required?
The patch looks legit.  Maybe the memory type is not the root cause?
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Bug] virtio-gpu broken with qemu/kvm on arm64 on kernel 5.5+
  2020-02-21 18:40     ` Chia-I Wu
@ 2020-02-22  0:47       ` Gurchetan Singh
  2020-02-24 12:59         ` Guillaume Gardet
  0 siblings, 1 reply; 9+ messages in thread
From: Gurchetan Singh @ 2020-02-22  0:47 UTC (permalink / raw)
  To: Guillaume Gardet
  Cc: Daniel Vetter, dri-devel, Gerd Hoffmann, Catalin Marinas, nd

On Fri, Feb 21, 2020 at 10:41 AM Chia-I Wu <olvaffe@gmail.com> wrote:
>
> On Fri, Feb 21, 2020 at 2:06 AM Guillaume Gardet
> <Guillaume.Gardet@arm.com> wrote:
> >
> > Hi,
> >
> > > -----Original Message-----
> > > From: Chia-I Wu <olvaffe@gmail.com>
> > > Sent: 20 February 2020 19:41
> > > To: Guillaume Gardet <Guillaume.Gardet@arm.com>
> > > Cc: dri-devel@lists.freedesktop.org; Gerd Hoffmann <kraxel@redhat.com>;
> > > Daniel Vetter <daniel.vetter@ffwll.ch>; Catalin Marinas
> > > <Catalin.Marinas@arm.com>; nd <nd@arm.com>
> > > Subject: Re: [Bug] virtio-gpu broken with qemu/kvm on arm64 on kernel 5.5+
> > >
> > > On Thu, Feb 20, 2020 at 4:44 AM Guillaume Gardet <Guillaume.Gardet@arm.com>
> > > wrote:
> > > >
> > > > Hi,
> > > >
> > > > With (guest) kernel 5.5+ with qemu/kvm on arm64, I get lots of display
> > > corruptions leading to this kind of screen:
> > > > https://openqa.opensuse.org/tests/1174521#step/yast2_i/24
> > > Looking at the screenshot, it seems cacheline-related?
> >
> > It could be.
> >
> > >
> > > There was a change of memory type
> > >
> > >   https://lists.freedesktop.org/archives/dri-devel/2019-August/233456.html
> > >
> > > While the guest memory type is ignored on Intel, it is honored on ARM.
> > > This attempt to fix it
> > >
> > >   https://lists.freedesktop.org/archives/dri-devel/2019-December/248271.html
> > >
> > > does not seem to land.
> >
> > I applied this patch on top of 5.5.4, but it does not fix the problem.
> > Maybe more similar changes are required?
> The patch looks legit.  Maybe the memory type is not the root cause?

Perhaps try the entire series?

https://patchwork.kernel.org/cover/11300619/
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: [Bug] virtio-gpu broken with qemu/kvm on arm64 on kernel 5.5+
  2020-02-22  0:47       ` Gurchetan Singh
@ 2020-02-24 12:59         ` Guillaume Gardet
  2020-02-26  6:45           ` Gerd Hoffmann
  0 siblings, 1 reply; 9+ messages in thread
From: Guillaume Gardet @ 2020-02-24 12:59 UTC (permalink / raw)
  To: Gurchetan Singh
  Cc: Daniel Vetter, dri-devel, Gerd Hoffmann, Catalin Marinas, nd



> -----Original Message-----
> From: Gurchetan Singh <gurchetansingh@chromium.org>
> Sent: 22 February 2020 01:47
> To: Guillaume Gardet <Guillaume.Gardet@arm.com>
> Cc: dri-devel@lists.freedesktop.org; Gerd Hoffmann <kraxel@redhat.com>;
> Daniel Vetter <daniel.vetter@ffwll.ch>; Catalin Marinas
> <Catalin.Marinas@arm.com>; nd <nd@arm.com>; Chia-I Wu
> <olvaffe@gmail.com>
> Subject: Re: [Bug] virtio-gpu broken with qemu/kvm on arm64 on kernel 5.5+
> 
> On Fri, Feb 21, 2020 at 10:41 AM Chia-I Wu <olvaffe@gmail.com> wrote:
> >
> > On Fri, Feb 21, 2020 at 2:06 AM Guillaume Gardet
> > <Guillaume.Gardet@arm.com> wrote:
> > >
> > > Hi,
> > >
> > > > -----Original Message-----
> > > > From: Chia-I Wu <olvaffe@gmail.com>
> > > > Sent: 20 February 2020 19:41
> > > > To: Guillaume Gardet <Guillaume.Gardet@arm.com>
> > > > Cc: dri-devel@lists.freedesktop.org; Gerd Hoffmann
> > > > <kraxel@redhat.com>; Daniel Vetter <daniel.vetter@ffwll.ch>;
> > > > Catalin Marinas <Catalin.Marinas@arm.com>; nd <nd@arm.com>
> > > > Subject: Re: [Bug] virtio-gpu broken with qemu/kvm on arm64 on
> > > > kernel 5.5+
> > > >
> > > > On Thu, Feb 20, 2020 at 4:44 AM Guillaume Gardet
> > > > <Guillaume.Gardet@arm.com>
> > > > wrote:
> > > > >
> > > > > Hi,
> > > > >
> > > > > With (guest) kernel 5.5+ with qemu/kvm on arm64, I get lots of
> > > > > display
> > > > corruptions leading to this kind of screen:
> > > > > https://openqa.opensuse.org/tests/1174521#step/yast2_i/24
> > > > Looking at the screenshot, it seems cacheline-related?
> > >
> > > It could be.
> > >
> > > >
> > > > There was a change of memory type
> > > >
> > > >
> > > > https://lists.freedesktop.org/archives/dri-devel/2019-August/23345
> > > > 6.html
> > > >
> > > > While the guest memory type is ignored on Intel, it is honored on ARM.
> > > > This attempt to fix it
> > > >
> > > >
> > > > https://lists.freedesktop.org/archives/dri-devel/2019-December/248
> > > > 271.html
> > > >
> > > > does not seem to land.
> > >
> > > I applied this patch on top of 5.5.4, but it does not fix the problem.
> > > Maybe more similar changes are required?
> > The patch looks legit.  Maybe the memory type is not the root cause?
> 
> Perhaps try the entire series?
> 
> https://patchwork.kernel.org/cover/11300619/

Applied entire series on top of 5.5.6, but still the same problem.

Guillaume

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Bug] virtio-gpu broken with qemu/kvm on arm64 on kernel 5.5+
  2020-02-24 12:59         ` Guillaume Gardet
@ 2020-02-26  6:45           ` Gerd Hoffmann
  2020-02-26 14:32             ` Guillaume Gardet
  0 siblings, 1 reply; 9+ messages in thread
From: Gerd Hoffmann @ 2020-02-26  6:45 UTC (permalink / raw)
  To: Guillaume Gardet
  Cc: Daniel Vetter, dri-devel, Gurchetan Singh, Catalin Marinas, nd

  Hi,

> > Perhaps try the entire series?
> > 
> > https://patchwork.kernel.org/cover/11300619/

Latest version is at:
   https://git.kraxel.org/cgit/linux/log/?h=drm-virtio-no-wc

> Applied entire series on top of 5.5.6, but still the same problem.

Can you double-check?  Cherry-picking the shmem + virtio patches ...

  694c824491f1 drm/shmem: add support for per object caching flags.
  3f4d10f853fb drm/virtio: fix mmap page attributes

... into 5.6-rc3 fixes the corruption for me.

cheers,
  Gerd

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: [Bug] virtio-gpu broken with qemu/kvm on arm64 on kernel 5.5+
  2020-02-26  6:45           ` Gerd Hoffmann
@ 2020-02-26 14:32             ` Guillaume Gardet
  2020-02-26 15:50               ` Gerd Hoffmann
  0 siblings, 1 reply; 9+ messages in thread
From: Guillaume Gardet @ 2020-02-26 14:32 UTC (permalink / raw)
  To: Gerd Hoffmann
  Cc: Daniel Vetter, dri-devel, Gurchetan Singh, Catalin Marinas, nd

Hi,

> -----Original Message-----
> From: Gerd Hoffmann <kraxel@redhat.com>
> Sent: 26 February 2020 07:46
> To: Guillaume Gardet <Guillaume.Gardet@arm.com>
> Cc: Gurchetan Singh <gurchetansingh@chromium.org>; dri-
> devel@lists.freedesktop.org; Daniel Vetter <daniel.vetter@ffwll.ch>; Catalin
> Marinas <Catalin.Marinas@arm.com>; nd <nd@arm.com>; Chia-I Wu
> <olvaffe@gmail.com>
> Subject: Re: [Bug] virtio-gpu broken with qemu/kvm on arm64 on kernel 5.5+
> 
>   Hi,
> 
> > > Perhaps try the entire series?
> > >
> > > https://patchwork.kernel.org/cover/11300619/
> 
> Latest version is at:
>    https://git.kraxel.org/cgit/linux/log/?h=drm-virtio-no-wc
> 
> > Applied entire series on top of 5.5.6, but still the same problem.
> 
> Can you double-check?  Cherry-picking the shmem + virtio patches ...
> 
>   694c824491f1 drm/shmem: add support for per object caching flags.
>   3f4d10f853fb drm/virtio: fix mmap page attributes
> 
> ... into 5.6-rc3 fixes the corruption for me.

I tried those 2 patches on top of kernel 5.6-rc3 and they indeed fix the problem.

I applied them on top of 5.5.6 and they also fix the problem!
Could we get those 2 patches applied to stable 5.5, please?

Thanks,
Guillaume

> 
> cheers,
>   Gerd

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Bug] virtio-gpu broken with qemu/kvm on arm64 on kernel 5.5+
  2020-02-26 14:32             ` Guillaume Gardet
@ 2020-02-26 15:50               ` Gerd Hoffmann
  0 siblings, 0 replies; 9+ messages in thread
From: Gerd Hoffmann @ 2020-02-26 15:50 UTC (permalink / raw)
  To: Guillaume Gardet
  Cc: Daniel Vetter, dri-devel, Gurchetan Singh, Catalin Marinas, nd

  Hi,

> > ... into 5.6-rc3 fixes the corruption for me.
> 
> I tried those 2 patches on top of kernel 5.6-rc3 and they indeed fix the problem.
> 
> I applied them on top of 5.5.6 and they also fix the problem!
> Could we get those 2 patches applied to stable 5.5, please?

Series just re-posted.  Reviews welcome.  With some luck this makes
5.6-rc4, 5.6-rc5 otherwise, and should hit stable shortly thereafter,

cheers,
  Gerd

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-02-26 15:50 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-20 12:44 [Bug] virtio-gpu broken with qemu/kvm on arm64 on kernel 5.5+ Guillaume Gardet
2020-02-20 18:40 ` Chia-I Wu
2020-02-21 10:06   ` Guillaume Gardet
2020-02-21 18:40     ` Chia-I Wu
2020-02-22  0:47       ` Gurchetan Singh
2020-02-24 12:59         ` Guillaume Gardet
2020-02-26  6:45           ` Gerd Hoffmann
2020-02-26 14:32             ` Guillaume Gardet
2020-02-26 15:50               ` Gerd Hoffmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.