Skip to contentSkip to conversation

hw/vfio: Move some target-independent devices to common-objs

PATCH-for-5.2 Philippe Mathieu-Daudé 2 participants 2 messages Jul 15, 2020 – Jul 17, 2020

lore
Share & tools
lore
#0 lore raw

These devices do not depend on the target CPU configuration (32 or 64-bit, big / little endian). Move them to common-obj to compile them once for all the targets.

---
 hw/vfio/Makefile.objs | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
hw/vfio/Makefile.objs +5 -4
index 9bb1c09e84..f663a800b1 100644
@@ -1,8 +1,9 @@
 obj-y += common.o spapr.o
-obj-$(CONFIG_VFIO_PCI) += pci.o pci-quirks.o display.o
+obj-$(CONFIG_VFIO_PCI) += pci.o pci-quirks.o
 obj-$(CONFIG_VFIO_CCW) += ccw.o
 obj-$(CONFIG_VFIO_PLATFORM) += platform.o
-obj-$(CONFIG_VFIO_XGMAC) += calxeda-xgmac.o
-obj-$(CONFIG_VFIO_AMD_XGBE) += amd-xgbe.o
 obj-$(CONFIG_VFIO_AP) += ap.o
-obj-$(CONFIG_VFIO_IGD) += igd.o
+common-obj-$(CONFIG_VFIO_PCI) += display.o
+common-obj-$(CONFIG_VFIO_XGMAC) += calxeda-xgmac.o
+common-obj-$(CONFIG_VFIO_AMD_XGBE) += amd-xgbe.o
+common-obj-$(CONFIG_VFIO_IGD) += igd.o
Signature · 1 line
2.21.3
#1 lore raw
Quoted 17 lines · On Wed, 15 Jul 2020 15:13:22 +0200 Philippe Mathieu-Daudé <[email protected]>…

These devices do not depend on the target CPU configuration (32 or 64-bit, big / little endian). Move them to common-obj to compile them once for all the targets.

---
 hw/vfio/Makefile.objs | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
hw/vfio/Makefile.objs +1 -1
index 9bb1c09e84..f663a800b1 100644
@@ -1,8 +1,9 @@
 obj-y += common.o spapr.o
-obj-$(CONFIG_VFIO_PCI) += pci.o pci-quirks.o display.o
+obj-$(CONFIG_VFIO_PCI) += pci.o pci-quirks.o

hw/vfio/Makefile.objs line 9

Quoted 10 lines
hw/vfio/Makefile.objs +4 -3
 obj-$(CONFIG_VFIO_CCW) += ccw.o
 obj-$(CONFIG_VFIO_PLATFORM) += platform.o
-obj-$(CONFIG_VFIO_XGMAC) += calxeda-xgmac.o
-obj-$(CONFIG_VFIO_AMD_XGBE) += amd-xgbe.o
 obj-$(CONFIG_VFIO_AP) += ap.o
-obj-$(CONFIG_VFIO_IGD) += igd.o
+common-obj-$(CONFIG_VFIO_PCI) += display.o
+common-obj-$(CONFIG_VFIO_XGMAC) += calxeda-xgmac.o
+common-obj-$(CONFIG_VFIO_AMD_XGBE) += amd-xgbe.o
+common-obj-$(CONFIG_VFIO_IGD) += igd.o

What thing, or lack of thing, are you looking for in these files that aren't in the others? For instance if igd.o is common, but pci-quirks.o is not, where igd.o is just a quirk that got split out of pci-quirks.o so that we could more easily compile it out, it feels like we might be stumbling into cases where adding or removing code that would shift objects into or out of the common-obj target. I don't know how to maintain that. Thanks,

Alex