[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 5/9] virtio-gpu: add 3d mode and virgl rendering
From: |
Gerd Hoffmann |
Subject: |
Re: [Qemu-devel] [PATCH 5/9] virtio-gpu: add 3d mode and virgl rendering support. |
Date: |
Tue, 15 Sep 2015 09:33:28 +0200 |
Hi,
> > + virtio_gpu_cleanup_mapping_iov(res_iovs, num_iovs);
>
> Is res_iovs leaked here?
Oops, yes. Moving the iov release to virtio_gpu_cleanup_mapping_iov (so
things is symmetrical to virtio_gpu_create_mapping_iov which allocates
it), that'll fix it.
> > + pixels = s->current_cursor->width * s->current_cursor->height;
> > + memcpy(s->current_cursor->data, data, pixels * sizeof(uint32_t));
> > + free(data);
>
> width and height are unused; should they be compared against
> s->current_cursor->{width,height} to spot discrepancies?
Added.
> > +static void virtio_gpu_set_features(VirtIODevice *vdev, uint64_t features)
> > +{
> > + static const uint32_t virgl = (1 << VIRTIO_GPU_FEATURE_VIRGL);
> > + VirtIOGPU *g = VIRTIO_GPU(vdev);
> > +
> > + g->use_virgl_renderer = ((features & virgl) == virgl);
>
> Could a non-well-behaving guest just set this feature bit even if it was
> not reported by virtio_gpu_get_features() because it has been disabled?
I'm pretty sure virtio core doesn't allow this.
cheers,
Gerd
- [Qemu-devel] [PATCH 3/9] ui/console: add opengl context and scanout support interfaces., (continued)
- [Qemu-devel] [PATCH 3/9] ui/console: add opengl context and scanout support interfaces., Gerd Hoffmann, 2015/09/09
- [Qemu-devel] [PATCH 9/9] gtk/opengl: add opengl context and scanout support (GtkGLArea), Gerd Hoffmann, 2015/09/09
- [Qemu-devel] [PATCH 8/9] gtk/opengl: add opengl context and scanout support (egl), Gerd Hoffmann, 2015/09/09
- [Qemu-devel] [PATCH 5/9] virtio-gpu: add 3d mode and virgl rendering support., Gerd Hoffmann, 2015/09/09
- Re: [Qemu-devel] [PATCH 0/9] add virgl rendering support., Marc-André Lureau, 2015/09/11