qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: 刘聪 <liucong2565@phytium.com.cn>
To: "Dmitry Osipenko" <dmitry.osipenko@collabora.com>
Cc: Jiqian.Chen@amd.com, akihiko.odaki@daynix.com,
	alex.bennee@linaro.org, alexander.deucher@amd.com,
	christian.koenig@amd.com, gert.wollny@collabora.com,
	gurchetansingh@chromium.org, hi@alyssa.is,
	honglei1.huang@amd.com, julia.zhang@amd.com, kraxel@redhat.com,
	marcandre.lureau@redhat.com, mst@redhat.com, pbonzini@redhat.com,
	philmd@linaro.org, pierre-eric.pelloux-prayer@amd.com,
	qemu-devel@nongnu.org, ray.huang@amd.com, robdclark@gmail.com,
	roger.pau@citrix.com, slp@redhat.com, stefano.stabellini@amd.com,
	xenia.ragiadakou@amd.com, zzyiwei@chromium.org
Subject: Re: Re: [PATCH v11 04/10] virtio-gpu: Support asynchronous fencing
Date: Fri, 11 Apr 2025 09:42:19 +0800 (GMT+08:00)	[thread overview]
Message-ID: <5514d916.6d34.19622831b11.Coremail.liucong2565@phytium.com.cn> (raw)
In-Reply-To: <d0e9e72a-02bf-4f1e-abe0-6e8d0d089b29@collabora.com>




> -----Original Messages-----
> From: "Dmitry Osipenko" <dmitry.osipenko@collabora.com>
> Send time:Friday, 04/11/2025 05:59:11
> To: "Cong Liu" <liucong2565@phytium.com.cn>
> Cc: Jiqian.Chen@amd.com, akihiko.odaki@daynix.com, alex.bennee@linaro.org, alexander.deucher@amd.com, christian.koenig@amd.com, gert.wollny@collabora.com, gurchetansingh@chromium.org, hi@alyssa.is, honglei1.huang@amd.com, julia.zhang@amd.com, kraxel@redhat.com, marcandre.lureau@redhat.com, mst@redhat.com, pbonzini@redhat.com, philmd@linaro.org, pierre-eric.pelloux-prayer@amd.com, qemu-devel@nongnu.org, ray.huang@amd.com, robdclark@gmail.com, roger.pau@citrix.com, slp@redhat.com, stefano.stabellini@amd.com, xenia.ragiadakou@amd.com, zzyiwei@chromium.org
> Subject: Re: [PATCH v11 04/10] virtio-gpu: Support asynchronous fencing
> 
> 10.04.2025 12:54, Cong Liu пишет:
> > I discovered that on an ARM64 environment, the 'virtio-gpu: Support asynchronous fencing' patch causes the virtual machine GUI to fail to display. Rolling back this patch and using virgl allows the virtual machine to start normally. When the VM screen is black, I can see some errors in QEMU. I used QEMU's -serial stdio to enter the virtual machine's command line console but didn't see any errors inside the VM - the graphical interface seems to be stuck. I would greatly appreciate any suggestions regarding effective troubleshooting methods or specific areas I should investigate to resolve this issue.
> > 
> > Here's my software and hardware environment:
> > - host and guest are ubuntu 24.04
> > - QEMU: https://gitlab.freedesktop.org/digetx/qemu.git native-context-v11 branch
> > - virglrender: latest main branch 08eb12d00711370002e8f8fa6d620df9b79f9e27
> > - Mesa: Mesa 25.0~git2504031308.ff386e~oibaf~n (git-ff386eb 2025-04-03 noble-oibaf-ppa)
> > - Kernel: Linux d3000 6.14.1-061401-generic #202504071048
> > - GPU: Radeon RX 6600/6600 XT/6600M
> > - CPU: phytium D3000 aarch64
> > 
> > Here's the command I'm using to run the virtual machine, which displays a black frame with "Display output is not active" and fails to start the graphical interface normally:
> > 
> >     phytium@d3000:~/working/qemu$ /usr/local/bin/qemu-system-aarch64 --machine virt,accel=kvm -cpu host -smp 4 -m 4G -drive file=/home/phytium/working/ubuntu24.04-aarch64-native-context,format=raw,if=virtio -bios /usr/share/AAVMF/AAVMF_CODE.ms.fd -netdev user,id=net0 -device virtio-net-pci,netdev=net0 -device virtio-gpu-gl -display gtk,gl=on,show-cursor=on -device usb-ehci,id=usb -device usb-mouse,bus=usb.0 -device usb-kbd,bus=usb.0
> > 
> >     (qemu:46029): Gdk-WARNING **: 16:43:53.715: eglMakeCurrent failed
> >     (qemu:46029): Gdk-WARNING **: 16:43:53.715: eglMakeCurrent failed
> >     (qemu:46029): Gdk-WARNING **: 16:43:53.715: eglMakeCurrent failed
> >     (qemu:46029): Gdk-WARNING **: 16:43:53.715: eglMakeCurrent failed
> >     (qemu:46029): Gdk-WARNING **: 16:43:53.716: eglMakeCurrent failed
> > 
> > When using SDL, the error messages are slightly different:
> > 
> >     phytium@d3000:~/working/qemu$ /usr/local/bin/qemu-system-aarch64 --machine virt,accel=kvm -cpu host -smp 4 -m 4G -drive file=/home/phytium/working/ubuntu24.04-aarch64-native-context,format=raw,if=virtio -bios /usr/share/AAVMF/AAVMF_CODE.ms.fd -netdev user,id=net0 -device virtio-net-pci,netdev=net0 -device virtio-gpu-gl -display sdl,gl=on,show-cursor=on -device usb-ehci,id=usb -device usb-mouse,bus=usb.0 -device usb-kbd,bus=usb.0
> > 
> >     vrend_renderer_fill_caps: Entering with stale GL error: 1286
> > 
> 
> Hi,
> 
> 1. Please make sure that you're not only building QEMU against your
> virglrenderer version, but also setting LD_LIBRARY_PATH properly at
> runtime. Best to remove system version of virglrenderer if unsure,

