hw/9pfs: Include virtio-9p-device.o in build
PATCH 1/1 hw/9pfs: Include virtio-9p-device.o in build
From: "Aneesh Kumar K.V" <[email protected]>
After commit ba1183da9a10b94611cad88c44a5c6df005f9b55 we are including hw/Makefile.objs directly from Makefile.target. Hence we need to define the config in Makefile.target too to include virtio-9p-device.o in the build
--- Makefile.target | 4 ++++ 1 file changed, 4 insertions(+)
Makefile.target +4 -0
@@ -137,6 +137,10 @@ endif # CONFIG_SOFTMMU # Workaround for http://gcc.gnu.org/PR55489, see configure. %/translate.o: QEMU_CFLAGS += $(TRANSLATE_OPT_CFLAGS) +ifeq ($(CONFIG_VIRTIO)$(CONFIG_VIRTFS)$(CONFIG_PCI),yyy) +CONFIG_REALLY_VIRTFS=y +endif + dummy := $(call unnest-vars,,obj-y) # we are making another call to unnest-vars with different vars, protect obj-y,
Signature · 1 line
1.8.3.2
Il 03/03/2014 20:08, Aneesh Kumar K.V ha scritto:
Quoted 18 lines
From: "Aneesh Kumar K.V" <[email protected]>
After commit
ba1183da9a10b94611cad88c44a5c6df005f9b55we are including hw/Makefile.objs directly from Makefile.target. Hence we need to define the config in Makefile.target too to include virtio-9p-device.o in the buildSigned-off-by Aneesh Kumar K.V <[email protected]>--- Makefile.target | 4 ++++ 1 file changed, 4 insertions(+)Makefile.target +0
-0
Makefile.target endif # CONFIG_SOFTMMU · line 146
Quoted 10 lines
Makefile.target +4
-0@@ -137,6 +137,10 @@ endif # CONFIG_SOFTMMU # Workaround for http://gcc.gnu.org/PR55489, see configure. %/translate.o: QEMU_CFLAGS += $(TRANSLATE_OPT_CFLAGS) +ifeq ($(CONFIG_VIRTIO)$(CONFIG_VIRTFS)$(CONFIG_PCI),yyy) +CONFIG_REALLY_VIRTFS=y +endif + dummy := $(call unnest-vars,,obj-y) # we are making another call to unnest-vars with different vars, protect obj-y,
Can you just replace $(CONFIG_REALLY_VIRTFS) with
$(call land, $(call land, $(CONFIG_VIRTIO),
$(CONFIG_VIRTFS)),
$(CONFIG_PCI))in hw/Makefile.objs, and remove it from Makefile.objs?
Paolo
Quoted 32 lines · Paolo Bonzini
Il 03/03/2014 20:08, Aneesh Kumar K.V ha scritto:
Quoted 18 lines
From: "Aneesh Kumar K.V" <[email protected]>
After commit
ba1183da9a10b94611cad88c44a5c6df005f9b55we are including hw/Makefile.objs directly from Makefile.target. Hence we need to define the config in Makefile.target too to include virtio-9p-device.o in the buildSigned-off-by Aneesh Kumar K.V <[email protected]>--- Makefile.target | 4 ++++ 1 file changed, 4 insertions(+)Makefile.target +0
-0Makefile.target endif # CONFIG_SOFTMMU · line 146
Quoted 10 lines
Makefile.target +4
-0@@ -137,6 +137,10 @@ endif # CONFIG_SOFTMMU # Workaround for http://gcc.gnu.org/PR55489, see configure. %/translate.o: QEMU_CFLAGS += $(TRANSLATE_OPT_CFLAGS) +ifeq ($(CONFIG_VIRTIO)$(CONFIG_VIRTFS)$(CONFIG_PCI),yyy) +CONFIG_REALLY_VIRTFS=y +endif + dummy := $(call unnest-vars,,obj-y) # we are making another call to unnest-vars with different vars, protect obj-y,Can you just replace $(CONFIG_REALLY_VIRTFS) with
Quoted 5 lines
$(call land, $(call land, $(CONFIG_VIRTIO),
$(CONFIG_VIRTFS)), $(CONFIG_PCI))in hw/Makefile.objs, and remove it from Makefile.objs?
Like this ? That worked. Will update the patch
-devices-dirs-$(CONFIG_REALLY_VIRTFS) += 9pfs/
+devices-dirs-($call land,$(CONFIG_VIRTIO),$(CONFIG_VIRTFS),$(CONFIG_PCI)) += 9pfs/
-aneesh
Quoted 44 lines · Aneesh Kumar K.V
Quoted 32 lines · Paolo Bonzini
Il 03/03/2014 20:08, Aneesh Kumar K.V ha scritto:
Quoted 18 lines
From: "Aneesh Kumar K.V" <[email protected]>
After commit
ba1183da9a10b94611cad88c44a5c6df005f9b55we are including hw/Makefile.objs directly from Makefile.target. Hence we need to define the config in Makefile.target too to include virtio-9p-device.o in the buildSigned-off-by Aneesh Kumar K.V <[email protected]>--- Makefile.target | 4 ++++ 1 file changed, 4 insertions(+)Makefile.target +0
-0Makefile.target endif # CONFIG_SOFTMMU · line 146
Quoted 10 lines
Makefile.target +4
-0@@ -137,6 +137,10 @@ endif # CONFIG_SOFTMMU # Workaround for http://gcc.gnu.org/PR55489, see configure. %/translate.o: QEMU_CFLAGS += $(TRANSLATE_OPT_CFLAGS) +ifeq ($(CONFIG_VIRTIO)$(CONFIG_VIRTFS)$(CONFIG_PCI),yyy) +CONFIG_REALLY_VIRTFS=y +endif + dummy := $(call unnest-vars,,obj-y) # we are making another call to unnest-vars with different vars, protect obj-y,Can you just replace $(CONFIG_REALLY_VIRTFS) with
Quoted 5 lines
$(call land, $(call land, $(CONFIG_VIRTIO),
$(CONFIG_VIRTFS)), $(CONFIG_PCI))in hw/Makefile.objs, and remove it from Makefile.objs?
Like this ? That worked. Will update the patch
(quoted diff) +1
-1-devices-dirs-$(CONFIG_REALLY_VIRTFS) += 9pfs/ +devices-dirs-($call
Quoted 1 line
land,$(CONFIG_VIRTIO),$(CONFIG_VIRTFS),$(CONFIG_PCI)) += 9pfs/
That didn't really work with your suggested change i get
rules.mak:190: *** unterminated call to function call': missing )'. Stop
-aneesh
Quoted 27 lines · Paolo Bonzini
Il 03/03/2014 20:08, Aneesh Kumar K.V ha scritto:
Quoted 26 lines
From: "Aneesh Kumar K.V" <[email protected]>
After commit
ba1183da9a10b94611cad88c44a5c6df005f9b55we are including hw/Makefile.objs directly from Makefile.target. Hence we need to define the config in Makefile.target too to include virtio-9p-device.o in the buildSigned-off-by Aneesh Kumar K.V <[email protected]>--- Makefile.target | 4 ++++ 1 file changed, 4 insertions(+)Makefile.target +4
-0@@ -137,6 +137,10 @@ endif # CONFIG_SOFTMMU # Workaround for http://gcc.gnu.org/PR55489, see configure. %/translate.o: QEMU_CFLAGS += $(TRANSLATE_OPT_CFLAGS) +ifeq ($(CONFIG_VIRTIO)$(CONFIG_VIRTFS)$(CONFIG_PCI),yyy) +CONFIG_REALLY_VIRTFS=y +endif + dummy := $(call unnest-vars,,obj-y)
Quoted 9 lines
Makefile.target endif # CONFIG_SOFTMMU · line 146
Quoted 2 lines
Makefile.target +0
-0# we are making another call to unnest-vars with different vars, protect obj-y,Can you just replace $(CONFIG_REALLY_VIRTFS) with
$(call land, $(call land, $(CONFIG_VIRTIO),
$(CONFIG_VIRTFS)), $(CONFIG_PCI))
After multiple trial and error ended up with this. BTW where do i find docs for land/lnot etc ?
commit 01041f5df94ff19988cbadd7bd3eefcc9d964e4e
Author: Aneesh Kumar K.V <[email protected]> Date: Tue Mar 4 00:35:32 2014 +0530
hw/9pfs: Include virtio-9p-device.o in build
After commit ba1183da9a10b94611cad88c44a5c6df005f9b55 we are including hw/Makefile.objs directly from Makefile.target. Make sure hw/Makefile.objs rules doesn't depend on variable defined in Makefile.objs
Makefile.objs +0 -5
@@ -21,11 +21,6 @@ block-obj-y += coroutine-$(CONFIG_COROUTINE_BACKEND).o block-obj-m = block/ -ifeq ($(CONFIG_VIRTIO)$(CONFIG_VIRTFS)$(CONFIG_PCI),yyy) -# Lots of the fsdev/9pcode is pulled in by vl.c via qemu_fsdev_add. -# only pull in the actual virtio-9p device if we also enabled virtio. -CONFIG_REALLY_VIRTFS=y -endif ###################################################################### # smartcard
fsdev/Makefile.objs +3 -1
@@ -1,4 +1,6 @@ -ifeq ($(CONFIG_REALLY_VIRTFS),y) +ifeq ($(CONFIG_VIRTIO)$(CONFIG_VIRTFS)$(CONFIG_PCI),yyy) +# Lots of the fsdev/9pcode is pulled in by vl.c via qemu_fsdev_add. +# only pull in the actual virtio-9p device if we also enabled virtio. common-obj-y = qemu-fsdev.o virtio-9p-marshal.o else common-obj-y = qemu-fsdev-dummy.o
hw/Makefile.objs +1 -1
@@ -1,4 +1,4 @@ -devices-dirs-$(CONFIG_REALLY_VIRTFS) += 9pfs/ +devices-dirs-$(call land, $(CONFIG_VIRTIO),$(call land,$(CONFIG_VIRTFS),$(CONFIG_PCI))) += 9pfs/ devices-dirs-$(CONFIG_ACPI) += acpi/ devices-dirs-$(CONFIG_SOFTMMU) += audio/ devices-dirs-$(CONFIG_SOFTMMU) += block/
Serge E. Hallyn
Tested-by Serge HallynQuoted 46 lines · Aneesh Kumar K.V
Quoted 27 lines · Paolo Bonzini
Il 03/03/2014 20:08, Aneesh Kumar K.V ha scritto:
Quoted 26 lines
From: "Aneesh Kumar K.V" <[email protected]>
After commit
ba1183da9a10b94611cad88c44a5c6df005f9b55we are including hw/Makefile.objs directly from Makefile.target. Hence we need to define the config in Makefile.target too to include virtio-9p-device.o in the buildSigned-off-by Aneesh Kumar K.V <[email protected]>--- Makefile.target | 4 ++++ 1 file changed, 4 insertions(+)Makefile.target +4
-0@@ -137,6 +137,10 @@ endif # CONFIG_SOFTMMU # Workaround for http://gcc.gnu.org/PR55489, see configure. %/translate.o: QEMU_CFLAGS += $(TRANSLATE_OPT_CFLAGS) +ifeq ($(CONFIG_VIRTIO)$(CONFIG_VIRTFS)$(CONFIG_PCI),yyy) +CONFIG_REALLY_VIRTFS=y +endif + dummy := $(call unnest-vars,,obj-y)Quoted 9 lines
Makefile.target endif # CONFIG_SOFTMMU · line 146
Quoted 2 lines
Makefile.target +0
-0# we are making another call to unnest-vars with different vars, protect obj-y,Can you just replace $(CONFIG_REALLY_VIRTFS) with
$(call land, $(call land, $(CONFIG_VIRTIO),
$(CONFIG_VIRTFS)), $(CONFIG_PCI))After multiple trial and error ended up with this. BTW where do i find docs for land/lnot etc ?
commit
01041f5df94ff19988cbadd7bd3eefcc9d964e4eAuthor: Aneesh Kumar K.V <[email protected]> Date: Tue Mar 4 00:35:32 2014 +0530
Quoted 7 lines
hw/9pfs: Include virtio-9p-device.o in build
After commit
ba1183da9a10b94611cad88c44a5c6df005f9b55we are including hw/Makefile.objs directly from Makefile.target. Make sure hw/Makefile.objs rules doesn't depend on variable defined in Makefile.objsSigned-off-by Aneesh Kumar K.V <[email protected]>
Thanks, Aneesh, this worked for me.
Quoted 40 lines
Makefile.objs +0
-5@@ -21,11 +21,6 @@ block-obj-y += coroutine-$(CONFIG_COROUTINE_BACKEND).o block-obj-m = block/ -ifeq ($(CONFIG_VIRTIO)$(CONFIG_VIRTFS)$(CONFIG_PCI),yyy) -# Lots of the fsdev/9pcode is pulled in by vl.c via qemu_fsdev_add. -# only pull in the actual virtio-9p device if we also enabled virtio. -CONFIG_REALLY_VIRTFS=y -endif ###################################################################### # smartcardfsdev/Makefile.objs +3
-1@@ -1,4 +1,6 @@ -ifeq ($(CONFIG_REALLY_VIRTFS),y) +ifeq ($(CONFIG_VIRTIO)$(CONFIG_VIRTFS)$(CONFIG_PCI),yyy) +# Lots of the fsdev/9pcode is pulled in by vl.c via qemu_fsdev_add. +# only pull in the actual virtio-9p device if we also enabled virtio. common-obj-y = qemu-fsdev.o virtio-9p-marshal.o else common-obj-y = qemu-fsdev-dummy.ohw/Makefile.objs +1
-1@@ -1,4 +1,4 @@ -devices-dirs-$(CONFIG_REALLY_VIRTFS) += 9pfs/ +devices-dirs-$(call land, $(CONFIG_VIRTIO),$(call land,$(CONFIG_VIRTFS),$(CONFIG_PCI))) += 9pfs/ devices-dirs-$(CONFIG_ACPI) += acpi/ devices-dirs-$(CONFIG_SOFTMMU) += audio/ devices-dirs-$(CONFIG_SOFTMMU) += block/
Quoted 1 line · Aneesh Kumar K.V
BTW where do i find docs for land/lnot etc ?
Best we have is the comments in rules.mak where they're defined...
thanks
-- PMM
Am 03.03.2014 20:13, schrieb Paolo Bonzini:
Quoted 33 lines
Il 03/03/2014 20:08, Aneesh Kumar K.V ha scritto:
Quoted 27 lines
From: "Aneesh Kumar K.V" <[email protected]>
After commit
ba1183da9a10b94611cad88c44a5c6df005f9b55we are including hw/Makefile.objs directly from Makefile.target. Hence we need to define the config in Makefile.target too to include virtio-9p-device.o in the buildSigned-off-by Aneesh Kumar K.V <[email protected]>--- Makefile.target | 4 ++++ 1 file changed, 4 insertions(+)Makefile.target +4
-0@@ -137,6 +137,10 @@ endif # CONFIG_SOFTMMU # Workaround for http://gcc.gnu.org/PR55489, see configure. %/translate.o: QEMU_CFLAGS += $(TRANSLATE_OPT_CFLAGS) +ifeq ($(CONFIG_VIRTIO)$(CONFIG_VIRTFS)$(CONFIG_PCI),yyy) +CONFIG_REALLY_VIRTFS=y +endif + dummy := $(call unnest-vars,,obj-y) # we are making another call to unnest-vars with different vars,Quoted 2 lines
protect obj-y,
Can you just replace $(CONFIG_REALLY_VIRTFS) with
Quoted 5 lines
$(call land, $(call land, $(CONFIG_VIRTIO),
$(CONFIG_VIRTFS)), $(CONFIG_PCI))in hw/Makefile.objs, and remove it from Makefile.objs?
Is your trouble with the "REALLY" in there? I've been working on a virtio-9p qtest, which was able to reuse $(CONFIG_REALLY_VIRTFS) before; now I need to copy the full ifeq() expression.
Regards,
Andreas
Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
Il 05/03/2014 16:50, Andreas Färber ha scritto:
Quoted 38 lines
Am 03.03.2014 20:13, schrieb Paolo Bonzini:
Quoted 37 lines
Il 03/03/2014 20:08, Aneesh Kumar K.V ha scritto:
Quoted 27 lines
From: "Aneesh Kumar K.V" <[email protected]>
After commit
ba1183da9a10b94611cad88c44a5c6df005f9b55we are including hw/Makefile.objs directly from Makefile.target. Hence we need to define the config in Makefile.target too to include virtio-9p-device.o in the buildSigned-off-by Aneesh Kumar K.V <[email protected]>--- Makefile.target | 4 ++++ 1 file changed, 4 insertions(+)Makefile.target +4
-0@@ -137,6 +137,10 @@ endif # CONFIG_SOFTMMU # Workaround for http://gcc.gnu.org/PR55489, see configure. %/translate.o: QEMU_CFLAGS += $(TRANSLATE_OPT_CFLAGS) +ifeq ($(CONFIG_VIRTIO)$(CONFIG_VIRTFS)$(CONFIG_PCI),yyy) +CONFIG_REALLY_VIRTFS=y +endif + dummy := $(call unnest-vars,,obj-y) # we are making another call to unnest-vars with different vars,Quoted 2 lines
protect obj-y,
Can you just replace $(CONFIG_REALLY_VIRTFS) with
$(call land, $(call land, $(CONFIG_VIRTIO),
$(CONFIG_VIRTFS)), $(CONFIG_PCI))
Quoted 5 lines
Quoted 1 line
in hw/Makefile.objs, and remove it from Makefile.objs?
Is your trouble with the "REALLY" in there? I've been working on a virtio-9p qtest, which was able to reuse $(CONFIG_REALLY_VIRTFS) before; now I need to copy the full
ifeq()expression.
No, the trouble is more with the code duplication that the patch introduces between Makefile.objs and Makefile.target.
Paolo
Andreas Färber
Tested-byAm 04.03.2014 00:36, schrieb Serge E. Hallyn:
Quoted 11 lines · Aneesh Kumar K.V
Quoted 10 lines
commit
01041f5df94ff19988cbadd7bd3eefcc9d964e4eAuthor: Aneesh Kumar K.V <[email protected]> Date: Tue Mar 4 00:35:32 2014 +0530hw/9pfs: Include virtio-9p-device.o in build
After commit
ba1183da9a10b94611cad88c44a5c6df005f9b55we are including hw/Makefile.objs directly from Makefile.target. Make sure hw/Makefile.objs rules doesn't depend on variable defined in Makefile.objs
Quoted 5 lines
Quoted 1 line
Signed-off-by Aneesh Kumar K.V <[email protected]>Thanks, Aneesh, this worked for me.
Tested-by Serge Hallyn <[email protected]>
Aneesh, could you please either properly submit a v2 so that Peter can apply it or send a pull to somehow fix this?
Thanks,
Andreas
Quoted 40 lines
Quoted 40 lines
Makefile.objs +0
-5@@ -21,11 +21,6 @@ block-obj-y += coroutine-$(CONFIG_COROUTINE_BACKEND).o block-obj-m = block/ -ifeq ($(CONFIG_VIRTIO)$(CONFIG_VIRTFS)$(CONFIG_PCI),yyy) -# Lots of the fsdev/9pcode is pulled in by vl.c via qemu_fsdev_add. -# only pull in the actual virtio-9p device if we also enabled virtio. -CONFIG_REALLY_VIRTFS=y -endif ###################################################################### # smartcardfsdev/Makefile.objs +3
-1@@ -1,4 +1,6 @@ -ifeq ($(CONFIG_REALLY_VIRTFS),y) +ifeq ($(CONFIG_VIRTIO)$(CONFIG_VIRTFS)$(CONFIG_PCI),yyy) +# Lots of the fsdev/9pcode is pulled in by vl.c via qemu_fsdev_add. +# only pull in the actual virtio-9p device if we also enabled virtio. common-obj-y = qemu-fsdev.o virtio-9p-marshal.o else common-obj-y = qemu-fsdev-dummy.ohw/Makefile.objs +1
-1@@ -1,4 +1,4 @@ -devices-dirs-$(CONFIG_REALLY_VIRTFS) += 9pfs/ +devices-dirs-$(call land, $(CONFIG_VIRTIO),$(call land,$(CONFIG_VIRTFS),$(CONFIG_PCI))) += 9pfs/ devices-dirs-$(CONFIG_ACPI) += acpi/ devices-dirs-$(CONFIG_SOFTMMU) += audio/ devices-dirs-$(CONFIG_SOFTMMU) += block/
Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
Quoted 14 lines · Andreas Färber
Am 04.03.2014 00:36, schrieb Serge E. Hallyn:
Quoted 13 lines · Aneesh Kumar K.V
Quoted 11 lines
commit
01041f5df94ff19988cbadd7bd3eefcc9d964e4eAuthor: Aneesh Kumar K.V <[email protected]> Date: Tue Mar 4 00:35:32 2014 +0530hw/9pfs: Include virtio-9p-device.o in build
After commit
ba1183da9a10b94611cad88c44a5c6df005f9b55we are including hw/Makefile.objs directly from Makefile.target. Make sure hw/Makefile.objs rules doesn't depend on variable defined in Makefile.objsSigned-off-by Aneesh Kumar K.V <[email protected]>
Quoted 8 lines
Quoted 3 lines
Thanks, Aneesh, this worked for me.
Tested-by Serge Hallyn <[email protected]>Tested-by Andreas Färber <[email protected]>Aneesh, could you please either properly submit a v2 so that Peter can apply it or send a pull to somehow fix this?
Will do a pull request with this and others by end of week.
The tree with patches are already here
https://github.com/kvaneesh/qemu/commits/for-upstream
Just need to get one more round of testing.
-aneesh