From: Sean Christopherson <seanjc@google.com>
To: "Alex Bennée" <alex.bennee@linaro.org>
Cc: 刘聪 <liucong2565@phytium.com.cn>,
"Dmitry Osipenko" <dmitry.osipenko@collabora.com>,
Jiqian.Chen@amd.com, akihiko.odaki@daynix.com,
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
Date: Mon, 28 Apr 2025 07:38:23 -0700 [thread overview]
Message-ID: <aA-S35Zw0EXYbDC6@google.com> (raw)
In-Reply-To: <87h629ix3n.fsf@draig.linaro.org>
On Sun, Apr 27, 2025, Alex Bennée wrote:
> 刘聪 <liucong2565@phytium.com.cn> writes:
>
> > Hi Dmitry,
> >
> > The virglrender patch can fix the virgl issue, but the native context still
> > fails to run on my machine. I'm not sure if anyone has successfully run it
> > on an ARM64 machine before.
> >
> > When running with Venus, the virtual machine can successfully run vkcube.
> > However, when using the native context, a KVM error is triggered. Both my
> > guest and host kernels are already updated to version 6.14.
> >
> > Here are the commands and error messages I encountered:
> >
> > ```
> > phytium@ubuntu:~/working/virglrenderer$
> > /opt/native-context-v11/bin/qemu-system-aarch64 --machine
> > virt,accel=kvm,memory-backend=mem1 -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,hostmem=4G,blob=on,venus=on -object
> > memory-backend-memfd,id=mem1,size=4G -display sdl,gl=on,show-cursor=on
> > -device usb-ehci,id=usb -device usb-mouse,bus=usb.0 -device
> > usb-kbd,bus=usb.0
> > phytium@ubuntu:~/working/virglrenderer$
> > phytium@ubuntu:~/working/virglrenderer$
> > /opt/native-context-v11/bin/qemu-system-aarch64 --machine
> > virt,accel=kvm,memory-backend=mem1 -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,hostmem=4G,blob=on,drm_native_context=on -object
> > memory-backend-memfd,id=mem1,size=4G -display sdl,gl=on,show-cursor=on
> > -device usb-ehci,id=usb -device usb-mouse,bus=usb.0 -device
> > usb-kbd,bus=usb.0
> > error: kvm run failed Bad address
>
> That very much looks like a page not being accessible when trying to do
> something.
Yep. The most likely scenario where KVM_RUN returns -EFAULT is when KVM can't
obtain a PFN for the faulting GPA. Odds are good it's this code:
pfn = __kvm_faultin_pfn(memslot, gfn, write_fault ? FOLL_WRITE : 0,
&writable, &page);
if (pfn == KVM_PFN_ERR_HWPOISON) {
kvm_send_hwpoison_signal(hva, vma_shift);
return 0;
}
if (is_error_noslot_pfn(pfn)) <==========
return -EFAULT;
where under the hood, __kvm_faultin_pfn() is a wrapper to gup() and
follow_pfnmap_start() (and some other things).
If you can figure out which GPA is failing, then it's "just" a matter of figuring
out why KVM doesn't find a valid mapping.
next prev parent reply other threads:[~2025-04-28 14:39 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 ` 刘聪
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 [this message]
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=aA-S35Zw0EXYbDC6@google.com \
--to=seanjc@google.com \
--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=liucong2565@phytium.com.cn \
--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 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.