fixup 9pfs dependencies
PATCH 1/1 9pfs: fix and simplify dependencies
In reply to Cornelia HuckWe want to compile the 9pfs code iff virtfs is enabled and a virtio transport is available (not only pci!).
Let's make the generated CONFIG_VIRTFS statement depend on either CONFIG_VIRTIO_PCI or (new) CONFIG_VIRTIO_CCW. The Makefiles for fsdev/ and hw/9pfs/ can then depend on CONFIG_VIRTFS directly.
--- configure | 2 +- default-configs/s390x-softmmu.mak | 1 + fsdev/Makefile.objs | 2 +- hw/Makefile.objs | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-)
configure +1 -1
@@ -5771,7 +5771,7 @@ if test "$libattr" = "yes" ; then echo "CONFIG_LIBATTR=y" >> $config_host_mak fi if test "$virtfs" = "yes" ; then - echo "CONFIG_VIRTFS=y" >> $config_host_mak + echo 'CONFIG_VIRTFS=$(call lor, $(CONFIG_VIRTIO_PCI),$(CONFIG_VIRTIO_CCW))' >> $config_host_mak fi if test "$vhost_scsi" = "yes" ; then echo "CONFIG_VHOST_SCSI=y" >> $config_host_mak
default-configs/s390x-softmmu.mak +1 -0
@@ -8,3 +8,4 @@ CONFIG_S390_FLIC=y CONFIG_S390_FLIC_KVM=$(CONFIG_KVM) CONFIG_VFIO_CCW=$(CONFIG_LINUX) CONFIG_WDT_DIAG288=y +CONFIG_VIRTIO_CCW=y
fsdev/Makefile.objs +1 -1
@@ -1,4 +1,4 @@ -ifeq ($(CONFIG_VIRTIO)$(CONFIG_VIRTFS)$(CONFIG_PCI),yyy) +ifeq ($(CONFIG_VIRTFS),y) # 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 9p-marshal.o 9p-iov-marshal.o
hw/Makefile.objs +1 -1
@@ -1,4 +1,4 @@ -devices-dirs-$(call land, $(CONFIG_VIRTIO),$(call land,$(CONFIG_VIRTFS),$(CONFIG_PCI))) += 9pfs/ +devices-dirs-$(CONFIG_VIRTFS) += 9pfs/ devices-dirs-$(CONFIG_SOFTMMU) += acpi/ devices-dirs-$(CONFIG_SOFTMMU) += adc/ devices-dirs-$(CONFIG_SOFTMMU) += audio/
Signature · 1 line
2.13.4
cover fixup 9pfs dependencies
During my work on cleaning up the pci dependencies on s390x (see my "s390x: zPCI detangling" patch series), I noticed that the 9pfs code is only built if CONFIG_PCI is set. There's really nothing in there that should depend on CONFIG_PCI (it is really transport-agnostic); we do want to make sure that we have a virtio-9p-transport device, however.
This patch is on top of master; it does not really make a difference right now, but will be needed after my patch series to avoid an inconsistent config for s390x with pci off.
Cornelia Huck (1):
9pfs: fix and simplify dependencies
configure | 2 +- default-configs/s390x-softmmu.mak | 1 + fsdev/Makefile.objs | 2 +- hw/Makefile.objs | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-)
Signature · 1 line
2.13.4
Re: [Qemu-devel] [PATCH 1/1] 9pfs: fix and simplify dependencies
In reply to Cornelia HuckQuoted 10 lines · On Tue, 8 Aug 2017 14:17:01 +0200 Cornelia Huck <[email protected]> wrote:
We want to compile the 9pfs code iff virtfs is enabled and a virtio transport is available (not only pci!).
Let's make the generated
CONFIG_VIRTFSstatement depend on eitherCONFIG_VIRTIO_PCIor (new)CONFIG_VIRTIO_CCW. The Makefiles for fsdev/ and hw/9pfs/ can then depend onCONFIG_VIRTFSdirectly.Suggested-by Thomas Huth <[email protected]>Signed-off-by Cornelia Huck <[email protected]>---
It looks good to me.
Quoted 48 lines
configure | 2 +- default-configs/s390x-softmmu.mak | 1 + fsdev/Makefile.objs | 2 +- hw/Makefile.objs | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-)configure +1
-1@@ -5771,7 +5771,7 @@ if test "$libattr" = "yes" ; then echo "CONFIG_LIBATTR=y" >> $config_host_mak fi if test "$virtfs" = "yes" ; then - echo "CONFIG_VIRTFS=y" >> $config_host_mak + echo 'CONFIG_VIRTFS=$(call lor, $(CONFIG_VIRTIO_PCI),$(CONFIG_VIRTIO_CCW))' >> $config_host_mak fi if test "$vhost_scsi" = "yes" ; then echo "CONFIG_VHOST_SCSI=y" >> $config_host_makdefault-configs/s390x-softmmu.mak +1
-0@@ -8,3 +8,4 @@ CONFIG_S390_FLIC=y CONFIG_S390_FLIC_KVM=$(CONFIG_KVM) CONFIG_VFIO_CCW=$(CONFIG_LINUX) CONFIG_WDT_DIAG288=y +CONFIG_VIRTIO_CCW=yfsdev/Makefile.objs +1
-1@@ -1,4 +1,4 @@ -ifeq ($(CONFIG_VIRTIO)$(CONFIG_VIRTFS)$(CONFIG_PCI),yyy) +ifeq ($(CONFIG_VIRTFS),y) # 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 9p-marshal.o 9p-iov-marshal.ohw/Makefile.objs +1
-1@@ -1,4 +1,4 @@ -devices-dirs-$(call land, $(CONFIG_VIRTIO),$(call land,$(CONFIG_VIRTFS),$(CONFIG_PCI))) += 9pfs/ +devices-dirs-$(CONFIG_VIRTFS) += 9pfs/ devices-dirs-$(CONFIG_SOFTMMU) += acpi/ devices-dirs-$(CONFIG_SOFTMMU) += adc/ devices-dirs-$(CONFIG_SOFTMMU) += audio/
Re: [Qemu-devel] [PATCH 1/1] 9pfs: fix and simplify dependencies
Quoted 10 lines · On Tue, 8 Aug 2017 14:50:00 +0200 Greg Kurz <[email protected]> wrote:
Quoted 7 lines · On Tue, 8 Aug 2017 14:17:01 +0200 Cornelia Huck <[email protected]> wrote:
We want to compile the 9pfs code iff virtfs is enabled and a virtio transport is available (not only pci!).
Let's make the generated
CONFIG_VIRTFSstatement depend on eitherCONFIG_VIRTIO_PCIor (new)CONFIG_VIRTIO_CCW. The Makefiles for fsdev/ and hw/9pfs/ can then depend onCONFIG_VIRTFSdirectly.
Quoted 13 lines
Quoted 3 lines
Suggested-by Thomas Huth <[email protected]>Signed-off-by Cornelia Huck <[email protected]>---
It looks good to me.
Acked-by Greg Kurz <[email protected]>Quoted 5 lines
configure | 2 +- default-configs/s390x-softmmu.mak | 1 + fsdev/Makefile.objs | 2 +- hw/Makefile.objs | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-)
Thanks!
Will you queue this yourself, or should I send it together with the zpci cleanup patches?
Re: [Qemu-devel] [PATCH 1/1] 9pfs: fix and simplify dependencies
In reply to Greg KurzQuoted 10 lines · On Tue, 8 Aug 2017 14:50:00 +0200 Greg Kurz <[email protected]> wrote:
Quoted 7 lines · On Tue, 8 Aug 2017 14:17:01 +0200 Cornelia Huck <[email protected]> wrote:
We want to compile the 9pfs code iff virtfs is enabled and a virtio transport is available (not only pci!).
Let's make the generated
CONFIG_VIRTFSstatement depend on eitherCONFIG_VIRTIO_PCIor (new)CONFIG_VIRTIO_CCW. The Makefiles for fsdev/ and hw/9pfs/ can then depend onCONFIG_VIRTFSdirectly.
Quoted 6 lines
Quoted 3 lines
Suggested-by Thomas Huth <[email protected]>Signed-off-by Cornelia Huck <[email protected]>---
It looks good to me.
Oops, reading Thomas's other mail, I now realize that with this patch we end up with the following in config-host.mak:
CONFIG_VIRTFS=$(call lor, $(CONFIG_VIRTIO_PCI),$(CONFIG_VIRTIO_CCW))
which looks wrong even if it may "work"... but we also get the following in config-host.h:
#define CONFIG_VIRTFS $(call lor, $(CONFIG_VIRTIO_PCI),$(CONFIG_VIRTIO_CCW))
which is clearly wrong.
Maybe post the changes from your other mail instead ?
Message-ID: <20170808111542.16422571@gondolin>
The patch isn't that ugly, given the ugliness of the current makefiles :)
And we can come up with some cleanup patch later.
Quoted 2 lines
Acked-by Greg Kurz <[email protected]>
NAcked-by: in fact :)
Quoted 49 lines
Quoted 48 lines
configure | 2 +- default-configs/s390x-softmmu.mak | 1 + fsdev/Makefile.objs | 2 +- hw/Makefile.objs | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-)configure +1
-1@@ -5771,7 +5771,7 @@ if test "$libattr" = "yes" ; then echo "CONFIG_LIBATTR=y" >> $config_host_mak fi if test "$virtfs" = "yes" ; then - echo "CONFIG_VIRTFS=y" >> $config_host_mak + echo 'CONFIG_VIRTFS=$(call lor, $(CONFIG_VIRTIO_PCI),$(CONFIG_VIRTIO_CCW))' >> $config_host_mak fi if test "$vhost_scsi" = "yes" ; then echo "CONFIG_VHOST_SCSI=y" >> $config_host_makdefault-configs/s390x-softmmu.mak +1
-0@@ -8,3 +8,4 @@ CONFIG_S390_FLIC=y CONFIG_S390_FLIC_KVM=$(CONFIG_KVM) CONFIG_VFIO_CCW=$(CONFIG_LINUX) CONFIG_WDT_DIAG288=y +CONFIG_VIRTIO_CCW=yfsdev/Makefile.objs +1
-1@@ -1,4 +1,4 @@ -ifeq ($(CONFIG_VIRTIO)$(CONFIG_VIRTFS)$(CONFIG_PCI),yyy) +ifeq ($(CONFIG_VIRTFS),y) # 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 9p-marshal.o 9p-iov-marshal.ohw/Makefile.objs +1
-1@@ -1,4 +1,4 @@ -devices-dirs-$(call land, $(CONFIG_VIRTIO),$(call land,$(CONFIG_VIRTFS),$(CONFIG_PCI))) += 9pfs/ +devices-dirs-$(CONFIG_VIRTFS) += 9pfs/ devices-dirs-$(CONFIG_SOFTMMU) += acpi/ devices-dirs-$(CONFIG_SOFTMMU) += adc/ devices-dirs-$(CONFIG_SOFTMMU) += audio/
Re: [Qemu-devel] [PATCH 1/1] 9pfs: fix and simplify dependencies
Quoted 23 lines · On Tue, 8 Aug 2017 16:15:59 +0200 Greg Kurz <[email protected]> wrote:
Quoted 10 lines · On Tue, 8 Aug 2017 14:50:00 +0200 Greg Kurz <[email protected]> wrote:
Quoted 7 lines · On Tue, 8 Aug 2017 14:17:01 +0200 Cornelia Huck <[email protected]> wrote:
We want to compile the 9pfs code iff virtfs is enabled and a virtio transport is available (not only pci!).
Let's make the generated
CONFIG_VIRTFSstatement depend on eitherCONFIG_VIRTIO_PCIor (new)CONFIG_VIRTIO_CCW. The Makefiles for fsdev/ and hw/9pfs/ can then depend onCONFIG_VIRTFSdirectly.Quoted 6 lines
Quoted 3 lines
Suggested-by Thomas Huth <[email protected]>Signed-off-by Cornelia Huck <[email protected]>---
It looks good to me.
Oops, reading Thomas's other mail, I now realize that with this patch we end up with the following in config-host.mak:
Quoted 8 lines
CONFIG_VIRTFS=$(calllor, $(CONFIG_VIRTIO_PCI),$(CONFIG_VIRTIO_CCW))which looks wrong even if it may "work"... but we also get the following in
config-host.h:#define
CONFIG_VIRTFS$(call lor, $(CONFIG_VIRTIO_PCI),$(CONFIG_VIRTIO_CCW))which is clearly wrong.
Eek. Oh well, it would have been nice...
Quoted 6 lines
Maybe post the changes from your other mail instead ?
Message-ID: <20170808111542.16422571@gondolin>
The patch isn't that ugly, given the ugliness of the current makefiles :)
It is slightly differently ugly :)
Quoted 2 lines
And we can come up with some cleanup patch later.
Nod.
Quoted 5 lines
Quoted 3 lines
Acked-by Greg Kurz <[email protected]>NAcked-by: in fact :)
Heh :)
I'll post the other patch properly.