On 2019-01-15 15:10, Yang Zhong wrote: > From: Paolo Bonzini <pbonz...@redhat.com> > > Instead of including the same list of devices for each target, > set CONFIG_PCI to true, and make the devices default to present > whenever PCI is available. > > Done mostly with the following script: > > while read i; do > i=${i%=y}; i=${i#CONFIG_} > sed -i -e'/^config '$i'$/!b' -en \ > -e'a\' -e' default y\' -e' depends on PCI' \ > `grep -lw $i hw/*/Kconfig` > done < default-configs/pci.mak > > followed by replacing a few "depends on" clauses with "select" > whenever the symbol is not really related to PCI. > > Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> > Signed-off-by: Yang Zhong <yang.zh...@intel.com> > --- [...] > diff --git a/hw/net/Kconfig b/hw/net/Kconfig > index 6b2ec971b5..5191c082e3 100644 > --- a/hw/net/Kconfig > +++ b/hw/net/Kconfig > @@ -3,27 +3,42 @@ config DP8393X > > config NE2000_PCI > bool > + default y > + depends on PCI > > config EEPRO100_PCI > bool > + default y > + depends on PCI > > config PCNET_PCI > bool > + default y > + depends on PCI > + select PCNET_COMMON > > config PCNET_COMMON > bool > > config E1000_PCI > bool > + default y > + depends on PCI > > config E1000E_PCI > bool > + default y > + depends on PCI
The e1000e is a PCI-e device, so maybe this should rather depend on "PCIE" instead? With that fixed: Reviewed-by: Thomas Huth <th...@redhat.com> > config RTL8139_PCI > bool > + default y > + depends on PCI > > config VMXNET3_PCI > bool > + default y > + depends on PCI [...] > diff --git a/hw/usb/Kconfig b/hw/usb/Kconfig > index cbf5c5d761..f23c542d27 100644 > --- a/hw/usb/Kconfig > +++ b/hw/usb/Kconfig > @@ -3,21 +3,31 @@ config USB > > config USB_UHCI > bool > + default y > + depends on PCI > > config USB_OHCI > bool > + default y > + depends on PCI > > config USB_EHCI > bool > + default y > + depends on PCI We might need a USB_EHCI_PCI switch in the future (since there is also _SYSBUS which could be used without PCI), but I think that can be done in a later patch. > config USB_EHCI_SYSBUS > bool > > config USB_XHCI > bool > + default y > + depends on PCI > > config USB_XHCI_NEC > bool > + default y > + depends on PCI > > config USB_MUSB > bool Thomas