All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrange" <berrange@redhat.com>
To: Yang Zhong <yang.zhong@intel.com>
Cc: pbonzini@redhat.com, rth@twiddle.net, thuth@redhat.com,
	anthony.xu@intel.com, qemu-devel@nongnu.org,
	a.rigo@virtualopensystems.com
Subject: Re: [Qemu-devel] [PATCH v2 01/15] configure: add the disable-tcg option
Date: Mon, 3 Jul 2017 11:20:43 +0100	[thread overview]
Message-ID: <20170703102043.GE5663@redhat.com> (raw)
In-Reply-To: <1499076743-15477-2-git-send-email-yang.zhong@intel.com>

On Mon, Jul 03, 2017 at 06:12:09PM +0800, Yang Zhong wrote:
> Add the disable-tcg option into configure and echo CONFIG_TCG=y into
> $config_target_mak. The default tcg is enabled for all build, only i386
> and x86_64 softmmu option can be disabled. This operation do not make
> big change with the older build command.
> 
> The new configure build command like below
> (1)./configure
>    tcg is defaultly enabled
> 
> (2)./configure --disable-tcg --target-list=x86_64-softmmu
>    tcg is disabled in x86_64-softmmu
> 
> (3)./configure --disable-tcg --target-list=i386-softmmu
>    tcg is disabled in i386-softmmu
> 
> If the --target-list include other softmmus or user options, the configure
> command will report error and configure is aborted.
> The error as:
> ERROR: The current aarch64-softmmu can't support disable-tcg,
>     only i386-softmmu|x86_64-softmmu support disable-tcg
> or
> ERROR: The user build can't support disable-tcg,
>     only i386-softmmu|x86_64-softmmu support disable-tcg
> 
> Signed-off-by: Yang Zhong <yang.zhong@intel.com>
> ---
>  configure | 43 ++++++++++++++++++++++++++++++++++++++++++-
>  1 file changed, 42 insertions(+), 1 deletion(-)
> 
> diff --git a/configure b/configure
> index c571ad1..61ce514 100755
> --- a/configure
> +++ b/configure
> @@ -224,6 +224,7 @@ cap_ng=""
>  attr=""
>  libattr=""
>  xfs=""
> +tcg="yes"
>  
>  vhost_net="no"
>  vhost_scsi="no"
> @@ -953,6 +954,10 @@ for opt do
>    ;;
>    --enable-hax) hax="yes"
>    ;;
> +  --disable-tcg) tcg="no"
> +  ;;
> +  --enable-tcg) tcg="yes"
> +  ;;
>    --disable-tcg-interpreter) tcg_interpreter="no"
>    ;;
>    --enable-tcg-interpreter) tcg_interpreter="yes"
> @@ -1715,6 +1720,24 @@ case " $target_list " in
>    ;;
>  esac
>  
> +if test "$tcg" = "no"; then
> +   for target in $target_list; do
> +      if test "$softmmu" = "yes"; then
> +        case $target in
> +           i386-softmmu|x86_64-softmmu)
> +           ;;
> +        *)
> +           error_exit "The current $target can't support disable-tcg,"\
> +              "only i386-softmmu|x86_64-softmmu support disable-tcg"
> +           ;;

This looks too simplistic in its logic.

You can disable TCG, if-and-only-if the system emulator supports KVM.

KVM is supported on many architectures, not only x86-64 & i386.

KVM is only supported if the guest emulator architecture matches the
host build target architecture.

ie if you are building an x86_64 system emulator on a PPC64 host,
then you can't disable TCG.

So this needs rewriting to *not* special case x86_64 / i386. Instead
you need to compare & match build target / system emulator architectures,
across all architectures supporting KVM.

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

  reply	other threads:[~2017-07-03 10:21 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-03 10:12 [Qemu-devel] [PATCH v2 00/15] add disable-tcg option for x86 build Yang Zhong
2017-07-03 10:12 ` [Qemu-devel] [PATCH v2 01/15] configure: add the disable-tcg option Yang Zhong
2017-07-03 10:20   ` Daniel P. Berrange [this message]
2017-07-03 10:25     ` Paolo Bonzini
2017-07-03 10:33       ` Daniel P. Berrange
2017-07-03 10:55         ` Paolo Bonzini
2017-07-03 11:40           ` Thomas Huth
2017-07-03 12:09           ` Daniel P. Berrange
2017-07-03 12:55             ` Paolo Bonzini
2017-07-03 10:12 ` [Qemu-devel] [PATCH v2 02/15] vl: add tcg_enabled() for tcg related code Yang Zhong
2017-07-03 12:30   ` Thomas Huth
2017-07-03 10:12 ` [Qemu-devel] [PATCH v2 03/15] tcg: tcg_handle_interrupt() function Yang Zhong
2017-07-03 12:35   ` Thomas Huth
2017-07-03 10:12 ` [Qemu-devel] [PATCH v2 04/15] tcg: change tcg_enabled() Yang Zhong
2017-07-03 10:12 ` [Qemu-devel] [PATCH v2 05/15] tcg: move page_size_init() function Yang Zhong
2017-07-03 10:12 ` [Qemu-devel] [PATCH v2 06/15] kvmvapic: remove tcg related code Yang Zhong
2017-07-03 14:28   ` Paolo Bonzini
2017-07-04  2:46     ` Zhong Yang
2017-07-03 10:12 ` [Qemu-devel] [PATCH v2 07/15] tcg: move cpu_sync_bndcs_hflags() function Yang Zhong
2017-07-03 10:12 ` [Qemu-devel] [PATCH v2 08/15] tcg: make cpu_get_fp80()/cpu_set_fp80() static Yang Zhong
2017-07-03 10:12 ` [Qemu-devel] [PATCH v2 09/15] tcg: add the tcg-stub.c file into accel/stubs/ Yang Zhong
2017-07-03 10:12 ` [Qemu-devel] [PATCH v2 10/15] tcg: move tb related lock functions Yang Zhong
2017-07-03 10:12 ` [Qemu-devel] [PATCH v2 11/15] tcg: split cpu_set_mxcsr() and make cpu_set_fpuc() inline Yang Zhong
2017-07-03 10:12 ` [Qemu-devel] [PATCH v2 12/15] tcg: disable tcg in CPUX86State struct Yang Zhong
2017-07-03 10:12 ` [Qemu-devel] [PATCH v2 13/15] tcg: add the CONFIG_TCG for header Yang Zhong
2017-07-03 10:12 ` [Qemu-devel] [PATCH v2 14/15] tcg: add the tcg_enabled() in target/i386/ Yang Zhong
2017-07-03 10:12 ` [Qemu-devel] [PATCH v2 15/15] tcg: add the CONFIG_TCG into Makefiles Yang Zhong

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=20170703102043.GE5663@redhat.com \
    --to=berrange@redhat.com \
    --cc=a.rigo@virtualopensystems.com \
    --cc=anthony.xu@intel.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    --cc=thuth@redhat.com \
    --cc=yang.zhong@intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.