qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] hw/9pfs: Include virtio-9p-device.o in build
@ 2014-03-03 19:08 Aneesh Kumar K.V
  2014-03-03 19:13 ` Paolo Bonzini
  0 siblings, 1 reply; 11+ messages in thread
From: Aneesh Kumar K.V @ 2014-03-03 19:08 UTC (permalink / raw)
  To: qemu-devel, Fam Zheng; +Cc: Aneesh Kumar K.V

From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>

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

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
---
 Makefile.target | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Makefile.target b/Makefile.target
index ba1234063eae..da8daa82c39e 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -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,
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] [PATCH] hw/9pfs: Include virtio-9p-device.o in build
  2014-03-03 19:08 [Qemu-devel] [PATCH] hw/9pfs: Include virtio-9p-device.o in build Aneesh Kumar K.V
@ 2014-03-03 19:13 ` Paolo Bonzini
  2014-03-03 19:42   ` Aneesh Kumar K.V
                     ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Paolo Bonzini @ 2014-03-03 19:13 UTC (permalink / raw)
  To: Aneesh Kumar K.V, qemu-devel, Fam Zheng

Il 03/03/2014 20:08, Aneesh Kumar K.V ha scritto:
> From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
>
> 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
>
> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
> ---
>  Makefile.target | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/Makefile.target b/Makefile.target
> index ba1234063eae..da8daa82c39e 100644
> --- a/Makefile.target
> +++ b/Makefile.target
> @@ -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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] [PATCH] hw/9pfs: Include virtio-9p-device.o in build
  2014-03-03 19:13 ` Paolo Bonzini
@ 2014-03-03 19:42   ` Aneesh Kumar K.V
  2014-03-03 20:02     ` Aneesh Kumar K.V
  2014-03-03 20:32   ` Aneesh Kumar K.V
  2014-03-05 15:50   ` Andreas Färber
  2 siblings, 1 reply; 11+ messages in thread
From: Aneesh Kumar K.V @ 2014-03-03 19:42 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel, Fam Zheng

Paolo Bonzini <pbonzini@redhat.com> writes:

> Il 03/03/2014 20:08, Aneesh Kumar K.V ha scritto:
>> From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
>>
>> 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
>>
>> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
>> ---
>>  Makefile.target | 4 ++++
>>  1 file changed, 4 insertions(+)
>>
>> diff --git a/Makefile.target b/Makefile.target
>> index ba1234063eae..da8daa82c39e 100644
>> --- a/Makefile.target
>> +++ b/Makefile.target
>> @@ -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?

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] [PATCH] hw/9pfs: Include virtio-9p-device.o in build
  2014-03-03 19:42   ` Aneesh Kumar K.V
@ 2014-03-03 20:02     ` Aneesh Kumar K.V
  0 siblings, 0 replies; 11+ messages in thread
From: Aneesh Kumar K.V @ 2014-03-03 20:02 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel, Fam Zheng

"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com> writes:

> Paolo Bonzini <pbonzini@redhat.com> writes:
>
>> Il 03/03/2014 20:08, Aneesh Kumar K.V ha scritto:
>>> From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
>>>
>>> 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
>>>
>>> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
>>> ---
>>>  Makefile.target | 4 ++++
>>>  1 file changed, 4 insertions(+)
>>>
>>> diff --git a/Makefile.target b/Makefile.target
>>> index ba1234063eae..da8daa82c39e 100644
>>> --- a/Makefile.target
>>> +++ b/Makefile.target
>>> @@ -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?
>
> 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/

That didn't really work with your suggested change i get

rules.mak:190: *** unterminated call to function `call': missing `)'.
Stop

-aneesh

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] [PATCH] hw/9pfs: Include virtio-9p-device.o in build
  2014-03-03 19:13 ` Paolo Bonzini
  2014-03-03 19:42   ` Aneesh Kumar K.V
@ 2014-03-03 20:32   ` Aneesh Kumar K.V
  2014-03-03 23:36     ` Serge E. Hallyn
  2014-03-03 23:45     ` Peter Maydell
  2014-03-05 15:50   ` Andreas Färber
  2 siblings, 2 replies; 11+ messages in thread
From: Aneesh Kumar K.V @ 2014-03-03 20:32 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel, Fam Zheng

Paolo Bonzini <pbonzini@redhat.com> writes:

> Il 03/03/2014 20:08, Aneesh Kumar K.V ha scritto:
>> From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
>>
>> 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
>>
>> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
>> ---
>>  Makefile.target | 4 ++++
>>  1 file changed, 4 insertions(+)
>>
>> diff --git a/Makefile.target b/Makefile.target
>> index ba1234063eae..da8daa82c39e 100644
>> --- a/Makefile.target
>> +++ b/Makefile.target
>> @@ -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))
>

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 <aneesh.kumar@linux.vnet.ibm.com>
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
    
    Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>

