Thread (37 messages) 37 messages, 3 authors, 2021-08-24

Re: [PATCH v5 06/11] powerpc/pseries/iommu: Add ddw_property_create() and refactor enable_ddw()

From: Leonardo Brás <hidden>
Date: 2021-08-17 05:59:17
Also in: lkml

Hello Fred, thanks for this feedback!

On Tue, 2021-07-20 at 19:49 +0200, Frederic Barrat wrote:
quoted
        kfree(window);
  
-out_clear_window:
-       remove_ddw(pdn, true);
+out_del_prop:
+       of_remove_property(pdn, win64);
  
  out_free_prop:
        kfree(win64->name);
        kfree(win64->value);
        kfree(win64);
  
+out_remove_win:
+       remove_ddw(pdn, true);

I believe there's a small problem here. We jump directly to 
out_remove_win if allocating the property failed. Yet, the first
thing 
remove_ddw() does is look for the property. So it will never find it
and 
the window is never removed by the hypervisor.

   Fred
That makes sense, thanks for catching this one!

What I intended here was just removing the DDW, so I think it should be
ok replacing remove_ddw() by a new helper that only does the rtas-call.

I will send a v6 with this change soon.
quoted
+
  out_failed:
        if (default_win_removed)
                reset_dma_window(dev, pdn);
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help