qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] hw/pci: add pci capability to pci-pci bridge


From: Marcel Apfelbaum
Subject: Re: [Qemu-devel] [PATCH] hw/pci: add pci capability to pci-pci bridge
Date: Fri, 17 Aug 2018 18:39:01 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1



On 08/14/2018 12:32 PM, Liu, Jing2 wrote:


On 8/12/2018 3:11 PM, Marcel Apfelbaum wrote:
[...]

I don't know what to suggest for the new capability's
teardown, in pci_bridge_dev_exitfn()  -- should we just ignore it (as
suggested by this patch)?

No, we should remove it properly.

I think it is not considered a "big" issue since adding/removing PCI capabilities is not an operation that deals with resources, we only edit an array (the config space)
that will not be used anyway if the device init sequence failed.

That does not mean the code should not be clean.
I just search some PCI_CAP_ID_* to see what they do for exitfn/uninit.
It's weird that some more capabilities aren't being deleted, like pci_ich9_uninit().


I agree it does not look good. As I pointed out  above,
if the capability does not require extra resources, the array representing
the configuration space for the device gets "deleted" anyway when we
dispose of the device.

Thanks,
Marcel

Thanks,
Jing


Thanks,
Marcel


Thanks
Laszlo






reply via email to

[Prev in Thread] Current Thread [Next in Thread]