Skip to contentSkip to conversation

Did we lose monitor commands pci_add, pci_del?

Qemu-devel Markus Armbruster 5 participants 8 messages Feb 13, 2015 – Feb 16, 2015

lore
Share & tools
lore
#0 lore raw

Commit 79ca616 "pci: Cleanup configuration for pci-hotplug.c" (June 2013, released in v1.6.0) made linking pci-hotplug-old.o conditional on make variable CONFIG_PCI_HOTPLUG_OLD, and the actual monitor commands conditional on preprocessor macro CONFIG_PCI_HOTPLUG_OLD. Where is that macro defined?

In my local build: nowhere. The two commands are not available.

Am I doing something wrong, or have the commands been gone for five major releases already?

If the latter, I think we can safely drop them now :)

#1 lore raw
Quoted 6 lines · Markus Armbruster

Commit 79ca616 "pci: Cleanup configuration for pci-hotplug.c" (June 2013, released in v1.6.0) made linking pci-hotplug-old.o conditional on make variable CONFIG_PCI_HOTPLUG_OLD, and the actual monitor commands conditional on preprocessor macro CONFIG_PCI_HOTPLUG_OLD. Where is that macro defined?

Quoted 6 lines

In my local build: nowhere. The two commands are not available.

Am I doing something wrong, or have the commands been gone for five major releases already?

If the latter, I think we can safely drop them now :)

So AFAICT, CONFIG_PCI_HOTPLUG_OLD is still defined for x86 targets:

$ git grep PCI_HOTPLUG_OLD
default-configs/i386-softmmu.mak:CONFIG_PCI_HOTPLUG_OLD=y
default-configs/x86_64-softmmu.mak:CONFIG_PCI_HOTPLUG_OLD=y
...

I believe the reasoning was that for other targets, pci_add/del were never properly supported and we should go directly to device_add/del instead.

Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson
#2 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 6 lines · David Gibson

So AFAICT, CONFIG_PCI_HOTPLUG_OLD is still defined for x86 targets:

$ git grep PCI_HOTPLUG_OLD 
default-configs/i386-softmmu.mak:CONFIG_PCI_HOTPLUG_OLD=y 
default-configs/x86_64-softmmu.mak:CONFIG_PCI_HOTPLUG_OLD=y ...

But these symbols do not become preprocessor macros...

Paolo

#3 lore raw
Quoted 6 lines · Paolo Bonzini

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 13/02/2015 23:54, David Gibson wrote:

Quoted 8 lines
Quoted 6 lines

So AFAICT, CONFIG_PCI_HOTPLUG_OLD is still defined for x86 targets:

$ git grep PCI_HOTPLUG_OLD 
default-configs/i386-softmmu.mak:CONFIG_PCI_HOTPLUG_OLD=y 
default-configs/x86_64-softmmu.mak:CONFIG_PCI_HOTPLUG_OLD=y ...

But these symbols do not become preprocessor macros...

Godammit. Have I mentioned lately how much it pisses me off that we have various config symbols and it's never clear which ones make it into C and which are only in make.

Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson
#4 lore raw
Quoted 3 lines · David Gibson

Godammit. Have I mentioned lately how much it pisses me off that we have various config symbols and it's never clear which ones make it into C and which are only in make.

That does seem confusing. Is there a reason we can't have a config-devices.h which gets created from config-devices.mak?

-- PMM

#5 lore raw
Quoted 7 lines · Peter Maydell
Quoted 3 lines · David Gibson

Godammit. Have I mentioned lately how much it pisses me off that we have various config symbols and it's never clear which ones make it into C and which are only in make.

That does seem confusing. Is there a reason we can't have a config-devices.h which gets created from config-devices.mak?

Newsflash: homespun configuration system confusing, film at eleven.

(Autoconf is also confusing, but at least it's the same confusion everywhere)

Back to serious: patching configure to make sure all the CONFIG_ make variables make it into header files sounds good to me.

With #ifdef tests, forgetting to include the header switches things off. A single header makes guarding against that mistake easier: every .c needs to include it first, check with grep.

#6 lore raw

16.02.2015 10:57, Markus Armbruster wrote:
[]

Quoted 6 lines

Back to serious: patching configure to make sure all the CONFIG_ make variables make it into header files sounds good to me.

With #ifdef tests, forgetting to include the header switches things off. A single header makes guarding against that mistake easier: every .c needs to include it first, check with grep.

Single header means that any change in config options results in recompilation of everything. Linux kernel solves this but the mechanism is a bit heavy...

Thanks,

/mjt

#7 lore raw
In reply to Peter Maydell
Quoted 7 lines · Peter Maydell
Quoted 3 lines · David Gibson

Godammit. Have I mentioned lately how much it pisses me off that we have various config symbols and it's never clear which ones make it into C and which are only in make.

That does seem confusing. Is there a reason we can't have a config-devices.h which gets created from config-devices.mak?

Blue Swirl opposed it because we already had qdev_try_create... The problem here was that CONFIG_PCI_HOTPLUG_OLD was in config-devices.mak but not a device. There were other cases before (CONFIG_FDT maybe?) but I think this was the last one.

I'd just kill it at this point...

Paolo