From: "Daniel P. Berrange" <berrange@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Yang Zhong <yang.zhong@intel.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:33:40 +0100 [thread overview]
Message-ID: <20170703103340.GF5663@redhat.com> (raw)
In-Reply-To: <68cbc479-3707-cdab-4dcd-d055b02ede7d@redhat.com>
On Mon, Jul 03, 2017 at 12:25:36PM +0200, Paolo Bonzini wrote:
>
>
> On 03/07/2017 12:20, Daniel P. Berrange wrote:
> >>
> >> +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.
>
> i386-softmmu and x86_64-softmmu are singled out here, because they're
> the only targets where --disable-tcg compiles. For the others, more
> work is needed (see patches 6-15 in Yang Zhong's series).
Even with that, you still can't disable TCG if building on a non-x86
host, since that'd leave you with no available CPU at all. So the
code still needs refactoring to check architectures properly.
> The part that is missing in this patch is disabling non-hypervisor
> targets when --disable-tcg is specified. My original patch built only
> i386-softmmu and x86_64-softmmu if you specified --disable-tcg, see
>
> https://lists.nongnu.org/archive/html/qemu-devel/2012-09/msg02570.html
> https://lists.nongnu.org/archive/html/qemu-devel/2012-09/msg02571.html
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 :|
next prev parent reply other threads:[~2017-07-03 10:33 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
2017-07-03 10:25 ` Paolo Bonzini
2017-07-03 10:33 ` Daniel P. Berrange [this message]
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=20170703103340.GF5663@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 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).