I built and installed virglrenderer with the --prefix=/usr option, so
 it replaces the system version as expected.

> 
> 2. Can you reproduce this problem using tcg instead of kvm?
> 

 yes, change qemu command '--machine virt,accel=kvm -cpu host' to
'--machine virt -cpu max' can reproduce this problem. 
> -- 
> Best regards,
> Dmitry

diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c
index f6df9dcb..f6e06842 100644
--- a/src/vrend_renderer.c
+++ b/src/vrend_renderer.c
@@ -12808,7 +12808,7 @@ void vrend_renderer_fill_caps(uint32_t set, uint32_t version,
                               union virgl_caps *caps)
 {
    int gl_ver, gles_ver;
-   GLenum err;
+   GLenum err = GL_NO_ERROR;
    bool fill_capset2 = false;
 
    if (!caps)

phytium@d3000:~/working/qemu$ git log --oneline  -n 10
e0286f56c8 (HEAD -> native-context-v11, origin/native-context-v11) Revert "amd_iommu: Add support for pass though mode"
d6e9eb0f0d docs/system: virtio-gpu: Document host/guest requirements
55db821ea5 docs/system: virtio-gpu: Update Venus link
003940db9a docs/system: virtio-gpu: Add link to Mesa VirGL doc
7674e82755 ui/gtk: Don't disable scanout when display is refreshed
712fd024e3 ui/sdl2: Don't disable scanout when display is refreshed
9003da356f virtio-gpu: Support DRM native context
e2ff4f4a48 virtio-gpu: Support asynchronous fencing
25458c7625 virtio-gpu: Handle virgl fence creation errors

I tried initializing GLenum err = GL_NO_ERROR in vrend_renderer_fill_caps, but it doesn’t seem to resolve the “Entering with stale GL error: 1286” message. However, this error might not be directly related to the VM black screen issue. I noticed that even when the VM was working correctly—specifically when I reset to commit 25458c7625—the same GL error still appeared.

Best regards,
liucong


信息安全声明:本邮件包含信息归发件人所在组织所有,发件人所在组织对该邮件拥有所有权利。请接收者注意保密,未经发件人书面许可,不得向任何第三方组织和个人透露本邮件所含信息。
Information Security Notice: The information contained in this mail is solely property of the sender's organization.This mail communication is confidential.Recipients named above are obligated to maintain secrecy and are not permitted to disclose the contents of this communication to others.

  reply	other threads:[~2025-04-11  1:43 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-10 12:05 [PATCH v11 00/10] Support virtio-gpu DRM native context Dmitry Osipenko
2025-03-10 12:05 ` [PATCH v11 01/10] ui/sdl2: Restore original context after new context creation Dmitry Osipenko
2025-03-10 12:05 ` [PATCH v11 02/10] ui/sdl2: Implement dpy dmabuf functions Dmitry Osipenko
2025-03-10 12:05 ` [PATCH v11 03/10] virtio-gpu: Handle virgl fence creation errors Dmitry Osipenko
2025-03-10 12:05 ` [PATCH v11 04/10] virtio-gpu: Support asynchronous fencing Dmitry Osipenko
2025-04-10  9:54   ` Cong Liu
2025-04-10 21:59     ` Dmitry Osipenko
2025-04-11  1:42       ` 刘聪 [this message]
2025-04-14 14:47         ` Dmitry Osipenko
2025-04-26 22:27           ` Dmitry Osipenko
2025-04-27 11:53             ` 刘聪
2025-04-27 12:54               ` Alex Bennée
2025-04-28 14:38                 ` Sean Christopherson
2025-04-27 14:16               ` Dmitry Osipenko
2025-04-28 10:07                 ` Alex Bennée
2025-04-28 12:51                   ` liucong2565
2025-04-28 13:55                     ` Alex Bennée
2025-03-10 12:05 ` [PATCH v11 05/10] virtio-gpu: Support DRM native context Dmitry Osipenko
2025-03-10 12:05 ` [PATCH v11 06/10] ui/sdl2: Don't disable scanout when display is refreshed Dmitry Osipenko
2025-03-10 12:05 ` [PATCH v11 07/10] ui/gtk: " Dmitry Osipenko
2025-03-10 12:05 ` [PATCH v11 08/10] docs/system: virtio-gpu: Add link to Mesa VirGL doc Dmitry Osipenko
2025-03-10 12:05 ` [PATCH v11 09/10] docs/system: virtio-gpu: Update Venus link Dmitry Osipenko
2025-03-10 12:05 ` [PATCH v11 10/10] docs/system: virtio-gpu: Document host/guest requirements Dmitry Osipenko
2025-03-10 12:25   ` Akihiko Odaki
2025-03-10 12:29     ` Dmitry Osipenko

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=5514d916.6d34.19622831b11.Coremail.liucong2565@phytium.com.cn \
    --to=liucong2565@phytium.com.cn \
    --cc=Jiqian.Chen@amd.com \
    --cc=akihiko.odaki@daynix.com \
    --cc=alex.bennee@linaro.org \
    --cc=alexander.deucher@amd.com \
    --cc=christian.koenig@amd.com \
    --cc=dmitry.osipenko@collabora.com \
    --cc=gert.wollny@collabora.com \
    --cc=gurchetansingh@chromium.org \
    --cc=hi@alyssa.is \
    --cc=honglei1.huang@amd.com \
    --cc=julia.zhang@amd.com \
    --cc=kraxel@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=philmd@linaro.org \
    --cc=pierre-eric.pelloux-prayer@amd.com \
    --cc=qemu-devel@nongnu.org \
    --cc=ray.huang@amd.com \
    --cc=robdclark@gmail.com \
    --cc=roger.pau@citrix.com \
    --cc=slp@redhat.com \
    --cc=stefano.stabellini@amd.com \
    --cc=xenia.ragiadakou@amd.com \
    --cc=zzyiwei@chromium.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;
as well as URLs for NNTP newsgroup(s).