On Wed, Feb 12, 2020 at 5:54 PM Gurchetan Singh
wrote:
>
> On Wed, Feb 12, 2020 at 10:50 AM Chia-I Wu wrote:
> >
> > On Tue, Feb 11, 2020 at 3:56 PM Gurchetan Singh
> > wrote:
> > >
> > > We only want create a new virglrenderer context after the first
Series is
Reviewed-by: Chia-I Wu
After the series, virtio_gpu_cmd_* may or may not call
virtio_gpu_notify. It is error-prone and should be fixed, such that
virtio_gpu_cmd_* never notifies, or such that different naming
conventions are used for functions that notify and for those don't.
On Thu, Feb 13, 2020 at 5:22 AM Gerd Hoffmann wrote:
>
> Move virtio_gpu_notify() to higher-level functions for
> virtio_gpu_cmd_create_resource(), virtio_gpu_cmd_resource_create_3d()
> and virtio_gpu_cmd_resource_attach_backing().
>
> virtio_gpu_object_create() will batch commands and notify only
When the flag is set, it means the the userspace wants to do DMA
with the memory and the guest will use an appropriate memory type to
access the memory. The kernel should be prepared to honor the
guest's memory type.
Signed-off-by: Chia-I Wu
Cc: Gurchetan Singh
Cc: Gerd Hof
Hi,
Host GPU drivers like to give userspace WC mapping. When the userspace makes
the mapping available to a guest, it also tells the guest to create a WC
mapping. However, even when the guest kernel picks the correct memory type,
it gets ignored because of VMX_EPT_IPAT_BIT on Intel.
This series
When a memslot has KVM_MEM_DMA set, we want VMX_EPT_IPAT_BIT cleared
for the memslot. Before that is possible, simply call
kvm_arch_register_noncoherent_dma for the memslot.
SVM does not have the ignore-pat bit. Guest PAT is always honored.
Signed-off-by: Chia-I Wu
Cc: Gurchetan Singh
Cc
Better reflect the structure of the code and metion why we could not
always honor the guest.
Signed-off-by: Chia-I Wu
Cc: Gurchetan Singh
Cc: Gerd Hoffmann
---
arch/x86/kvm/vmx/vmx.c | 27 +--
1 file changed, 17 insertions(+), 10 deletions(-)
diff --git a/arch/x86/kvm
On Thu, Feb 13, 2020 at 1:41 PM Paolo Bonzini wrote:
>
> On 13/02/20 22:30, Chia-I Wu wrote:
> > Hi,
> >
> > Host GPU drivers like to give userspace WC mapping. When the userspace
> > makes
> > the mapping available to a guest, it also tells the guest to cre
On Thu, Feb 13, 2020 at 3:18 PM Gurchetan Singh
wrote:
>
> Use an atomic variable to track whether a context has been
> initiated.
>
> v2: Fix possible race (@olv)
>
> Signed-off-by: Gurchetan Singh
> ---
> drivers/gpu/drm/virtio/virtgpu_drv.h | 1 +
> drivers/gpu/drm/virtio/virtgpu_ioctl.c |
Series is
Reviewed-by: Chia-I Wu
Thanks!
On Fri, Feb 14, 2020 at 4:55 AM Gerd Hoffmann wrote:
>
> v4:
> - add patches #2 + #6.
> v3:
> - split into multiple patches.
>
> Gerd Hoffmann (6):
> drm/virtio: rework notification for better batching
> drm/virtio: no
On Fri, Feb 14, 2020 at 2:26 AM Paolo Bonzini wrote:
>
> On 13/02/20 23:18, Chia-I Wu wrote:
> >
> > The bug you mentioned was probably this one
> >
> > https://bugzilla.kernel.org/show_bug.cgi?id=104091
>
> Yes, indeed.
>
> > From what I can tell, t
On Fri, Feb 14, 2020 at 11:52 AM Sean Christopherson
wrote:
>
> On Fri, Feb 14, 2020 at 11:26:06AM +0100, Paolo Bonzini wrote:
> > On 13/02/20 23:18, Chia-I Wu wrote:
> > >
> > > The bug you mentioned was probably this one
> > >
> > > ht
On Fri, Feb 14, 2020 at 6:29 PM Gurchetan Singh
wrote:
>
> On Fri, Feb 14, 2020 at 11:27 AM Chia-I Wu wrote:
> >
> > On Thu, Feb 13, 2020 at 3:18 PM Gurchetan Singh
> > wrote:
> > >
> > > Use an atomic variable to track whether a context has been
>
Patch 1-4 are
Reviewed-by: Chia-I Wu
I think we can drop patch 5 for now.
On Wed, Feb 19, 2020 at 9:56 AM Gurchetan Singh
wrote:
>
> Use an atomic variable to track whether a context has been
> initiated.
>
> v5: Fix possible race and sleep via mutex (@olv)
>
> Signed-of
On Wed, Feb 19, 2020 at 2:00 AM Tian, Kevin wrote:
>
> > From: Chia-I Wu
> > Sent: Saturday, February 15, 2020 5:15 AM
> >
> > On Fri, Feb 14, 2020 at 2:26 AM Paolo Bonzini wrote:
> > >
> > > On 13/02/20 23:18, Chia-I Wu wrote:
> > >
On Wed, Feb 19, 2020 at 1:52 AM Tian, Kevin wrote:
>
> > From: Paolo Bonzini
> > Sent: Wednesday, February 19, 2020 12:29 AM
> >
> > On 14/02/20 23:03, Sean Christopherson wrote:
> > >> On Fri, Feb 14, 2020 at 1:47 PM Chia-I Wu wrote:
> > >>>
On Thu, Feb 20, 2020 at 5:30 AM Emil Velikov wrote:
>
> Hi John,
>
> On Thu, 20 Feb 2020 at 08:45, John Bates wrote:
> >
> > The previous code was not thread safe and caused
> > undefined behavior from spurious duplicate resource IDs.
> > In this patch, an atomic_t is used instead. We no longer
>
most part just removing the ttm code.
>
> v4: fix drm_gem_object_funcs name.
>
> Signed-off-by: Gerd Hoffmann
> Acked-by: Daniel Vetter
> Reviewed-by: Chia-I Wu
> Link:
> http://patchwork.freedesktop.org/patch/msgid/20190829103301.3539-15-kra...@redhat.com
> *
On Wed, Feb 19, 2020 at 6:38 PM Tian, Kevin wrote:
>
> > From: Tian, Kevin
> > Sent: Thursday, February 20, 2020 10:05 AM
> >
> > > From: Chia-I Wu
> > > Sent: Thursday, February 20, 2020 3:37 AM
> > >
> > > On Wed, Feb 19, 2020 at
On Wed, Feb 19, 2020 at 6:13 PM Tian, Kevin wrote:
> > > Curious... How is such slot exposed to the guest? A reserved memory
> > > region? Is it static or might be dynamically added?
> > The plan is for virtio-gpu device to reserve a huge memory region in
> > the guest. Memslots may be added dyna
On Thu, Feb 20, 2020 at 4:23 PM Tian, Kevin wrote:
> > From: Chia-I Wu
> > Sent: Friday, February 21, 2020 6:24 AM
> >
> > On Wed, Feb 19, 2020 at 6:38 PM Tian, Kevin
> wrote:
> > >
> > > > From: Tian, Kevin
> > > > Sent: Thursday,
(resend because gmail did not format to plain text...)
On Thu, Feb 20, 2020 at 8:45 PM Chia-I Wu wrote:
>
>
>
> On Thu, Feb 20, 2020 at 4:23 PM Tian, Kevin wrote:
>>
>> > From: Chia-I Wu
>> > Sent: Friday, February 21, 2020 6:24 AM
>> >
>> &
On Fri, Feb 21, 2020 at 7:59 AM Sean Christopherson
wrote:
>
> On Thu, Feb 20, 2020 at 09:39:05PM -0800, Tian, Kevin wrote:
> > > From: Chia-I Wu
> > > Sent: Friday, February 21, 2020 12:51 PM
> > > If you think it is the best for KVM to inspect hva to determin
; Fixes: 16065fcdd19d ("drm/virtio: do NOT reuse resource ids")
> Signed-off-by: John Bates
Reviewed-by: Chia-I Wu
> ---
> drivers/gpu/drm/virtio/virtgpu_object.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/vi
On Fri, Feb 21, 2020 at 2:06 AM Guillaume Gardet
wrote:
>
> Hi,
>
> > -Original Message-
> > From: Chia-I Wu
> > Sent: 20 February 2020 19:41
> > To: Guillaume Gardet
> > Cc: dri-devel@lists.freedesktop.org; Gerd Hoffmann ;
> > Daniel Vette
rkaround or something?
>
> Reviewed-by: Chia-I Wu
> Reviewed-by: Emil Velikov
> Signed-off-by: Gurchetan Singh
> ---
> drivers/gpu/drm/virtio/virtgpu_drv.h | 2 --
> drivers/gpu/drm/virtio/virtgpu_ioctl.c | 32 +++---
> drivers/gpu/drm/virtio/vir
On Mon, Feb 24, 2020 at 5:24 AM Emil Velikov wrote:
>
> On Mon, 24 Feb 2020 at 11:06, Gerd Hoffmann wrote:
> >
> > On Fri, Feb 21, 2020 at 04:54:02PM -0800, Gurchetan Singh wrote:
> > > On Fri, Feb 21, 2020 at 3:06 PM Chia-I Wu wrote:
> > > >
> >
On Wed, Feb 26, 2020 at 10:25 AM Thomas Hellström (VMware)
wrote:
>
> Hi, Gerd,
>
> While looking at this patchset I came across some stuff that seems
> strange but that was merged in a previous patchset.
>
> (please refer to
> https://lists.freedesktop.org/archives/dri-devel/2018-September/190001
On Wed, Oct 2, 2019 at 5:18 PM Gurchetan Singh
wrote:
>
> On Wed, Oct 2, 2019 at 1:49 AM Gerd Hoffmann wrote:
> >
> > On Tue, Oct 01, 2019 at 06:49:35PM -0700, Gurchetan Singh wrote:
> > > This doesn't really break userspace, since it always passes down
> > > 0 for stride/layer_stride currently.
On Wed, Mar 11, 2020 at 3:36 AM Gerd Hoffmann wrote:
>
> Hi,
>
> > I should've been more clear -- this is an internal cleanup/preparation and
> > the per-context changes are invisible to host userspace.
>
> Ok, it wasn't clear that you don't flip the switch yet. In general the
> commit messages
On Wed, Mar 11, 2020 at 4:36 PM Gurchetan Singh
wrote:
>
>
>
> On Wed, Mar 11, 2020 at 3:36 AM Gerd Hoffmann wrote:
>>
>> Hi,
>>
>> > I should've been more clear -- this is an internal cleanup/preparation and
>> > the per-context changes are invisible to host userspace.
>>
>> Ok, it wasn't clea
On Thu, Mar 12, 2020 at 4:08 PM Gurchetan Singh
wrote:
>
>
>
> On Thu, Mar 12, 2020 at 2:29 AM Gerd Hoffmann wrote:
>>
>> On Wed, Mar 11, 2020 at 04:36:16PM -0700, Gurchetan Singh wrote:
>> > On Wed, Mar 11, 2020 at 3:36 AM Gerd Hoffmann wrote:
>> >
>> > > Hi,
>> > >
>> > > > I should've been
On Mon, Mar 16, 2020 at 3:44 PM Gerd Hoffmann wrote:
>
> Hi,
>
> > >> At virtio level it is pretty simple: The host completes the SUBMIT_3D
> > >> virtio command when it finished rendering, period.
> > >>
> > >>
> > >> On the guest side we don't need the fence_id. The completion callback
> > >
;
> Thanks a lot! With this patch applied, my VM doesn't throw lockdep
> warnings anymore. If you want, you can add:
>
> Tested-by: Jann Horn
>
> > Reported-by: Jann Horn
> > Signed-off-by: Gerd Hoffmann
Reviewed-by: Chia-I Wu
> > ---
> > driver
This series consists of fixes and cleanups for
virtio_gpu_queue_fenced_ctrl_buffer, except for the last patch. The fixes are
for corner cases that were overlooked. The cleanups make the last patch
easier, but they should be good in themselves as well.
The last patch changes the disable_notify me
outcnt may be greater than 1 since commit e1218b8c0cc1 (drm/virtio:
Use vmalloc for command buffer allocations.).
Signed-off-by: Chia-I Wu
Cc: David Riley
---
drivers/gpu/drm/virtio/virtgpu_vq.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/virtio
We don't propagate erros to the callers. We have to unlock object
arrays on errors.
Signed-off-by: Chia-I Wu
---
drivers/gpu/drm/virtio/virtgpu_vq.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/virtio/virtgpu_vq.c
b/drivers/gpu/drm/v
incorrect and unnecessary error
path.
This also adds a WARN_ON(ret) until we properly handle errors.
Signed-off-by: Chia-I Wu
Cc: David Riley
---
drivers/gpu/drm/virtio/virtgpu_vq.c | 19 ++-
1 file changed, 6 insertions(+), 13 deletions(-)
diff --git a/drivers/gpu/drm/virtio
We can get it from vbuf.
Signed-off-by: Chia-I Wu
---
drivers/gpu/drm/virtio/virtgpu_vq.c | 24
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/drivers/gpu/drm/virtio/virtgpu_vq.c
b/drivers/gpu/drm/virtio/virtgpu_vq.c
index 312fd8a039a1e..5815c7d50dc20
When vqs_ready is false, vq should be considered invalid and we
should not check vq->num_free. After this change, a fenced command
queued before the vqs are ready will have fence id 0 and will be
considered done.
Signed-off-by: Chia-I Wu
---
drivers/gpu/drm/virtio/virtgpu_vq.c |
sgs setup does not need to be in the critical section.
Signed-off-by: Chia-I Wu
---
drivers/gpu/drm/virtio/virtgpu_vq.c | 66 +++--
1 file changed, 35 insertions(+), 31 deletions(-)
diff --git a/drivers/gpu/drm/virtio/virtgpu_vq.c
b/drivers/gpu/drm/virtio/virtgpu_vq.c
Make sure elemcnt does not exceed the maximum element count in
virtio_gpu_queue_ctrl_sgs. We should improve our error handling or
impose a size limit on execbuffer, which are TODOs.
Signed-off-by: Chia-I Wu
Cc: David Riley
---
drivers/gpu/drm/virtio/virtgpu_drv.h | 1 +
drivers/gpu/drm
Signed-off-by: Chia-I Wu
---
drivers/gpu/drm/virtio/virtgpu_vq.c | 70 ++---
1 file changed, 35 insertions(+), 35 deletions(-)
diff --git a/drivers/gpu/drm/virtio/virtgpu_vq.c
b/drivers/gpu/drm/virtio/virtgpu_vq.c
index 6ccb2a54dfb3c..299470aac281a 100644
--- a/drivers
It becomes clear that virtio_gpu_queue_fenced_ctrl_buffer should be
responsible for setting up sgs and virtio_gpu_queue_ctrl_sgs should
be responsible for queuing sgs.
Signed-off-by: Chia-I Wu
---
drivers/gpu/drm/virtio/virtgpu_vq.c | 22 ++
1 file changed, 10 insertions
Call virtqueue_kick_prepare once in virtio_gpu_enable_notify, not
whenever a command is added. This should be more efficient since
the intention is to batch commands.
Signed-off-by: Chia-I Wu
---
drivers/gpu/drm/virtio/virtgpu_drv.h | 1 -
drivers/gpu/drm/virtio/virtgpu_vq.c | 28
It is a helper to return the virtio_gpu_ctrl_hdr in a vbuf.
Signed-off-by: Chia-I Wu
---
drivers/gpu/drm/virtio/virtgpu_vq.c | 20 +++-
1 file changed, 15 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/virtio/virtgpu_vq.c
b/drivers/gpu/drm/virtio/virtgpu_vq.c
index
On Wed, Feb 5, 2020 at 3:00 AM Gerd Hoffmann wrote:
>
> Add new virtio_gpu_cleanup_object() helper function for object cleanup.
> Wire up callback function for resource unref, do cleanup from callback
> when we know the host stopped using the resource.
>
> Signed-off-by: Gerd Hoffmann
> ---
> dr
On Wed, Feb 5, 2020 at 3:00 AM Gerd Hoffmann wrote:
>
> Introduce new virtio_gpu_object_shmem_init() helper function which will
> create the virtio_gpu_mem_entry array, containing the backing storage
> information for the host. For the most path this just moves code from
> virtio_gpu_object_attac
On Wed, Feb 5, 2020 at 2:26 AM Gerd Hoffmann wrote:
>
> Avoid flooding the log in case we screw up badly.
>
> Signed-off-by: Gerd Hoffmann
Reviewed-by: Chia-I Wu
> ---
> drivers/gpu/drm/virtio/virtgpu_vq.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
On Thu, Feb 6, 2020 at 1:49 AM Gerd Hoffmann wrote:
>
> On Wed, Feb 05, 2020 at 10:19:53AM -0800, Chia-I Wu wrote:
> > Make sure elemcnt does not exceed the maximum element count in
> > virtio_gpu_queue_ctrl_sgs. We should improve our error handling or
> > impose a
}
>
> - if (vq->num_free < elemcnt) {
> + indirect = virtio_has_feature(vgdev->vdev,
> VIRTIO_RING_F_INDIRECT_DESC);
> + vqcnt = indirect ? 1 : elemcnt;
Is the feature dynamic and require the lock held? If not, the result
can be cached and the fixup can happen before grabbin
On Wed, Feb 5, 2020 at 10:43 PM Gerd Hoffmann wrote:
>
> > > -
> > > - drm_gem_shmem_free_object(obj);
> > > + if (bo->created) {
> > > + virtio_gpu_cmd_unref_resource(vgdev, bo);
> > > + /* completion handler calls virtio_gpu_cleanup_object() */
> > nitpick
On Thu, Feb 6, 2020 at 12:55 AM Gerd Hoffmann wrote:
>
> Hi,
>
> > > virtio_gpu_cmd_resource_attach_backing(vgdev, obj->hw_res_handle,
> > > - ents, nents,
> > > + obj->ents, obj->nents,
> > >
On Thu, Sep 12, 2019 at 9:00 AM David Riley wrote:
>
> Fix warning introduced with commit e1218b8c0cc1
> ("drm/virtio: Use vmalloc for command buffer allocations.")
> from drm-misc-next.
>
> Signed-off-by: David Riley
Reviewed-by: Chia-I Wu
> ---
> drive
On Thu, Sep 12, 2019 at 4:46 AM Gerd Hoffmann wrote:
>
> Signed-off-by: Gerd Hoffmann
Reviewed-by: Chia-I Wu
> ---
> drivers/gpu/drm/virtio/virtgpu_drv.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.c
> b/drivers/gpu/
On Mon, Dec 2, 2019 at 5:36 PM Gurchetan Singh
wrote:
>
> With the misc device, we should end up using the result of
> get_arch_dma_ops(..) or dma-direct ops.
>
> This can allow us to have WC mappings in the guest after
> synchronization.
>
> Signed-off-by: Gurchetan Singh
> ---
> drivers/dma-bu
On Thu, Aug 22, 2019 at 3:26 AM Gerd Hoffmann wrote:
>
> Also update the comment with a reference to the virglrenderer fix.
>
> Signed-off-by: Gerd Hoffmann
Reviewed-by: Chia-I Wu
> ---
> drivers/gpu/drm/virtio/virtgpu_object.c | 44 ++---
> 1 file c
On Thu, Aug 22, 2019 at 2:47 AM Gerd Hoffmann wrote:
>
> Use drm_atomic_helper_check_plane_state()
> to sanity check the plane state.
>
> Signed-off-by: Gerd Hoffmann
> ---
> drivers/gpu/drm/virtio/virtgpu_plane.c | 17 -
> 1 file changed, 16 insertions(+), 1 deletion(-)
>
> diff
On Mon, Aug 26, 2019 at 10:21 PM Gerd Hoffmann wrote:
>
> On Mon, Aug 26, 2019 at 03:34:56PM -0700, Chia-I Wu wrote:
> > On Thu, Aug 22, 2019 at 2:47 AM Gerd Hoffmann wrote:
> > >
> > > Use drm_atomic_helper_check_plane_state()
> > > to sanity check the
k. This avoids triggering a vmexit while holding the lock and
> thereby fixes a rather bad spinlock contention.
>
> Suggested-by: Chia-I Wu
> Signed-off-by: Gerd Hoffmann
Series is
Reviewed-by: Chia-I Wu
> ---
> drivers/gpu/drm/virtio/virtgpu_vq.c | 25 +++--
On Fri, Aug 23, 2019 at 2:55 AM Gerd Hoffmann wrote:
>
> Use drm_gem_reservation_object_wait() in virtio_gpu_wait_ioctl().
> This also makes the ioctl run lockless.
>
> v5: handle lookup failure.
> v2: use reservation_object_test_signaled_rcu for VIRTGPU_WAIT_NOWAIT.
>
> Signed-off-by: Gerd Hoffma
per.
> v5: some small optimizations (Chia-I Wu).
> v4: make them virtio-private instead of generic helpers.
>
> Signed-off-by: Gerd Hoffmann
> ---
> drivers/gpu/drm/virtio/virtgpu_drv.h | 17 +
> drivers/gpu/drm/virtio/virtgpu_gem.c | 93
> 2 file
On Fri, Aug 23, 2019 at 2:55 AM Gerd Hoffmann wrote:
>
> ttm increasingly gets into the way while hacking on virtio-gpu memory
> management. It also overkill for what virtio-gpu needs. Lets get rid
> of it.
>
> v8:
> - rebase to latest drm-misc-next, adapt to changes.
Other than two (minor) com
The series is
Reviewed-by: Chia-I Wu
However I ran into a deadlock with one GPU-heavy app. When I exits
Unigine Valley benchmark with ctrl-c, the entire driver locks up
probably 8 out of 10 times on my machine. When that happens,
virtio_gpu_dequeue_ctrl_func does not return and is blocked
On Thu, Aug 29, 2019 at 2:24 PM David Riley wrote:
>
> Userspace requested command buffer allocations could be too large
> to make as a contiguous allocation. Use vmalloc if necessary to
> satisfy those allocations.
>
> Signed-off-by: David Riley
> ---
> drivers/gpu/drm/virtio/virtgpu_ioctl.c |
On Fri, Aug 30, 2019 at 4:16 AM Gerd Hoffmann wrote:
>
> Hi,
>
> > > > - kfree(vbuf->data_buf);
> > > > + kvfree(vbuf->data_buf);
> > >
> > > if (is_vmalloc_addr(vbuf->data_buf)) ...
> > >
> > > needed here I gues?
> > >
> >
> > kvfree() handles vmalloc/kmalloc/kvmalloc internally by doi
worker is also the one which will free up slots in the command
> queue.
>
> Reported-by: Chia-I Wu
> Signed-off-by: Gerd Hoffmann
Tested-by: Chia-I Wu
Reviewed-by: Chia-I Wu
> ---
> drivers/gpu/drm/virtio/virtgpu_drv.h | 8
> drive
On Wed, Sep 4, 2019 at 12:48 AM Gerd Hoffmann wrote:
>
> Only call virtio_gpu_array_add_fence if we actually have a fence.
>
> Fixes: da758d51968a ("drm/virtio: rework virtio_gpu_execbuffer_ioctl fencing")
> Signed-off-by: Gerd Hoffmann
> ---
> drivers/gpu/drm/virtio/virtgpu_vq.c | 9 +
>
On Wed, Sep 4, 2019 at 10:23 PM Gerd Hoffmann wrote:
>
> On Wed, Sep 04, 2019 at 04:10:30PM -0700, Chia-I Wu wrote:
> > On Wed, Sep 4, 2019 at 12:48 AM Gerd Hoffmann wrote:
> > >
> > > Only call virtio_gpu_array_add_fence if we actually have a fence.
> > >
On Tue, May 25, 2021 at 2:18 PM Jason Ekstrand wrote:
> Modern userspace APIs like Vulkan are built on an explicit
> synchronization model. This doesn't always play nicely with the
> implicit synchronization used in the kernel and assumed by X11 and
> Wayland. The client -> compositor half of th
Set *q to NULL on errors, otherwise pqm_create_queue would free it
again.
Signed-off-by: Chia-I Wu
---
drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c
b/drivers
Series is
Reviewed-by: Chia-I Wu
On Tue, Jan 10, 2023 at 3:14 PM Rob Clark wrote:
>
> From: Rob Clark
>
> Rob Clark (3):
> drm/msm/gpu: Add devfreq tuning debugfs
> drm/msm/gpu: Bypass PM QoS constraint for idle clamp
> drm/msm/gpu: Add default devfreq thresholds
On Thu, Oct 13, 2022 at 3:55 PM Rob Clark wrote:
>
> From: Rob Clark
>
> First patch fixes a recently introduced memory corruption, the remaining
> two are cleanups.
Series is
Reviewed-by: Chia-I Wu
> Rob Clark (3):
> drm/msm/a6xx: Fix kvzalloc vs state_kcalloc usage
&
adreno/a6xx_gpu.c | 14 +++---
> > 1 file changed, 7 insertions(+), 7 deletions(-)
>
> Reviewed-by: Douglas Anderson
Reviewed-by: Chia-I Wu
u;
> int id;
> @@ -64,6 +69,25 @@ struct msm_ringbuffer {
> uint64_t memptrs_iova;
> struct msm_fence_context *fctx;
>
> + /**
> +* hangcheck_progress_retries:
> +*
> +* The number of extra hangcheck duration cycles that we have given
> +
r that reason, dropping
> the handle's reference must be done *after* we are done dereferencing
> the object.
>
> Signed-off-by: Rob Clark
Reviewed-by: Chia-I Wu
On Fri, Dec 16, 2022 at 3:34 PM Rob Clark wrote:
>
> From: Rob Clark
>
> Relying on an unreturned handle to hold a reference to an object we
> dereference is not safe. Userspace can guess the handle and race us
> by closing the handle from another thread. The _create_with_handle()
> that return
On Fri, Dec 16, 2022 at 4:20 PM Rob Clark wrote:
>
> On Fri, Dec 16, 2022 at 3:59 PM Chia-I Wu wrote:
> >
> > On Fri, Dec 16, 2022 at 3:34 PM Rob Clark wrote:
> > >
> > > From: Rob Clark
> > >
> > > Relying on an unreturned handle to hol
Signed-off-by: Chia-I Wu
Cc: sta...@vger.kernel.org
---
drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c
b/drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c
index e9b45089a28a6..863b2a34b2d64
---
> > From: amd-gfx On Behalf Of Chia-
> > I Wu
> > Sent: Wednesday, April 26, 2023 8:48 AM
> > To: dri-devel@lists.freedesktop.org
> > Cc: Pan, Xinhui ; linux-ker...@vger.kernel.org;
> > sta...@vger.kernel.org; amd-...@lists.freedesktop.org; Daniel
mgr->ctx_handles should be protected by mgr->lock.
v2: improve commit message
Signed-off-by: Chia-I Wu
Cc: sta...@vger.kernel.org
---
drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_sche
On Tue, Apr 25, 2023 at 9:58 PM Greg KH wrote:
>
> On Tue, Apr 25, 2023 at 05:48:27PM -0700, Chia-I Wu wrote:
> > Signed-off-by: Chia-I Wu
> > Cc: sta...@vger.kernel.org
>
> I know I can not take patches without any changelog text at all, maybe
> the DRM developers a
mgr->ctx_handles should be protected by mgr->lock.
v2: improve commit message
v3: add a Fixes tag
Signed-off-by: Chia-I Wu
Reviewed-by: Christian König
Fixes: 52c6a62c64fac ("drm/amdgpu: add interface for editing a foreign
process's priority v3")
---
drivers/gpu/drm/amd/
On Wed, Apr 26, 2023 at 4:05 AM Christian König
wrote:
>
> Am 26.04.23 um 08:17 schrieb Chia-I Wu:
> > mgr->ctx_handles should be protected by mgr->lock.
> >
> > v2: improve commit message
> >
> > Signed-off-by: Chia-I Wu
> > Cc: sta...@
kgd_mem should be accessed with p->mutex locked, or it could have been
freed by kfd_ioctl_free_memory_of_gpu.
Signed-off-by: Chia-I Wu
---
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 16 ++--
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/amd/amd
Extend the address and size validations to AMDGPU_VA_OP_UNMAP and
AMDGPU_VA_OP_CLEAR by moving the validations to amdgpu_gem_va_ioctl.
Internal users of amdgpu_vm_bo_map are no longer validated but they
should be fine.
Userspace (radeonsi and radv) seems fine as well.
---
drivers/gpu/drm/amd/amd
The existing validations are incorrect and insufficient. This is
motivated by OOB access in amdgpu_vm_update_range when
offset_in_bo+map_size overflows.
Fixes: 9f7eb5367d00 ("drm/amdgpu: actually use the VM map parameters")
---
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 7 +--
drivers/gpu/drm
On Tue, May 9, 2023 at 11:33 AM Chia-I Wu wrote:
>
> Extend the address and size validations to AMDGPU_VA_OP_UNMAP and
> AMDGPU_VA_OP_CLEAR by moving the validations to amdgpu_gem_va_ioctl.
>
> Internal users of amdgpu_vm_bo_map are no longer validated but they
> should be f
On Thu, May 18, 2023 at 1:12 PM Alex Deucher wrote:
>
> On Wed, May 17, 2023 at 5:27 PM Chia-I Wu wrote:
> >
> > On Tue, May 9, 2023 at 11:33 AM Chia-I Wu wrote:
> > >
> > > Extend the address and size validations to AMDGPU_VA_OP_UNMAP and
> > > AM
On Mon, May 22, 2023 at 12:12 PM Christian König
wrote:
>
> Am 21.05.23 um 20:49 schrieb Chia-I Wu:
> > On Thu, May 18, 2023 at 1:12 PM Alex Deucher wrote:
> >> On Wed, May 17, 2023 at 5:27 PM Chia-I Wu wrote:
> >>> On Tue, May 9, 2023 at 11:33 AM Chia-I Wu wro
offset_in_bo+map_size overflows.
Userspace (radeonsi and radv) seems fine as well.
v2: keep the validations in amdgpu_vm_bo_map
Fixes: 9f7eb5367d00 ("drm/amdgpu: actually use the VM map parameters")
Signed-off-by: Chia-I Wu
---
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 15 +++
d
According to Alex, most APUs from that time seem to have the same issue
(vbios says 48Mhz, actual is 100Mhz). I only have a CHIP_STONEY so I
limit the fixup to CHIP_STONEY
---
drivers/gpu/drm/amd/amdgpu/vi.c | 11 +--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/drivers/g
y use the VM map parameters")
Signed-off-by: Chia-I Wu
---
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 16
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index 22f9a65ca0fc7..76d
On Fri, Jun 2, 2023 at 11:50 AM Alex Deucher wrote:
>
> Nevermind, missing your Signed-off-by. Please add and I'll apply.
Sorry that I keep forgetting... This patch is
Signed-off-by: Chia-I Wu
I can send v2 if necessary.
>
> Alex
>
Hi list,
virtio-gpu is moving in the direction where BO pages are pinned for
the lifetime for simplicity. I am wondering if that is considered a
security issue in general, especially after running into the
description of the new DMABUF_MOVE_NOTIFY config option.
Most drivers do not have a shrink
t; > >>
> > >> Currently, the user seems to amdgpu for P2P dma-buf and it seems to
> > >> plumb ttm (*move_notify) callback to dma-buf. We're not sure if it's a
> > >> security issue occurring across DRM drivers, or one more specific to the
&g
On Wed, Mar 25, 2020 at 12:44 AM Gurchetan Singh
wrote:
>
> - For dumb buffers, virtio_gpu_gem_create can notify.
> - For 3D buffers, virtio_gpu_gem_object_open can notify.
Hmm, I feel this is a bit complex. virtio_gpu_gem_object_open may not
notify, and the caller needs to know about it.
Can we
On Wed, Mar 25, 2020 at 8:41 AM Gurchetan Singh
wrote:
>
> For 3D buffers, virtio_gpu_gem_object_open notifies.
> We can have the same behavior for dumb buffer. We just
> need to make sure the first open notifies the host for
> dumb buffers.
virtio_gpu_notify is cheap and does not kick unless the
On Thu, Mar 26, 2020 at 7:10 AM Gurchetan Singh
wrote:
>
> For 3D buffers, virtio_gpu_gem_object_open notifies.
> We can have the same behavior for dumb buffer.
>
> v2: virtio_gpu_gem_object_open always notifies
> v3: avoid boolean variable
Series is
Reviewed-by: Chia-I Wu
On Wed, Sep 2, 2020 at 2:09 PM Gurchetan Singh
wrote:
>
> From: Gerd Hoffmann
>
> Implement resource create blob as specified.
>
> Signed-off-by: Gerd Hoffmann
> Co-developed-by: Gurchetan Singh
> Signed-off-by: Gurchetan Singh
> Acked-by: Tomeu Vizoso
> ---
> drivers/gpu/drm/virtio/virtgpu_
101 - 200 of 256 matches
Mail list logo