diff --git a/Makefile.objs b/Makefile.objs
index 4a62913a4d25..5cd3d816ffb0 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -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
diff --git a/fsdev/Makefile.objs b/fsdev/Makefile.objs
index 206289c49f18..c27dad3f6dc7 100644
--- a/fsdev/Makefile.objs
+++ b/fsdev/Makefile.objs
@@ -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
diff --git a/hw/Makefile.objs b/hw/Makefile.objs
index 05a00dc40133..d178b65de4d0 100644
--- a/hw/Makefile.objs
+++ b/hw/Makefile.objs
@@ -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/

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] [PATCH] hw/9pfs: Include virtio-9p-device.o in build
  2014-03-03 20:32   ` Aneesh Kumar K.V
@ 2014-03-03 23:36     ` Serge E. Hallyn
  2014-03-05 18:48       ` Andreas Färber
  2014-03-03 23:45     ` Peter Maydell
  1 sibling, 1 reply; 11+ messages in thread
From: Serge E. Hallyn @ 2014-03-03 23:36 UTC (permalink / raw)
  To: Aneesh Kumar K.V; +Cc: Paolo Bonzini, Fam Zheng, qemu-devel

Quoting Aneesh Kumar K.V (aneesh.kumar@linux.vnet.ibm.com):
> Paolo Bonzini <pbonzini@redhat.com> writes:
> 
> > Il 03/03/2014 20:08, Aneesh Kumar K.V ha scritto:
> >> From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
> >>
> >> 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
> >>
> >> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
> >> ---
> >>  Makefile.target | 4 ++++
> >>  1 file changed, 4 insertions(+)
> >>
> >> diff --git a/Makefile.target b/Makefile.target
> >> index ba1234063eae..da8daa82c39e 100644
> >> --- a/Makefile.target
> >> +++ b/Makefile.target
> >> @@ -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))
> >
> 
> 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 <aneesh.kumar@linux.vnet.ibm.com>
> 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
>     
>     Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>

Thanks, Aneesh, this worked for me.

Tested-by: Serge Hallyn <serge.hallyn@ubuntu.com>

> 
> diff --git a/Makefile.objs b/Makefile.objs
> index 4a62913a4d25..5cd3d816ffb0 100644
> --- a/Makefile.objs
> +++ b/Makefile.objs
> @@ -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
> diff --git a/fsdev/Makefile.objs b/fsdev/Makefile.objs
> index 206289c49f18..c27dad3f6dc7 100644
> --- a/fsdev/Makefile.objs
> +++ b/fsdev/Makefile.objs
> @@ -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
> diff --git a/hw/Makefile.objs b/hw/Makefile.objs
> index 05a00dc40133..d178b65de4d0 100644
> --- a/hw/Makefile.objs
> +++ b/hw/Makefile.objs
> @@ -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/
> 

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] [PATCH] hw/9pfs: Include virtio-9p-device.o in build
  2014-03-03 20:32   ` Aneesh Kumar K.V
  2014-03-03 23:36     ` Serge E. Hallyn
@ 2014-03-03 23:45     ` Peter Maydell
  1 sibling, 0 replies; 11+ messages in thread
From: Peter Maydell @ 2014-03-03 23:45 UTC (permalink / raw)
  To: Aneesh Kumar K.V; +Cc: Paolo Bonzini, Fam Zheng, QEMU Developers

On 3 March 2014 20:32, Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> wrote:
> 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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] [PATCH] hw/9pfs: Include virtio-9p-device.o in build
  2014-03-03 19:13 ` Paolo Bonzini
  2014-03-03 19:42   ` Aneesh Kumar K.V
  2014-03-03 20:32   ` Aneesh Kumar K.V
@ 2014-03-05 15:50   ` Andreas Färber
  2014-03-05 18:19     ` Paolo Bonzini
  2 siblings, 1 reply; 11+ messages in thread
From: Andreas Färber @ 2014-03-05 15:50 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: Fam Zheng, Aneesh Kumar K.V, qemu-devel

Am 03.03.2014 20:13, schrieb Paolo Bonzini:
> Il 03/03/2014 20:08, Aneesh Kumar K.V ha scritto:
>> From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
>>
>> 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
>>
>> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
>> ---
>>  Makefile.target | 4 ++++
>>  1 file changed, 4 insertions(+)
>>
>> diff --git a/Makefile.target b/Makefile.target
>> index ba1234063eae..da8daa82c39e 100644
>> --- a/Makefile.target
>> +++ b/Makefile.target
>> @@ -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?

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

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] [PATCH] hw/9pfs: Include virtio-9p-device.o in build
  2014-03-05 15:50   ` Andreas Färber
@ 2014-03-05 18:19     ` Paolo Bonzini
  0 siblings, 0 replies; 11+ messages in thread
