qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2] hw/misc/edu: add msi_uninit() for pci_edu_uninit()
@ 2019-01-14 13:10 Fei Li
  2019-01-14 13:28 ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 4+ messages in thread
From: Fei Li @ 2019-01-14 13:10 UTC (permalink / raw)
  To: qemu-devel; +Cc: Jiri Slaby, shirley17fei

From: Fei Li <shirley17fei@gmail.com>

Let's supplement the msi_uninit() when failing to realize
the pci edu device.

Reported-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Fei Li <shirley17fei@gmail.com>
Reviewed-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
---
 hw/misc/edu.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/misc/edu.c b/hw/misc/edu.c
index cdcf550dd7..ceaf688bfb 100644
--- a/hw/misc/edu.c
+++ b/hw/misc/edu.c
@@ -377,6 +377,7 @@ static void pci_edu_uninit(PCIDevice *pdev)
     qemu_mutex_destroy(&edu->thr_mutex);
 
     timer_del(&edu->dma_timer);
+    msi_uninit(pdev);
 }
 
 static void edu_obj_uint64(Object *obj, Visitor *v, const char *name,
-- 
2.17.2 (Apple Git-113)

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH v2] hw/misc/edu: add msi_uninit() for pci_edu_uninit()
  2019-01-14 13:10 [Qemu-devel] [PATCH v2] hw/misc/edu: add msi_uninit() for pci_edu_uninit() Fei Li
@ 2019-01-14 13:28 ` Philippe Mathieu-Daudé
  2019-01-14 15:51   ` Michael S. Tsirkin
  0 siblings, 1 reply; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-01-14 13:28 UTC (permalink / raw)
  To: Fei Li, QEMU Trivial; +Cc: qemu-devel, Jiri Slaby, shirley17fei

Cc'ing qemu-trivial

On 1/14/19 2:10 PM, Fei Li wrote:
> From: Fei Li <shirley17fei@gmail.com>
> 
> Let's supplement the msi_uninit() when failing to realize
> the pci edu device.
> 
> Reported-by: Markus Armbruster <armbru@redhat.com>
> Signed-off-by: Fei Li <shirley17fei@gmail.com>
> Reviewed-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> Reviewed-by: Peter Xu <peterx@redhat.com>
> ---
>  hw/misc/edu.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/hw/misc/edu.c b/hw/misc/edu.c
> index cdcf550dd7..ceaf688bfb 100644
> --- a/hw/misc/edu.c
> +++ b/hw/misc/edu.c
> @@ -377,6 +377,7 @@ static void pci_edu_uninit(PCIDevice *pdev)
>      qemu_mutex_destroy(&edu->thr_mutex);
>  
>      timer_del(&edu->dma_timer);
> +    msi_uninit(pdev);
>  }
>  
>  static void edu_obj_uint64(Object *obj, Visitor *v, const char *name,
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH v2] hw/misc/edu: add msi_uninit() for pci_edu_uninit()
  2019-01-14 13:28 ` Philippe Mathieu-Daudé
@ 2019-01-14 15:51   ` Michael S. Tsirkin
  2019-01-14 16:29     ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 4+ messages in thread
From: Michael S. Tsirkin @ 2019-01-14 15:51 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Fei Li, QEMU Trivial, Jiri Slaby, qemu-devel, shirley17fei

On Mon, Jan 14, 2019 at 02:28:39PM +0100, Philippe Mathieu-Daudé wrote:
> Cc'ing qemu-trivial
> 
> On 1/14/19 2:10 PM, Fei Li wrote:
> > From: Fei Li <shirley17fei@gmail.com>
> > 
> > Let's supplement the msi_uninit() when failing to realize
> > the pci edu device.
> > 
> > Reported-by: Markus Armbruster <armbru@redhat.com>
> > Signed-off-by: Fei Li <shirley17fei@gmail.com>
> > Reviewed-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
> > Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> > Reviewed-by: Peter Xu <peterx@redhat.com>
> > ---
> >  hw/misc/edu.c | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/hw/misc/edu.c b/hw/misc/edu.c
> > index cdcf550dd7..ceaf688bfb 100644
> > --- a/hw/misc/edu.c
> > +++ b/hw/misc/edu.c
> > @@ -377,6 +377,7 @@ static void pci_edu_uninit(PCIDevice *pdev)
> >      qemu_mutex_destroy(&edu->thr_mutex);
> >  
> >      timer_del(&edu->dma_timer);
> > +    msi_uninit(pdev);
> >  }
> >  
> >  static void edu_obj_uint64(Object *obj, Visitor *v, const char *name,
> > 

That's not trivial material IMHO. I put it in my tree for now.

-- 
MST

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH v2] hw/misc/edu: add msi_uninit() for pci_edu_uninit()
  2019-01-14 15:51   ` Michael S. Tsirkin
@ 2019-01-14 16:29     ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-01-14 16:29 UTC (permalink / raw)
  To: Michael S. Tsirkin
  Cc: Fei Li, QEMU Trivial, Jiri Slaby, qemu-devel, shirley17fei

On 1/14/19 4:51 PM, Michael S. Tsirkin wrote:
> On Mon, Jan 14, 2019 at 02:28:39PM +0100, Philippe Mathieu-Daudé wrote:
>> Cc'ing qemu-trivial
>>
>> On 1/14/19 2:10 PM, Fei Li wrote:
>>> From: Fei Li <shirley17fei@gmail.com>
>>>
>>> Let's supplement the msi_uninit() when failing to realize
>>> the pci edu device.
>>>
>>> Reported-by: Markus Armbruster <armbru@redhat.com>
>>> Signed-off-by: Fei Li <shirley17fei@gmail.com>
>>> Reviewed-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
>>> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>>> Reviewed-by: Peter Xu <peterx@redhat.com>
>>> ---
>>>  hw/misc/edu.c | 1 +
>>>  1 file changed, 1 insertion(+)
>>>
>>> diff --git a/hw/misc/edu.c b/hw/misc/edu.c
>>> index cdcf550dd7..ceaf688bfb 100644
>>> --- a/hw/misc/edu.c
>>> +++ b/hw/misc/edu.c
>>> @@ -377,6 +377,7 @@ static void pci_edu_uninit(PCIDevice *pdev)
>>>      qemu_mutex_destroy(&edu->thr_mutex);
>>>  
>>>      timer_del(&edu->dma_timer);
>>> +    msi_uninit(pdev);
>>>  }
>>>  
>>>  static void edu_obj_uint64(Object *obj, Visitor *v, const char *name,
>>>
> 
> That's not trivial material IMHO. I put it in my tree for now.

Hmm it is releasing ressources on deinit... Anyway it is better placed
in your tree, no doubt. Thanks!

Phil.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-01-14 16:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-14 13:10 [Qemu-devel] [PATCH v2] hw/misc/edu: add msi_uninit() for pci_edu_uninit() Fei Li
2019-01-14 13:28 ` Philippe Mathieu-Daudé
2019-01-14 15:51   ` Michael S. Tsirkin
2019-01-14 16:29     ` Philippe Mathieu-Daudé

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).