qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "M. Mohan Kumar" <mohan@in.ibm.com>
To: Peter Maydell <peter.maydell@linaro.org>,
	Michael Tokarev <mjt@tls.msk.ru>
Cc: qemu-trivial@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH trivial] configure: explicitly disable virtfs if softmmu=no
Date: Tue, 11 Jun 2013 22:53:02 +0530	[thread overview]
Message-ID: <87ehc8tvd5.fsf@gmail.com> (raw)
In-Reply-To: <CAFEAcA8g7Ck_vdAraiEsKdYBi=VM8PRTCrA9UnA6GAa+JgXUoQ@mail.gmail.com>

Peter Maydell <peter.maydell@linaro.org> writes:

How about this approach?

[PATCH] configure: Disable virtfs if softmmu not enabled

Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com>
---
 configure | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index 1654413..88c2b0f 100755
--- a/configure
+++ b/configure
@@ -3404,8 +3404,9 @@ if test "$want_tools" = "yes" ; then
     tools="qemu-nbd\$(EXESUF) $tools"
   fi
 fi
-if test "$softmmu" = yes ; then
-  if test "$virtfs" != no ; then
+
+if test "$virtfs" != no ; then
+  if test "$softmmu" = yes ; then
     if test "$cap" = yes && test "$linux" = yes && test "$attr" = yes ; then
       virtfs=yes
       tools="$tools fsdev/virtfs-proxy-helper\$(EXESUF)"
@@ -3415,6 +3416,12 @@ if test "$softmmu" = yes ; then
       fi
       virtfs=no
     fi
+  else
+    if test "$virtfs" = yes; then
+      error_exit "VirtFS is supported only on Linux and requires softmmu"
+    else
+     virtfs=no
+    fi
   fi
   if [ "$linux" = "yes" -o "$bsd" = "yes" -o "$solaris" = "yes" ] ; then
     if [ "$guest_agent" = "yes" ]; then
-- 
1.7.11.7

Tested with following configure options

$ ./configure '--target-list=x86_64-linux-user' --disable-system
[snip]
VirtFS support    no

$ ./configure '--target-list=x86_64-linux-user' --disable-system --enable-virtfs

ERROR: VirtFS is supported only on Linux and requires softmmu

$ ./configure '--target-list=x86_64-softmmu' --enable-virtfs
[snip]
VirtFS support    yes

$ ./configure '--target-list=x86_64-softmmu'
VirtFS support    yes



> On 11 June 2013 13:29, Michael Tokarev <mjt@tls.msk.ru> wrote:
>> 11.06.2013 01:45, Peter Maydell wrote:
>>> This doesn't feel to me like it's quite the right way
>>> to fix this bug. The current code in configure seems
>>> to tangle up (a) was virtfs requested and can we do it?
>>> with (b) what do we need to do if it was? (build some
>>> extra tools) and (c) when does it make sense? not for
>>> linux-user targets. So you end up with an 'else virtfs=no'
>>> clause added in an odd place. If the mess was untangled
>>> then this probably wouldn't be necessary.
>>
>> Um. I don't think that tangling is a bad thing really.
>> Having different variables or options for it will be
>> too bloated, in my opinion.  I don't think there should
>> be anything done with it.
>
> I don't want more variables. I just don't think we
> should have "if not softmmu then do some other thing";
> just check for whether the user asked for virtfs and
> we can do it, and if so set virtfs=yes.
>
>> How about something like this:
>>
>> --- a/configure
>> +++ b/configure
>> @@ -3810,7 +3810,7 @@ fi
>>  if test "$libattr" = "yes" ; then
>>    echo "CONFIG_LIBATTR=y" >> $config_host_mak
>>  fi
>> -if test "$virtfs" = "yes" ; then
>> +if test "$virtfs" = "yes" && test "$target_softmmu" = "yes" ; then
>>    echo "CONFIG_VIRTFS=y" >> $config_host_mak
>>  fi
>
> This seems like a step backwards to me. virtfs=yes should
> just translate straight to CONFIG_VIRTFS and the makefile
> should just not care if it's set if we happen not to be
> building anything virtfs related.
>
>>> Also, disabling building tools and docs in general seems
>>> broken: --disable-tools disables building qemu-img, for
>>> instance, but not its documentation. So maybe we should
>>> fix this by generally making sure we don't build the docs
>>> unless we build the tool as well.
>>
>> This has been addressed by a separate patch sent by afaerber.
>
> That patch didn't touch anything virtfs proxy related.
>
> thanks
> -- PMM

  reply	other threads:[~2013-06-11 17:23 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-10 20:47 [Qemu-devel] [PATCH trivial] configure: explicitly disable virtfs if softmmu=no Michael Tokarev
2013-06-10 20:57 ` Michael Tokarev
2013-06-11  9:22   ` M. Mohan Kumar
2013-06-11  9:24     ` Peter Maydell
2013-06-11  9:47     ` Michael Tokarev
2013-06-10 21:45 ` Peter Maydell
2013-06-11 12:29   ` Michael Tokarev
2013-06-11 15:01     ` Peter Maydell
2013-06-11 17:23       ` M. Mohan Kumar [this message]
2013-06-11 18:19         ` Michael Tokarev
2013-06-11 19:21           ` Peter Maydell
2013-06-11 19:55             ` Michael Tokarev
2013-06-12  5:26           ` M. Mohan Kumar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ehc8tvd5.fsf@gmail.com \
    --to=mohan@in.ibm.com \
    --cc=mjt@tls.msk.ru \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).