From: Paolo Bonzini @ 2014-03-05 18:19 UTC (permalink / raw)
  To: Andreas Färber; +Cc: Fam Zheng, Aneesh Kumar K.V, qemu-devel

Il 05/03/2014 16:50, Andreas Färber ha scritto:
> Am 03.03.2014 20:13, schrieb Paolo Bonzini:
>> Il 03/03/2014 20:08, Aneesh Kumar K.V ha scritto:
>>> From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
>>>
>>> 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
>>>
>>> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
>>> ---
>>>  Makefile.target | 4 ++++
>>>  1 file changed, 4 insertions(+)
>>>
>>> diff --git a/Makefile.target b/Makefile.target
>>> index ba1234063eae..da8daa82c39e 100644
>>> --- a/Makefile.target
>>> +++ b/Makefile.target
>>> @@ -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?
>
> 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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] [PATCH] hw/9pfs: Include virtio-9p-device.o in build
  2014-03-03 23:36     ` Serge E. Hallyn
@ 2014-03-05 18:48       ` Andreas Färber
  2014-03-06  5:31         ` Aneesh Kumar K.V
  0 siblings, 1 reply; 11+ messages in thread
From: Andreas Färber @ 2014-03-05 18:48 UTC (permalink / raw)
  To: Aneesh Kumar K.V
  Cc: Peter Maydell, Paolo Bonzini, Fam Zheng, qemu-devel,
	Serge E. Hallyn

Am 04.03.2014 00:36, schrieb Serge E. Hallyn:
> Quoting Aneesh Kumar K.V (aneesh.kumar@linux.vnet.ibm.com):
>> commit 01041f5df94ff19988cbadd7bd3eefcc9d964e4e
>> Author: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
>> 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
>>     
>>     Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
> 
> Thanks, Aneesh, this worked for me.
> 
> Tested-by: Serge Hallyn <serge.hallyn@ubuntu.com>

Tested-by: Andreas Färber <afaerber@suse.de>

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

> 
>>
>> diff --git a/Makefile.objs b/Makefile.objs
>> index 4a62913a4d25..5cd3d816ffb0 100644
>> --- a/Makefile.objs
>> +++ b/Makefile.objs
>> @@ -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
>> diff --git a/fsdev/Makefile.objs b/fsdev/Makefile.objs
>> index 206289c49f18..c27dad3f6dc7 100644
>> --- a/fsdev/Makefile.objs
>> +++ b/fsdev/Makefile.objs
>> @@ -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
>> diff --git a/hw/Makefile.objs b/hw/Makefile.objs
>> index 05a00dc40133..d178b65de4d0 100644
>> --- a/hw/Makefile.objs
>> +++ b/hw/Makefile.objs
>> @@ -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/

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] [PATCH] hw/9pfs: Include virtio-9p-device.o in build
  2014-03-05 18:48       ` Andreas Färber
@ 2014-03-06  5:31         ` Aneesh Kumar K.V
  0 siblings, 0 replies; 11+ messages in thread
From: Aneesh Kumar K.V @ 2014-03-06  5:31 UTC (permalink / raw)
  To: Andreas Färber
  Cc: Peter Maydell, Paolo Bonzini, Fam Zheng, qemu-devel,
	Serge E. Hallyn

Andreas Färber <afaerber@suse.de> writes:

> Am 04.03.2014 00:36, schrieb Serge E. Hallyn:
>> Quoting Aneesh Kumar K.V (aneesh.kumar@linux.vnet.ibm.com):
>>> commit 01041f5df94ff19988cbadd7bd3eefcc9d964e4e
>>> Author: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
>>> 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
>>>     
>>>     Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
>> 
>> Thanks, Aneesh, this worked for me.
>> 
>> Tested-by: Serge Hallyn <serge.hallyn@ubuntu.com>
>
> Tested-by: Andreas Färber <afaerber@suse.de>
>
> 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

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2014-03-06  5:32 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-03 19:08 [Qemu-devel] [PATCH] hw/9pfs: Include virtio-9p-device.o in build Aneesh Kumar K.V
2014-03-03 19:13 ` Paolo Bonzini
2014-03-03 19:42   ` Aneesh Kumar K.V
2014-03-03 20:02     ` Aneesh Kumar K.V
2014-03-03 20:32   ` Aneesh Kumar K.V
2014-03-03 23:36     ` Serge E. Hallyn
2014-03-05 18:48       ` Andreas Färber
2014-03-06  5:31         ` Aneesh Kumar K.V
2014-03-03 23:45     ` Peter Maydell
2014-03-05 15:50   ` Andreas Färber
2014-03-05 18:19     ` Paolo Bonzini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).