<div dir="ltr"><div>Hi all,</div><div><br></div><div>Thank you Erico and Kamil for the reviews. very much appreciated.<br></div><div><br></div><div>BR,</div><div>Dorinda.</div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Wed, Jun 11, 2025 at 7:05 PM Kamil Konieczny <<a href="mailto:kamil.konieczny@linux.intel.com">kamil.konieczny@linux.intel.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Erico,<br>
On 2025-06-11 at 18:10:52 +0200, Erico Nunes wrote:<br>
> Hello,<br>
> <br>
> On 6/10/25 6:30 PM, Dorinda Bassey wrote:<br>
> > This test suite adds coverage for multiple DRM ioctls specific<br>
> > to the VirtIO-GPU driver, verifying functionality such as<br>
> > resource creation, memory mapping, 3D transfers, context<br>
> > initialization, and parameter querying.<br>
> > Each test validates a key ioctl to ensure correct behavior from<br>
> > user space and backend implementations. Each subtest is<br>
> > self-contained and can be executed independently.<br>
> > <br>
> > Included subtests:<br>
> > - drm-virtgpu-map<br>
> > - drm-virtgpu-execbuffer<br>
> > - drm-virtgpu-resource-info<br>
> > - drm-virtgpu-3d-transfer-to-host<br>
> > - drm-virtgpu-3d-transfer-from-host<br>
> > - drm-virtgpu-3d-wait<br>
> > - drm-virtgpu-resource-create-blob<br>
> > - drm-virtgpu-get-caps<br>
> > - drm-virtgpu-context-init<br>
> > - drm-virtgpu-getparam<br>
> > <br>
> > How to Test with QEMU virtio-vga-gl or rustvmm vhost-device-gpu<br>
> > <br>
> > 1. Launch a QEMU guest with virtio-vga-gl<br>
> > ./build/qemu-system-x86_64 \<br>
> > -enable-kvm \<br>
> > -cpu host \<br>
> > -m 4096 \<br>
> > -machine q35 \<br>
> > -display gtk,gl=on \<br>
> > -vga none \<br>
> > -device virtio-vga-gl \<br>
> > -drive file=image.qcow2,format=qcow2 \<br>
> > -netdev user,id=n0,hostfwd=tcp::2222-:22 \<br>
> > -device virtio-net-pci,netdev=n0<br>
> > <br>
> > ssh into the guest and run the tests.<br>
> > <br>
> > 2. Start the vhost-device-gpu backend and Launch a QEMU<br>
> > guest with vhost-user-gpu-pci or vhost-user-vga, see guide on:<br>
> > <a href="https://crates.io/crates/vhost-device-gpu" rel="noreferrer" target="_blank">https://crates.io/crates/vhost-device-gpu</a><br>
> <br>
> Overall this looks quite good to me. Thanks for doing this initial batch<br>
> of tests for virtio-gpu. I think it is a good start to build upon and<br>
> start enabling some more DRM tests in CIs especially since this can<br>
> astract hardware details.<br>
> <br>
> I have a couple of comments below, to consider if you will do another<br>
> respin:<br>
> <br>
> <br>
> > <br>
> > tests/drm_virtgpu.c | 425 ++++++++++++++++++++++++++++++++++++++++++++<br>
> > tests/meson.build | 1 +<br>
> > 2 files changed, 426 insertions(+)<br>
> > create mode 100644 tests/drm_virtgpu.c<br>
> <br>
> Would it make sense for this to live in its own subdirectory? Since it<br>
> is testing "device-specific" commands (for virtio-gpu being the device).<br>
> I see that some of the other drivers have their own directory, and<br>
> currently this one is bundled together with some fairly generic DRM or<br>
> KMS API tests in meson.build.<br>
> But I'm not sure if there is a policy for this so I'd leave it to the<br>
> igt maintainers.<br>
> <br>
<br>
Lets start with something simple, new folder could be created when<br>
there will be more virtgpu tests.<br>
<br>
> > +#define VIRTGPU_DEVICE "/dev/dri/card0"<br>
> <br>
> VIRTGPU_DEVICE is unused since an earlier revision, so it can be removed.<br>
> <br>
<br>
Thank you for spotting this.<br>
<br>
Regards,<br>
Kamil<br>
<br>
> > +static const struct {<br>
> > + const char *name;<br>
> > + uint64_t id;<br>
> > +} params[] = {<br>
> > + {"3D_FEATURES", VIRTGPU_PARAM_3D_FEATURES},<br>
> > + {"CAPSET_QUERY_FIX", VIRTGPU_PARAM_CAPSET_QUERY_FIX},<br>
> > + {"RESOURCE_BLOB", VIRTGPU_PARAM_RESOURCE_BLOB},<br>
> > + {"HOST_VISIBLE", VIRTGPU_PARAM_HOST_VISIBLE},<br>
> > + {"CROSS_DEVICE", VIRTGPU_PARAM_CROSS_DEVICE},<br>
> > + {"CONTEXT_INIT", VIRTGPU_PARAM_CONTEXT_INIT},<br>
> > + {"SUPPORTED_CAPSET_IDs", VIRTGPU_PARAM_SUPPORTED_CAPSET_IDs},<br>
> > + {"EXPLICIT_DEBUG_NAME", VIRTGPU_PARAM_EXPLICIT_DEBUG_NAME},<br>
> > +};<br>
> <br>
> Might make sense to move this params array to the "drm-virtgpu-getparam"<br>
> subtest since it is only used there.<br>
> <br>
> Considering these you can add my:<br>
> Reviewed-by: Erico Nunes <<a href="mailto:ernunes@redhat.com" target="_blank">ernunes@redhat.com</a>><br>
> <br>
> Thanks<br>
> <br>
> Erico<br>
> <br>
<br>
</blockquote></div>