All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2 00/15] add disable-tcg option for x86 build
@ 2017-07-03 10:12 Yang Zhong
  2017-07-03 10:12 ` [Qemu-devel] [PATCH v2 01/15] configure: add the disable-tcg option Yang Zhong
                   ` (14 more replies)
  0 siblings, 15 replies; 27+ messages in thread
From: Yang Zhong @ 2017-07-03 10:12 UTC (permalink / raw)
  To: pbonzini, rth, thuth; +Cc: qemu-devel, anthony.xu, a.rigo, yang.zhong

This patchset rebased from Paolo's below patchset, which was based on
QEMU 2.0.50 version.
https://github.com/bonzini/qemu/tree/disable-tcg

Since qemu-system-x86_64 enabled kvm and TCG accelators by default, in
fact, the TCG accelator is NOT useful in the system build of x86 platform.
This patchset will disable TCG for x86 platform if --disable-tcg option is
added into ./configure 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

How to verify disable-tcg option
(1)./configure
   a)all user and softmmu build are okay.
   b) CONFIG_TCG=y is set in $config_target_mak in all user and softmmu directory
   c)kvm starting vm is okay
     ./qemu-system-x86_64 -enable-kvm -cpu host -m 2G -smp cpus=4,cores=4,threads=1,\
       sockets=1 -drive format=raw,file=eywa.img,index=0,media=disk -nographic -serial \
       stdio -nodefaults
   d)tcg starting vm is okay
     ./qemu-system-x86_64 -m 2G -smp cpus=4,cores=4,threads=1,sockets=1 -drive format=raw,\
        file=eywa.img,index=0,media=disk -nographic -serial stdio -nodefaults

(2)./configure --disable-tcg --target-list=x86_64-softmmu
   a) softmmu build is okay.
   b) CONFIG_TCG=y is not set in $config_target_mak in x86_64-softmmu directory
   c) kvm starting vm is okay
     ./qemu-system-x86_64 -enable-kvm -cpu host -m 2G -smp cpus=4,cores=4,threads=1,\
       sockets=1 -drive format=raw,file=eywa.img,index=0,media=disk -nographic -serial \
       stdio -nodefaults
   d) tcg starting vm is aborted
      The log as below:
      "tcg" accelerator not found.
      No accelerator found!

(3)./configure --target-list=x86_64-softmmu,x86_64-linux-user
   ERROR: The current x86_64-linux-user can't support disable-tcg,
       only i386-softmmu|x86_64-softmmu support disable-tcg

(4)./configure --disable-tcg --target-list=arm-softmmu
   ERROR: The current arm-softmmu can't support disable-tcg,
       only i386-softmmu|x86_64-softmmu support disable-tcg

v2:
* updated patch 01 reviewed by Richard Henderson,Thomas Huth and Paolo.
  "echo "CONFIG_TCG" >> $config_target_mak" is more clean.
  add the error configure check for --disable-tcg.
  new patch is easy to extend to other platform.
* updated patch 02 reviewed by Paolo.
  remove CONFIG_TCG.
  add tcg_enabled() for tcg code.
* updated patch 03 reviewed by Paolo.
  move tcg_handle_interrupt() from translate-common.c to tcg-all.c.
* updated patch 09 reviewed by Paolo and Richard Henderson.
  moved the x86 related function out of stubs file.
  added patch 14 for x86 related tcg functions.
* updated the flush_icache_range() reviewed by Paolo.
  deleted this patch and the compile is still okay. So there will not this 
  patch in future release. 
* updated patch 12 reviewed by Richard Henderson.
  removed the CONFIG_TCG in CPUX86State struct. cpu-defs.h has disabled 
  CPU_COMMON_TLB if tcg is disabled.


Yang Zhong (15):
  configure: add the disable-tcg option
  vl: add tcg_enabled() for tcg related code
  tcg: tcg_handle_interrupt() function
  tcg: change tcg_enabled()
  tcg: move page_size_init() function
  kvmvapic: remove tcg related code
  tcg: move cpu_sync_bndcs_hflags() function
  tcg: make cpu_get_fp80()/cpu_set_fp80() static
  tcg: add the tcg-stub.c file into accel/stubs/
  tcg: move tb related lock functions
  tcg: split cpu_set_mxcsr() and make cpu_set_fpuc() inline
  tcg: disable tcg in CPUX86State struct
  tcg: add the CONFIG_TCG for header
  tcg: add the tcg_enabled() in target/i386/
  tcg: add the CONFIG_TCG into Makefiles

 Makefile.target              |  4 +-
 accel/Makefile.objs          |  2 +-
 accel/stubs/Makefile.objs    |  1 +
 accel/stubs/tcg-stub.c       | 94 ++++++++++++++++++++++++++++++++++++++++++++
 accel/tcg/Makefile.objs      |  2 +-
 accel/tcg/cpu-exec.c         |  1 +
 accel/tcg/cputlb.c           |  1 +
 accel/tcg/tcg-all.c          | 36 ++++++++++++++++-
 accel/tcg/translate-all.c    | 24 +----------
 accel/tcg/translate-all.h    |  3 ++
 accel/tcg/translate-common.c | 56 --------------------------
 bsd-user/main.c              |  1 +
 configure                    | 43 +++++++++++++++++++-
 exec.c                       | 20 ++++++++++
 hw/i386/kvmvapic.c           | 24 -----------
 include/exec/cpu-defs.h      |  4 +-
 include/exec/cputlb.h        |  2 +-
 include/exec/exec-all.h      | 53 +++++++++++++------------
 include/exec/helper-proto.h  |  2 +
 include/qemu-common.h        |  7 +++-
 include/sysemu/accel.h       |  2 +-
 linux-user/main.c            |  2 +-
 qom/cpu.c                    |  2 +
 target/i386/Makefile.objs    |  7 ++--
 target/i386/bpt_helper.c     | 26 +++++++++---
 target/i386/cpu.c            |  4 +-
 target/i386/cpu.h            | 22 +++++++++--
 target/i386/fpu_helper.c     | 29 +-------------
 target/i386/helper.c         | 34 +++++++++++++++-
 target/i386/machine.c        | 23 ++++++++++-
 target/i386/mpx_helper.c     | 30 --------------
 tcg/tcg.h                    |  4 --
 trace/control-target.c       |  1 -
 vl.c                         | 15 +++++--
 34 files changed, 358 insertions(+), 223 deletions(-)
 create mode 100644 accel/stubs/tcg-stub.c
 delete mode 100644 accel/tcg/translate-common.c

-- 
1.9.1

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

* [Qemu-devel] [PATCH v2 01/15] configure: add the disable-tcg option
  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 ` Yang Zhong
  2017-07-03 10:20   ` Daniel P. Berrange
  2017-07-03 10:12 ` [Qemu-devel] [PATCH v2 02/15] vl: add tcg_enabled() for tcg related code Yang Zhong
                   ` (13 subsequent siblings)
  14 siblings, 1 reply; 27+ messages in thread
From: Yang Zhong @ 2017-07-03 10:12 UTC (permalink / raw)
  To: pbonzini, rth, thuth; +Cc: qemu-devel, anthony.xu, a.rigo, yang.zhong

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"
+           ;;
+        esac
+     else
+        error_exit "The user build can't support disable-tcg,"\
+           "only i386-softmmu|x86_64-softmmu support disable-tcg"
+     fi
+   done
+fi
+
 feature_not_found() {
   feature=$1
   remedy=$2
@@ -5119,7 +5142,6 @@ echo "module support    $modules"
 echo "host CPU          $cpu"
 echo "host big endian   $bigendian"
 echo "target list       $target_list"
-echo "tcg debug enabled $debug_tcg"
 echo "gprof enabled     $gprof"
 echo "sparse enabled    $sparse"
 echo "strip binaries    $strip_opt"
@@ -5173,6 +5195,11 @@ echo "Linux AIO support $linux_aio"
 echo "ATTR/XATTR support $attr"
 echo "Install blobs     $blobs"
 echo "KVM support       $kvm"
+echo "TCG support       $tcg"
+if test "$tcg" = "yes" ; then
+    echo "TCG debug enabled $debug_tcg"
+    echo "TCG interpreter   $tcg_interpreter"
+fi
 echo "HAX support       $hax"
 echo "RDMA support      $rdma"
 echo "TCG interpreter   $tcg_interpreter"
@@ -6231,6 +6258,7 @@ fi
 if test "$target_user_only" = "yes" ; then
   echo "CONFIG_USER_ONLY=y" >> $config_target_mak
   echo "CONFIG_QEMU_INTERP_PREFIX=\"$interp_prefix1\"" >> $config_target_mak
+  echo "CONFIG_TCG=y" >> $config_target_mak
 fi
 if test "$target_linux_user" = "yes" ; then
   echo "CONFIG_LINUX_USER=y" >> $config_target_mak
@@ -6250,6 +6278,19 @@ if test "$target_bsd_user" = "yes" ; then
   echo "CONFIG_BSD_USER=y" >> $config_target_mak
 fi
 
+if test "$target_softmmu" = "yes" ; then
+   case "$target_name" in
+     i386|x86_64)
+       if test "$tcg" = "yes" ; then
+         echo "CONFIG_TCG=y" >> $config_target_mak
+       fi
+       ;;
+     *)
+       echo "CONFIG_TCG=y" >> $config_target_mak
+       ;;
+   esac
+fi
+
 # generate QEMU_CFLAGS/LDFLAGS for targets
 
 cflags=""
-- 
1.9.1

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

* [Qemu-devel] [PATCH v2 02/15] vl: add tcg_enabled() for tcg related code
  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:12 ` 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
                   ` (12 subsequent siblings)
  14 siblings, 1 reply; 27+ messages in thread
From: Yang Zhong @ 2017-07-03 10:12 UTC (permalink / raw)
  To: pbonzini, rth, thuth; +Cc: qemu-devel, anthony.xu, a.rigo, yang.zhong

Need to disable the tcg related code in the vl.c if the
disable-tcg option is added into ./configure command.

Signed-off-by: Yang Zhong <yang.zhong@intel.com>
---
 accel/tcg/tcg-all.c    |  2 +-
 include/sysemu/accel.h |  2 +-
 vl.c                   | 15 +++++++++++----
 3 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/accel/tcg/tcg-all.c b/accel/tcg/tcg-all.c
index dba9931..b86c896 100644
--- a/accel/tcg/tcg-all.c
+++ b/accel/tcg/tcg-all.c
@@ -28,7 +28,7 @@
 #include "sysemu/sysemu.h"
 #include "qom/object.h"
 
-int tcg_tb_size;
+long tcg_tb_size;
 static bool tcg_allowed = true;
 
 static int tcg_init(MachineState *ms)
diff --git a/include/sysemu/accel.h b/include/sysemu/accel.h
index ecc5c84..7b905b7 100644
--- a/include/sysemu/accel.h
+++ b/include/sysemu/accel.h
@@ -63,7 +63,7 @@ typedef struct AccelClass {
 #define ACCEL_GET_CLASS(obj) \
     OBJECT_GET_CLASS(AccelClass, (obj), TYPE_ACCEL)
 
-extern int tcg_tb_size;
+extern long tcg_tb_size;
 
 void configure_accelerator(MachineState *ms);
 /* Register accelerator specific global properties */
diff --git a/vl.c b/vl.c
index 36ff3f4..f28c1ac 100644
--- a/vl.c
+++ b/vl.c
@@ -3933,9 +3933,14 @@ int main(int argc, char **argv, char **envp)
                 configure_rtc(opts);
                 break;
             case QEMU_OPTION_tb_size:
-                tcg_tb_size = strtol(optarg, NULL, 0);
-                if (tcg_tb_size < 0) {
-                    tcg_tb_size = 0;
+                if (tcg_enabled()) {
+                    qemu_strtol(optarg, NULL, 0, &tcg_tb_size);
+                    if (tcg_tb_size < 0) {
+                        tcg_tb_size = 0;
+                    }
+                } else {
+                    error_report("TCG is disabled");
+                    exit(1);
                 }
                 break;
             case QEMU_OPTION_icount:
@@ -4481,7 +4486,9 @@ int main(int argc, char **argv, char **envp)
         qemu_opts_del(icount_opts);
     }
 
-    qemu_tcg_configure(accel_opts, &error_fatal);
+    if (tcg_enabled()) {
+        qemu_tcg_configure(accel_opts, &error_fatal);
+    }
 
     if (default_net) {
         QemuOptsList *net = qemu_find_opts("net");
-- 
1.9.1

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

* [Qemu-devel] [PATCH v2 03/15] tcg: tcg_handle_interrupt() function
  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:12 ` [Qemu-devel] [PATCH v2 02/15] vl: add tcg_enabled() for tcg related code Yang Zhong
@ 2017-07-03 10:12 ` 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
                   ` (11 subsequent siblings)
  14 siblings, 1 reply; 27+ messages in thread
From: Yang Zhong @ 2017-07-03 10:12 UTC (permalink / raw)
  To: pbonzini, rth, thuth; +Cc: qemu-devel, anthony.xu, a.rigo, yang.zhong

Move tcg_handle_interrupt() from translate-common.c to
accel/tcg/tcg-all.c.

Signed-off-by: Yang Zhong <yang.zhong@intel.com>
---
 accel/tcg/Makefile.objs      |  2 +-
 accel/tcg/tcg-all.c          | 32 +++++++++++++++++++++++++
 accel/tcg/translate-common.c | 56 --------------------------------------------
 qom/cpu.c                    |  2 ++
 4 files changed, 35 insertions(+), 57 deletions(-)
 delete mode 100644 accel/tcg/translate-common.c

diff --git a/accel/tcg/Makefile.objs b/accel/tcg/Makefile.objs
index f173cd5..70cd474 100644
--- a/accel/tcg/Makefile.objs
+++ b/accel/tcg/Makefile.objs
@@ -1,3 +1,3 @@
 obj-$(CONFIG_SOFTMMU) += tcg-all.o
 obj-$(CONFIG_SOFTMMU) += cputlb.o
-obj-y += cpu-exec.o cpu-exec-common.o translate-all.o translate-common.o
+obj-y += cpu-exec.o cpu-exec-common.o translate-all.o
diff --git a/accel/tcg/tcg-all.c b/accel/tcg/tcg-all.c
index b86c896..1b13bc9 100644
--- a/accel/tcg/tcg-all.c
+++ b/accel/tcg/tcg-all.c
@@ -27,13 +27,45 @@
 #include "sysemu/accel.h"
 #include "sysemu/sysemu.h"
 #include "qom/object.h"
+#include "qemu-common.h"
+#include "qom/cpu.h"
+#include "sysemu/cpus.h"
+#include "qemu/main-loop.h"
 
 long tcg_tb_size;
 static bool tcg_allowed = true;
 
+#ifndef CONFIG_USER_ONLY
+/* mask must never be zero, except for A20 change call */
+static void tcg_handle_interrupt(CPUState *cpu, int mask)
+{
+    int old_mask;
+    g_assert(qemu_mutex_iothread_locked());
+
+    old_mask = cpu->interrupt_request;
+    cpu->interrupt_request |= mask;
+
+    /*
+     * If called from iothread context, wake the target cpu in
+     * case its halted.
+     */
+    if (!qemu_cpu_is_self(cpu)) {
+        qemu_cpu_kick(cpu);
+    } else {
+        cpu->icount_decr.u16.high = -1;
+        if (use_icount &&
+            !cpu->can_do_io
+            && (mask & ~old_mask) != 0) {
+            cpu_abort(cpu, "Raised interrupt while not in I/O function");
+        }
+    }
+}
+#endif
+
 static int tcg_init(MachineState *ms)
 {
     tcg_exec_init(tcg_tb_size * 1024 * 1024);
+    cpu_interrupt_handler = tcg_handle_interrupt;
     return 0;
 }
 
diff --git a/accel/tcg/translate-common.c b/accel/tcg/translate-common.c
deleted file mode 100644
index 40fe5a1..0000000
--- a/accel/tcg/translate-common.c
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- *  Host code generation common components
- *
- *  Copyright (c) 2015 Peter Crosthwaite <crosthwaite.peter@gmail.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "qemu/osdep.h"
-#include "qemu-common.h"
-#include "qom/cpu.h"
-#include "sysemu/cpus.h"
-#include "qemu/main-loop.h"
-
-uintptr_t qemu_real_host_page_size;
-intptr_t qemu_real_host_page_mask;
-
-#ifndef CONFIG_USER_ONLY
-/* mask must never be zero, except for A20 change call */
-static void tcg_handle_interrupt(CPUState *cpu, int mask)
-{
-    int old_mask;
-    g_assert(qemu_mutex_iothread_locked());
-
-    old_mask = cpu->interrupt_request;
-    cpu->interrupt_request |= mask;
-
-    /*
-     * If called from iothread context, wake the target cpu in
-     * case its halted.
-     */
-    if (!qemu_cpu_is_self(cpu)) {
-        qemu_cpu_kick(cpu);
-    } else {
-        cpu->icount_decr.u16.high = -1;
-        if (use_icount &&
-            !cpu->can_do_io
-            && (mask & ~old_mask) != 0) {
-            cpu_abort(cpu, "Raised interrupt while not in I/O function");
-        }
-    }
-}
-
-CPUInterruptHandler cpu_interrupt_handler = tcg_handle_interrupt;
-#endif
diff --git a/qom/cpu.c b/qom/cpu.c
index 5069876..583d864 100644
--- a/qom/cpu.c
+++ b/qom/cpu.c
@@ -31,6 +31,8 @@
 #include "hw/qdev-properties.h"
 #include "trace-root.h"
 
+CPUInterruptHandler cpu_interrupt_handler;
+
 bool cpu_exists(int64_t id)
 {
     CPUState *cpu;
-- 
1.9.1

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

* [Qemu-devel] [PATCH v2 04/15] tcg: change tcg_enabled()
  2017-07-03 10:12 [Qemu-devel] [PATCH v2 00/15] add disable-tcg option for x86 build Yang Zhong
                   ` (2 preceding siblings ...)
  2017-07-03 10:12 ` [Qemu-devel] [PATCH v2 03/15] tcg: tcg_handle_interrupt() function Yang Zhong
@ 2017-07-03 10:12 ` Yang Zhong
  2017-07-03 10:12 ` [Qemu-devel] [PATCH v2 05/15] tcg: move page_size_init() function Yang Zhong
                   ` (10 subsequent siblings)
  14 siblings, 0 replies; 27+ messages in thread
From: Yang Zhong @ 2017-07-03 10:12 UTC (permalink / raw)
  To: pbonzini, rth, thuth; +Cc: qemu-devel, anthony.xu, a.rigo, yang.zhong

Change the tcg_enabled() and make sure user build still enable tcg
even x86 softmmu disable tcg.

Signed-off-by: Yang Zhong <yang.zhong@intel.com>
---
 accel/tcg/tcg-all.c       | 2 +-
 accel/tcg/translate-all.c | 6 +-----
 bsd-user/main.c           | 1 +
 include/qemu-common.h     | 7 ++++++-
 linux-user/main.c         | 2 +-
 5 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/accel/tcg/tcg-all.c b/accel/tcg/tcg-all.c
index 1b13bc9..979b68a 100644
--- a/accel/tcg/tcg-all.c
+++ b/accel/tcg/tcg-all.c
@@ -33,7 +33,7 @@
 #include "qemu/main-loop.h"
 
 long tcg_tb_size;
-static bool tcg_allowed = true;
+bool tcg_allowed;
 
 #ifndef CONFIG_USER_ONLY
 /* mask must never be zero, except for A20 change call */
diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c
index f6ad46b..bc75294 100644
--- a/accel/tcg/translate-all.c
+++ b/accel/tcg/translate-all.c
@@ -802,6 +802,7 @@ static void tb_htable_init(void)
    size. */
 void tcg_exec_init(unsigned long tb_size)
 {
+    tcg_allowed = true;
     cpu_gen_init();
     page_init();
     tb_htable_init();
@@ -813,11 +814,6 @@ void tcg_exec_init(unsigned long tb_size)
 #endif
 }
 
-bool tcg_enabled(void)
-{
-    return tcg_ctx.code_gen_buffer != NULL;
-}
-
 /*
  * Allocate a new translation block. Flush the translation buffer if
  * too many translation blocks or too much generated code.
diff --git a/bsd-user/main.c b/bsd-user/main.c
index 04f95dd..276aea7 100644
--- a/bsd-user/main.c
+++ b/bsd-user/main.c
@@ -35,6 +35,7 @@
 #include "trace/control.h"
 #include "glib-compat.h"
 
+bool tcg_allowed = true;
 int singlestep;
 unsigned long mmap_min_addr;
 unsigned long guest_base;
diff --git a/include/qemu-common.h b/include/qemu-common.h
index 387ef52..b5adbfa 100644
--- a/include/qemu-common.h
+++ b/include/qemu-common.h
@@ -76,8 +76,13 @@ int qemu_openpty_raw(int *aslave, char *pty_name);
     sendto(sockfd, buf, len, flags, destaddr, addrlen)
 #endif
 
+extern bool tcg_allowed;
 void tcg_exec_init(unsigned long tb_size);
-bool tcg_enabled(void);
+#ifdef CONFIG_TCG
+#define tcg_enabled() (tcg_allowed)
+#else
+#define tcg_enabled() 0
+#endif
 
 void cpu_exec_init_all(void);
 void cpu_exec_step_atomic(CPUState *cpu);
diff --git a/linux-user/main.c b/linux-user/main.c
index ad03c9e..a11508a 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -38,7 +38,7 @@
 #include "glib-compat.h"
 
 char *exec_path;
-
+bool tcg_allowed = true;
 int singlestep;
 static const char *filename;
 static const char *argv0;
-- 
1.9.1

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

* [Qemu-devel] [PATCH v2 05/15] tcg: move page_size_init() function
  2017-07-03 10:12 [Qemu-devel] [PATCH v2 00/15] add disable-tcg option for x86 build Yang Zhong
                   ` (3 preceding siblings ...)
  2017-07-03 10:12 ` [Qemu-devel] [PATCH v2 04/15] tcg: change tcg_enabled() Yang Zhong
@ 2017-07-03 10:12 ` Yang Zhong
  2017-07-03 10:12 ` [Qemu-devel] [PATCH v2 06/15] kvmvapic: remove tcg related code Yang Zhong
                   ` (9 subsequent siblings)
  14 siblings, 0 replies; 27+ messages in thread
From: Yang Zhong @ 2017-07-03 10:12 UTC (permalink / raw)
  To: pbonzini, rth, thuth; +Cc: qemu-devel, anthony.xu, a.rigo, yang.zhong

translate-all.c will be disabled if tcg is disabled in the build,
so page_size_init() function and related variables will be moved
to exec.c file.

Signed-off-by: Yang Zhong <yang.zhong@intel.com>
---
 accel/tcg/translate-all.c | 18 ------------------
 exec.c                    | 20 ++++++++++++++++++++
 2 files changed, 20 insertions(+), 18 deletions(-)

diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c
index bc75294..188f5df 100644
--- a/accel/tcg/translate-all.c
+++ b/accel/tcg/translate-all.c
@@ -112,9 +112,6 @@ typedef struct PageDesc {
 #define V_L2_BITS 10
 #define V_L2_SIZE (1 << V_L2_BITS)
 
-uintptr_t qemu_host_page_size;
-intptr_t qemu_host_page_mask;
-
 /*
  * L1 Mapping properties
  */
@@ -363,21 +360,6 @@ bool cpu_restore_state(CPUState *cpu, uintptr_t retaddr)
     return r;
 }
 
-void page_size_init(void)
-{
-    /* NOTE: we can always suppose that qemu_host_page_size >=
-       TARGET_PAGE_SIZE */
-    qemu_real_host_page_size = getpagesize();
-    qemu_real_host_page_mask = -(intptr_t)qemu_real_host_page_size;
-    if (qemu_host_page_size == 0) {
-        qemu_host_page_size = qemu_real_host_page_size;
-    }
-    if (qemu_host_page_size < TARGET_PAGE_SIZE) {
-        qemu_host_page_size = TARGET_PAGE_SIZE;
-    }
-    qemu_host_page_mask = -(intptr_t)qemu_host_page_size;
-}
-
 static void page_init(void)
 {
     page_size_init();
diff --git a/exec.c b/exec.c
index 42ad1ea..ee61915 100644
--- a/exec.c
+++ b/exec.c
@@ -118,6 +118,11 @@ __thread CPUState *current_cpu;
    2 = Adaptive rate instruction counting.  */
 int use_icount;
 
+uintptr_t qemu_host_page_size;
+intptr_t qemu_host_page_mask;
+uintptr_t qemu_real_host_page_size;
+intptr_t qemu_real_host_page_mask;
+
 bool set_preferred_target_page_bits(int bits)
 {
     /* The target page size is the lowest common denominator for all
@@ -3590,3 +3595,18 @@ err:
 }
 
 #endif
+
+void page_size_init(void)
+{
+    /* NOTE: we can always suppose that qemu_host_page_size >=
+       TARGET_PAGE_SIZE */
+    qemu_real_host_page_size = getpagesize();
+    qemu_real_host_page_mask = -(intptr_t)qemu_real_host_page_size;
+    if (qemu_host_page_size == 0) {
+        qemu_host_page_size = qemu_real_host_page_size;
+    }
+    if (qemu_host_page_size < TARGET_PAGE_SIZE) {
+        qemu_host_page_size = TARGET_PAGE_SIZE;
+    }
+    qemu_host_page_mask = -(intptr_t)qemu_host_page_size;
+}
-- 
1.9.1

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

* [Qemu-devel] [PATCH v2 06/15] kvmvapic: remove tcg related code
  2017-07-03 10:12 [Qemu-devel] [PATCH v2 00/15] add disable-tcg option for x86 build Yang Zhong
                   ` (4 preceding siblings ...)
  2017-07-03 10:12 ` [Qemu-devel] [PATCH v2 05/15] tcg: move page_size_init() function Yang Zhong
@ 2017-07-03 10:12 ` Yang Zhong
  2017-07-03 14:28   ` Paolo Bonzini
  2017-07-03 10:12 ` [Qemu-devel] [PATCH v2 07/15] tcg: move cpu_sync_bndcs_hflags() function Yang Zhong
                   ` (8 subsequent siblings)
  14 siblings, 1 reply; 27+ messages in thread
From: Yang Zhong @ 2017-07-03 10:12 UTC (permalink / raw)
  To: pbonzini, rth, thuth; +Cc: qemu-devel, anthony.xu, a.rigo, yang.zhong

Since Paolo's below patch has fixed A20 issue
commit bbfa326fc8028e275eddf8c9965c2a1b59405b2e
target/i386: enable A20 automatically in system management mod

The tcg code in kvmvapic.c is NOT useful, those code need remove.

Signed-off-by: Yang Zhong <yang.zhong@intel.com>
---
 hw/i386/kvmvapic.c | 24 ------------------------
 1 file changed, 24 deletions(-)

diff --git a/hw/i386/kvmvapic.c b/hw/i386/kvmvapic.c
index 82a4955..5b7be5a 100644
--- a/hw/i386/kvmvapic.c
+++ b/hw/i386/kvmvapic.c
@@ -18,7 +18,6 @@
 #include "sysemu/kvm.h"
 #include "hw/i386/apic_internal.h"
 #include "hw/sysbus.h"
-#include "tcg/tcg.h"
 
 #define VAPIC_IO_PORT           0x7e
 
@@ -396,13 +395,9 @@ static void patch_call(VAPICROMState *s, X86CPU *cpu, target_ulong ip,
 static void patch_instruction(VAPICROMState *s, X86CPU *cpu, target_ulong ip)
 {
     CPUState *cs = CPU(cpu);
-    CPUX86State *env = &cpu->env;
     VAPICHandlers *handlers;
     uint8_t opcode[2];
     uint32_t imm32 = 0;
-    target_ulong current_pc = 0;
-    target_ulong current_cs_base = 0;
-    uint32_t current_flags = 0;
 
     if (smp_cpus == 1) {
         handlers = &s->rom_state.up;
@@ -410,17 +405,6 @@ static void patch_instruction(VAPICROMState *s, X86CPU *cpu, target_ulong ip)
         handlers = &s->rom_state.mp;
     }
 
-    if (!kvm_enabled()) {
-        cpu_get_tb_cpu_state(env, &current_pc, &current_cs_base,
-                             &current_flags);
-        /* Account this instruction, because we will exit the tb.
-           This is the first instruction in the block. Therefore
-           there is no need in restoring CPU state. */
-        if (use_icount) {
-            --cs->icount_decr.u16.low;
-        }
-    }
-
     pause_all_vcpus();
 
     cpu_memory_rw_debug(cs, ip, opcode, sizeof(opcode), 0);
@@ -455,14 +439,6 @@ static void patch_instruction(VAPICROMState *s, X86CPU *cpu, target_ulong ip)
     }
 
     resume_all_vcpus();
-
-    if (!kvm_enabled()) {
-        /* Both tb_lock and iothread_mutex will be reset when
-         *  longjmps back into the cpu_exec loop. */
-        tb_lock();
-        tb_gen_code(cs, current_pc, current_cs_base, current_flags, 1);
-        cpu_loop_exit_noexc(cs);
-    }
 }
 
 void vapic_report_tpr_access(DeviceState *dev, CPUState *cs, target_ulong ip,
-- 
1.9.1

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

* [Qemu-devel] [PATCH v2 07/15] tcg: move cpu_sync_bndcs_hflags() function
  2017-07-03 10:12 [Qemu-devel] [PATCH v2 00/15] add disable-tcg option for x86 build Yang Zhong
                   ` (5 preceding siblings ...)
  2017-07-03 10:12 ` [Qemu-devel] [PATCH v2 06/15] kvmvapic: remove tcg related code Yang Zhong
@ 2017-07-03 10:12 ` Yang Zhong
  2017-07-03 10:12 ` [Qemu-devel] [PATCH v2 08/15] tcg: make cpu_get_fp80()/cpu_set_fp80() static Yang Zhong
                   ` (7 subsequent siblings)
  14 siblings, 0 replies; 27+ messages in thread
From: Yang Zhong @ 2017-07-03 10:12 UTC (permalink / raw)
  To: pbonzini, rth, thuth; +Cc: qemu-devel, anthony.xu, a.rigo, yang.zhong

Move cpu_sync_bndcs_hflags() function from mpx_helper.c
to helper.c because mpx_helper.c need be disabled when
tcg is disabled.

Signed-off-by: Yang Zhong <yang.zhong@intel.com>
---
 target/i386/helper.c     | 34 +++++++++++++++++++++++++++++++++-
 target/i386/mpx_helper.c | 30 ------------------------------
 2 files changed, 33 insertions(+), 31 deletions(-)

diff --git a/target/i386/helper.c b/target/i386/helper.c
index ef05059..87fd705 100644
--- a/target/i386/helper.c
+++ b/target/i386/helper.c
@@ -29,6 +29,36 @@
 #include "hw/i386/apic_internal.h"
 #endif
 
+void cpu_sync_bndcs_hflags(CPUX86State *env)
+{
+    uint32_t hflags = env->hflags;
+    uint32_t hflags2 = env->hflags2;
+    uint32_t bndcsr;
+
+    if ((hflags & HF_CPL_MASK) == 3) {
+        bndcsr = env->bndcs_regs.cfgu;
+    } else {
+        bndcsr = env->msr_bndcfgs;
+    }
+
+    if ((env->cr[4] & CR4_OSXSAVE_MASK)
+        && (env->xcr0 & XSTATE_BNDCSR_MASK)
+        && (bndcsr & BNDCFG_ENABLE)) {
+        hflags |= HF_MPX_EN_MASK;
+    } else {
+        hflags &= ~HF_MPX_EN_MASK;
+    }
+
+    if (bndcsr & BNDCFG_BNDPRESERVE) {
+        hflags2 |= HF2_MPX_PR_MASK;
+    } else {
+        hflags2 &= ~HF2_MPX_PR_MASK;
+    }
+
+    env->hflags = hflags;
+    env->hflags2 = hflags2;
+}
+
 static void cpu_x86_version(CPUX86State *env, int *family, int *model)
 {
     int cpuver = env->cpuid_version;
@@ -1302,10 +1332,12 @@ void cpu_report_tpr_access(CPUX86State *env, TPRAccess access)
         env->tpr_access_type = access;
 
         cpu_interrupt(cs, CPU_INTERRUPT_TPR);
-    } else {
+    } else if (tcg_enabled()) {
         cpu_restore_state(cs, cs->mem_io_pc);
 
         apic_handle_tpr_access_report(cpu->apic_state, env->eip, access);
+    } else {
+        abort();
     }
 }
 #endif /* !CONFIG_USER_ONLY */
diff --git a/target/i386/mpx_helper.c b/target/i386/mpx_helper.c
index 7e44820..ade5d24 100644
--- a/target/i386/mpx_helper.c
+++ b/target/i386/mpx_helper.c
@@ -24,36 +24,6 @@
 #include "exec/exec-all.h"
 
 
-void cpu_sync_bndcs_hflags(CPUX86State *env)
-{
-    uint32_t hflags = env->hflags;
-    uint32_t hflags2 = env->hflags2;
-    uint32_t bndcsr;
-
-    if ((hflags & HF_CPL_MASK) == 3) {
-        bndcsr = env->bndcs_regs.cfgu;
-    } else {
-        bndcsr = env->msr_bndcfgs;
-    }
-
-    if ((env->cr[4] & CR4_OSXSAVE_MASK)
-        && (env->xcr0 & XSTATE_BNDCSR_MASK)
-        && (bndcsr & BNDCFG_ENABLE)) {
-        hflags |= HF_MPX_EN_MASK;
-    } else {
-        hflags &= ~HF_MPX_EN_MASK;
-    }
-
-    if (bndcsr & BNDCFG_BNDPRESERVE) {
-        hflags2 |= HF2_MPX_PR_MASK;
-    } else {
-        hflags2 &= ~HF2_MPX_PR_MASK;
-    }
-
-    env->hflags = hflags;
-    env->hflags2 = hflags2;
-}
-
 void helper_bndck(CPUX86State *env, uint32_t fail)
 {
     if (unlikely(fail)) {
-- 
1.9.1

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

* [Qemu-devel] [PATCH v2 08/15] tcg: make cpu_get_fp80()/cpu_set_fp80() static
  2017-07-03 10:12 [Qemu-devel] [PATCH v2 00/15] add disable-tcg option for x86 build Yang Zhong
                   ` (6 preceding siblings ...)
  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 ` 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
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 27+ messages in thread
From: Yang Zhong @ 2017-07-03 10:12 UTC (permalink / raw)
  To: pbonzini, rth, thuth; +Cc: qemu-devel, anthony.xu, a.rigo, yang.zhong

Move cpu_get_fp80()/cpu_set_fp80() from fpu_helper.c to
machine.c because fpu_helper.c will be disabled if tcg is
disabled in the build.

Signed-off-by: Yang Zhong <yang.zhong@intel.com>
---
 target/i386/cpu.h        |  2 --
 target/i386/fpu_helper.c | 18 ------------------
 target/i386/machine.c    | 18 ++++++++++++++++++
 3 files changed, 18 insertions(+), 20 deletions(-)

diff --git a/target/i386/cpu.h b/target/i386/cpu.h
index de0551f..8b3b535 100644
--- a/target/i386/cpu.h
+++ b/target/i386/cpu.h
@@ -1418,8 +1418,6 @@ int cpu_x86_get_descr_debug(CPUX86State *env, unsigned int selector,
 
 /* op_helper.c */
 /* used for debug or cpu save/restore */
-void cpu_get_fp80(uint64_t *pmant, uint16_t *pexp, floatx80 f);
-floatx80 cpu_set_fp80(uint64_t mant, uint16_t upper);
 
 /* cpu-exec.c */
 /* the following helpers are only usable in user mode simulation as
diff --git a/target/i386/fpu_helper.c b/target/i386/fpu_helper.c
index 69ea33a..34fb5fc 100644
--- a/target/i386/fpu_helper.c
+++ b/target/i386/fpu_helper.c
@@ -1539,24 +1539,6 @@ void helper_xsetbv(CPUX86State *env, uint32_t ecx, uint64_t mask)
     raise_exception_ra(env, EXCP0D_GPF, GETPC());
 }
 
-void cpu_get_fp80(uint64_t *pmant, uint16_t *pexp, floatx80 f)
-{
-    CPU_LDoubleU temp;
-
-    temp.d = f;
-    *pmant = temp.l.lower;
-    *pexp = temp.l.upper;
-}
-
-floatx80 cpu_set_fp80(uint64_t mant, uint16_t upper)
-{
-    CPU_LDoubleU temp;
-
-    temp.l.upper = upper;
-    temp.l.lower = mant;
-    return temp.d;
-}
-
 /* MMX/SSE */
 /* XXX: optimize by storing fptt and fptags in the static cpu state */
 
diff --git a/target/i386/machine.c b/target/i386/machine.c
index 8c7a822..53587ae 100644
--- a/target/i386/machine.c
+++ b/target/i386/machine.c
@@ -142,6 +142,24 @@ typedef struct x86_FPReg_tmp {
     uint16_t tmp_exp;
 } x86_FPReg_tmp;
 
+static void cpu_get_fp80(uint64_t *pmant, uint16_t *pexp, floatx80 f)
+{
+    CPU_LDoubleU temp;
+
+    temp.d = f;
+    *pmant = temp.l.lower;
+    *pexp = temp.l.upper;
+}
+
+static floatx80 cpu_set_fp80(uint64_t mant, uint16_t upper)
+{
+    CPU_LDoubleU temp;
+
+    temp.l.upper = upper;
+    temp.l.lower = mant;
+    return temp.d;
+}
+
 static void fpreg_pre_save(void *opaque)
 {
     x86_FPReg_tmp *tmp = opaque;
-- 
1.9.1

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

* [Qemu-devel] [PATCH v2 09/15] tcg: add the tcg-stub.c file into accel/stubs/
  2017-07-03 10:12 [Qemu-devel] [PATCH v2 00/15] add disable-tcg option for x86 build Yang Zhong
                   ` (7 preceding siblings ...)
  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 ` Yang Zhong
  2017-07-03 10:12 ` [Qemu-devel] [PATCH v2 10/15] tcg: move tb related lock functions Yang Zhong
                   ` (5 subsequent siblings)
  14 siblings, 0 replies; 27+ messages in thread
From: Yang Zhong @ 2017-07-03 10:12 UTC (permalink / raw)
  To: pbonzini, rth, thuth; +Cc: qemu-devel, anthony.xu, a.rigo, yang.zhong

If tcg is disabled, the functions in tcg-stub.c file will be called.
This file is target-independent file, do not include any platform
related stub functions into this file.

Signed-off-by: Yang Zhong <yang.zhong@intel.com>
---
 accel/stubs/Makefile.objs |  1 +
 accel/stubs/tcg-stub.c    | 80 +++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 81 insertions(+)
 create mode 100644 accel/stubs/tcg-stub.c

diff --git a/accel/stubs/Makefile.objs b/accel/stubs/Makefile.objs
index bd5794f..fdfbf73 100644
--- a/accel/stubs/Makefile.objs
+++ b/accel/stubs/Makefile.objs
@@ -1 +1,2 @@
 obj-$(call lnot,$(CONFIG_KVM)) += kvm-stub.o
+obj-$(call lnot,$(CONFIG_TCG)) += tcg-stub.o
diff --git a/accel/stubs/tcg-stub.c b/accel/stubs/tcg-stub.c
new file mode 100644
index 0000000..a9fe40a
--- /dev/null
+++ b/accel/stubs/tcg-stub.c
@@ -0,0 +1,80 @@
+/*
+ * QEMU TCG accelerator stub
+ *
+ * Copyright Red Hat, Inc. 2013
+ *
+ * Author: Paolo Bonzini     <pbonzini@redhat.com>
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ *
+ */
+
+#include "qemu/osdep.h"
+#include "qemu-common.h"
+#include "cpu.h"
+#include "tcg/tcg.h"
+#include "exec/cpu-common.h"
+#include "exec/exec-all.h"
+#include "translate-all.h"
+#include "exec/cpu-all.h"
+
+
+void tb_flush(CPUState *cpu)
+{
+}
+
+void tb_invalidate_phys_page_fast(tb_page_addr_t start, int len)
+{
+}
+
+void tb_invalidate_phys_range(tb_page_addr_t start, tb_page_addr_t end)
+{
+}
+
+void tb_check_watchpoint(CPUState *cpu)
+{
+}
+
+TranslationBlock *tb_gen_code(CPUState *cpu,
+                              target_ulong pc, target_ulong cs_base,
+                              uint32_t flags, int cflags)
+{
+    return NULL;
+}
+
+void tlb_reset_dirty(CPUState *cpu, ram_addr_t start1, ram_addr_t length)
+{
+}
+
+void tlb_set_dirty(CPUState *cpu, target_ulong vaddr)
+{
+}
+
+bool cpu_restore_state(CPUState *cpu, uintptr_t searched_pc)
+{
+    return false;
+}
+
+void dump_exec_info(FILE *f, fprintf_function cpu_fprintf)
+{
+}
+
+void dump_opcount_info(FILE *f, fprintf_function cpu_fprintf)
+{
+}
+
+void cpu_loop_exit(CPUState *cpu)
+{
+    abort();
+}
+
+void cpu_loop_exit_noexc(CPUState *cpu)
+{
+    abort();
+}
+
+int cpu_exec(CPUState *cpu)
+{
+    abort();
+}
-- 
1.9.1

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

* [Qemu-devel] [PATCH v2 10/15] tcg: move tb related lock functions
  2017-07-03 10:12 [Qemu-devel] [PATCH v2 00/15] add disable-tcg option for x86 build Yang Zhong
                   ` (8 preceding siblings ...)
  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 ` 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
                   ` (4 subsequent siblings)
  14 siblings, 0 replies; 27+ messages in thread
From: Yang Zhong @ 2017-07-03 10:12 UTC (permalink / raw)
  To: pbonzini, rth, thuth; +Cc: qemu-devel, anthony.xu, a.rigo, yang.zhong

Move tb_lock()/tb_unlock()/tb_lock_reset() from tcg.h to
translate-all.h. tb_lock()/tb_unlock() need be impelemnted
in accel/stubs/tcg-stub.c.

Signed-off-by: Yang Zhong <yang.zhong@intel.com>
---
 accel/stubs/tcg-stub.c    | 8 ++++++++
 accel/tcg/cpu-exec.c      | 1 +
 accel/tcg/cputlb.c        | 1 +
 accel/tcg/translate-all.h | 3 +++
 tcg/tcg.h                 | 4 ----
 trace/control-target.c    | 1 -
 6 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/accel/stubs/tcg-stub.c b/accel/stubs/tcg-stub.c
index a9fe40a..a84a6e6 100644
--- a/accel/stubs/tcg-stub.c
+++ b/accel/stubs/tcg-stub.c
@@ -20,6 +20,14 @@
 #include "exec/cpu-all.h"
 
 
+void tb_lock(void)
+{
+}
+
+void tb_unlock(void)
+{
+}
+
 void tb_flush(CPUState *cpu)
 {
 }
diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c
index 3581618..03b4ea2 100644
--- a/accel/tcg/cpu-exec.c
+++ b/accel/tcg/cpu-exec.c
@@ -21,6 +21,7 @@
 #include "trace.h"
 #include "disas/disas.h"
 #include "exec/exec-all.h"
+#include "translate-all.h"
 #include "tcg.h"
 #include "qemu/atomic.h"
 #include "sysemu/qtest.h"
diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c
index 1900936..c0efd74 100644
--- a/accel/tcg/cputlb.c
+++ b/accel/tcg/cputlb.c
@@ -21,6 +21,7 @@
 #include "qemu/main-loop.h"
 #include "cpu.h"
 #include "exec/exec-all.h"
+#include "translate-all.h"
 #include "exec/memory.h"
 #include "exec/address-spaces.h"
 #include "exec/cpu_ldst.h"
diff --git a/accel/tcg/translate-all.h b/accel/tcg/translate-all.h
index ba8e4d6..4774f78 100644
--- a/accel/tcg/translate-all.h
+++ b/accel/tcg/translate-all.h
@@ -23,6 +23,9 @@
 
 
 /* translate-all.c */
+void tb_lock(void);
+void tb_unlock(void);
+void tb_lock_reset(void);
 void tb_invalidate_phys_page_fast(tb_page_addr_t start, int len);
 void tb_invalidate_phys_page_range(tb_page_addr_t start, tb_page_addr_t end,
                                    int is_cpu_write_access);
diff --git a/tcg/tcg.h b/tcg/tcg.h
index 9e37722..da78721 100644
--- a/tcg/tcg.h
+++ b/tcg/tcg.h
@@ -757,10 +757,6 @@ void *tcg_malloc_internal(TCGContext *s, int size);
 void tcg_pool_reset(TCGContext *s);
 TranslationBlock *tcg_tb_alloc(TCGContext *s);
 
-void tb_lock(void);
-void tb_unlock(void);
-void tb_lock_reset(void);
-
 /* Called with tb_lock held.  */
 static inline void *tcg_malloc(int size)
 {
diff --git a/trace/control-target.c b/trace/control-target.c
index 6266e63..2a5efc7 100644
--- a/trace/control-target.c
+++ b/trace/control-target.c
@@ -11,7 +11,6 @@
 #include "cpu.h"
 #include "trace-root.h"
 #include "trace/control.h"
-#include "translate-all.h"
 
 
 void trace_event_set_state_dynamic_init(TraceEvent *ev, bool state)
-- 
1.9.1

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

* [Qemu-devel] [PATCH v2 11/15] tcg: split cpu_set_mxcsr() and make cpu_set_fpuc() inline
  2017-07-03 10:12 [Qemu-devel] [PATCH v2 00/15] add disable-tcg option for x86 build Yang Zhong
                   ` (9 preceding siblings ...)
  2017-07-03 10:12 ` [Qemu-devel] [PATCH v2 10/15] tcg: move tb related lock functions Yang Zhong
@ 2017-07-03 10:12 ` Yang Zhong
  2017-07-03 10:12 ` [Qemu-devel] [PATCH v2 12/15] tcg: disable tcg in CPUX86State struct Yang Zhong
                   ` (3 subsequent siblings)
  14 siblings, 0 replies; 27+ messages in thread
From: Yang Zhong @ 2017-07-03 10:12 UTC (permalink / raw)
  To: pbonzini, rth, thuth; +Cc: qemu-devel, anthony.xu, a.rigo, yang.zhong

Split the cpu_set_mxcsr() and make cpu_set_fpuc() inline with specific
tcg code.

Signed-off-by: Yang Zhong <yang.zhong@intel.com>
---
 target/i386/cpu.h        | 18 ++++++++++++++++--
 target/i386/fpu_helper.c | 11 ++---------
 2 files changed, 18 insertions(+), 11 deletions(-)

diff --git a/target/i386/cpu.h b/target/i386/cpu.h
index 8b3b535..67a6091 100644
--- a/target/i386/cpu.h
+++ b/target/i386/cpu.h
@@ -1643,8 +1643,22 @@ static inline int32_t x86_get_a20_mask(CPUX86State *env)
 }
 
 /* fpu_helper.c */
-void cpu_set_mxcsr(CPUX86State *env, uint32_t val);
-void cpu_set_fpuc(CPUX86State *env, uint16_t val);
+void tcg_update_mxcsr(CPUX86State *env);
+static inline void cpu_set_mxcsr(CPUX86State *env, uint32_t mxcsr)
+{
+    env->mxcsr = mxcsr;
+    if (tcg_enabled()) {
+        tcg_update_mxcsr(env);
+    }
+}
+
+static inline void cpu_set_fpuc(CPUX86State *env, uint16_t fpuc)
+{
+     env->fpuc = fpuc;
+     if (tcg_enabled()) {
+        update_fp_status(env);
+     }
+}
 
 /* mem_helper.c */
 void helper_lock_init(void);
diff --git a/target/i386/fpu_helper.c b/target/i386/fpu_helper.c
index 34fb5fc..f0facb9 100644
--- a/target/i386/fpu_helper.c
+++ b/target/i386/fpu_helper.c
@@ -1550,12 +1550,11 @@ void helper_xsetbv(CPUX86State *env, uint32_t ecx, uint64_t mask)
 #define SSE_RC_CHOP         0x6000
 #define SSE_FZ              0x8000
 
-void cpu_set_mxcsr(CPUX86State *env, uint32_t mxcsr)
+void tcg_update_mxcsr(CPUX86State *env)
 {
+    uint32_t mxcsr = env->mxcsr;
     int rnd_type;
 
-    env->mxcsr = mxcsr;
-
     /* set rounding mode */
     switch (mxcsr & SSE_RC_MASK) {
     default:
@@ -1581,12 +1580,6 @@ void cpu_set_mxcsr(CPUX86State *env, uint32_t mxcsr)
     set_flush_to_zero((mxcsr & SSE_FZ) ? 1 : 0, &env->fp_status);
 }
 
-void cpu_set_fpuc(CPUX86State *env, uint16_t val)
-{
-    env->fpuc = val;
-    update_fp_status(env);
-}
-
 void helper_ldmxcsr(CPUX86State *env, uint32_t val)
 {
     cpu_set_mxcsr(env, val);
-- 
1.9.1

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

* [Qemu-devel] [PATCH v2 12/15] tcg: disable tcg in CPUX86State struct
  2017-07-03 10:12 [Qemu-devel] [PATCH v2 00/15] add disable-tcg option for x86 build Yang Zhong
                   ` (10 preceding siblings ...)
  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 ` Yang Zhong
  2017-07-03 10:12 ` [Qemu-devel] [PATCH v2 13/15] tcg: add the CONFIG_TCG for header Yang Zhong
                   ` (2 subsequent siblings)
  14 siblings, 0 replies; 27+ messages in thread
From: Yang Zhong @ 2017-07-03 10:12 UTC (permalink / raw)
  To: pbonzini, rth, thuth; +Cc: qemu-devel, anthony.xu, a.rigo, yang.zhong

Add the CONFIG_TCG for CPU_COMMON_TLB in the CPUX86State struct.

Signed-off-by: Yang Zhong <yang.zhong@intel.com>
---
 include/exec/cpu-defs.h | 4 +++-
 target/i386/cpu.h       | 2 ++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/include/exec/cpu-defs.h b/include/exec/cpu-defs.h
index 5f4e303..bc8e7f8 100644
--- a/include/exec/cpu-defs.h
+++ b/include/exec/cpu-defs.h
@@ -25,7 +25,9 @@
 
 #include "qemu/host-utils.h"
 #include "qemu/queue.h"
+#ifdef CONFIG_TCG
 #include "tcg-target.h"
+#endif
 #ifndef CONFIG_USER_ONLY
 #include "exec/hwaddr.h"
 #endif
@@ -54,7 +56,7 @@ typedef uint64_t target_ulong;
 #error TARGET_LONG_SIZE undefined
 #endif
 
-#if !defined(CONFIG_USER_ONLY)
+#if !defined(CONFIG_USER_ONLY) && defined(CONFIG_TCG)
 /* use a fully associative victim tlb of 8 entries */
 #define CPU_VTLB_SIZE 8
 
diff --git a/target/i386/cpu.h b/target/i386/cpu.h
index 67a6091..d4b10a3 100644
--- a/target/i386/cpu.h
+++ b/target/i386/cpu.h
@@ -52,7 +52,9 @@
 
 #include "exec/cpu-defs.h"
 
+#ifdef CONFIG_TCG
 #include "fpu/softfloat.h"
+#endif
 
 #define R_EAX 0
 #define R_ECX 1
-- 
1.9.1

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

* [Qemu-devel] [PATCH v2 13/15] tcg: add the CONFIG_TCG for header
  2017-07-03 10:12 [Qemu-devel] [PATCH v2 00/15] add disable-tcg option for x86 build Yang Zhong
                   ` (11 preceding siblings ...)
  2017-07-03 10:12 ` [Qemu-devel] [PATCH v2 12/15] tcg: disable tcg in CPUX86State struct Yang Zhong
@ 2017-07-03 10:12 ` 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
  14 siblings, 0 replies; 27+ messages in thread
From: Yang Zhong @ 2017-07-03 10:12 UTC (permalink / raw)
  To: pbonzini, rth, thuth; +Cc: qemu-devel, anthony.xu, a.rigo, yang.zhong

Add the CONFIG_TCG for exec-all.h. Since function tlb_set_page_with_attrs()
is defined in ./accel/tcg/cputlb.c, which will be disabled if tcg is disabled.
This function need be implemented in accel/stubs/tcg-stub.c for disable-tcg.

Signed-off-by: Yang Zhong <yang.zhong@intel.com>
---
 accel/stubs/tcg-stub.c      |  6 +++++
 include/exec/cputlb.h       |  2 +-
 include/exec/exec-all.h     | 53 ++++++++++++++++++++++++---------------------
 include/exec/helper-proto.h |  2 ++
 4 files changed, 37 insertions(+), 26 deletions(-)

diff --git a/accel/stubs/tcg-stub.c b/accel/stubs/tcg-stub.c
index a84a6e6..4e9f7fa 100644
--- a/accel/stubs/tcg-stub.c
+++ b/accel/stubs/tcg-stub.c
@@ -64,6 +64,12 @@ bool cpu_restore_state(CPUState *cpu, uintptr_t searched_pc)
     return false;
 }
 
+void tlb_set_page_with_attrs(CPUState *cpu, target_ulong vaddr,
+                             hwaddr paddr, MemTxAttrs attrs,
+                             int prot, int mmu_idx, target_ulong size)
+{
+}
+
 void dump_exec_info(FILE *f, fprintf_function cpu_fprintf)
 {
 }
diff --git a/include/exec/cputlb.h b/include/exec/cputlb.h
index 3f94178..cf296d9 100644
--- a/include/exec/cputlb.h
+++ b/include/exec/cputlb.h
@@ -19,7 +19,7 @@
 #ifndef CPUTLB_H
 #define CPUTLB_H
 
-#if !defined(CONFIG_USER_ONLY)
+#if !defined(CONFIG_USER_ONLY) && defined(CONFIG_TCG)
 /* cputlb.c */
 void tlb_protect_code(ram_addr_t ram_addr);
 void tlb_unprotect_code(ram_addr_t ram_addr);
diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h
index 724ec73..446c924 100644
--- a/include/exec/exec-all.h
+++ b/include/exec/exec-all.h
@@ -82,6 +82,34 @@ void cpu_reloading_memory_map(void);
  * Note that with KVM only one address space is supported.
  */
 void cpu_address_space_init(CPUState *cpu, AddressSpace *as, int asidx);
+/**
+ * tlb_set_page_with_attrs:
+ * @cpu: CPU to add this TLB entry for
+ * @vaddr: virtual address of page to add entry for
+ * @paddr: physical address of the page
+ * @attrs: memory transaction attributes
+ * @prot: access permissions (PAGE_READ/PAGE_WRITE/PAGE_EXEC bits)
+ * @mmu_idx: MMU index to insert TLB entry for
+ * @size: size of the page in bytes
+ *
+ * Add an entry to this CPU's TLB (a mapping from virtual address
+ * @vaddr to physical address @paddr) with the specified memory
+ * transaction attributes. This is generally called by the target CPU
+ * specific code after it has been called through the tlb_fill()
+ * entry point and performed a successful page table walk to find
+ * the physical address and attributes for the virtual address
+ * which provoked the TLB miss.
+ *
+ * At most one entry for a given virtual address is permitted. Only a
+ * single TARGET_PAGE_SIZE region is mapped; the supplied @size is only
+ * used by tlb_flush_page.
+ */
+void tlb_set_page_with_attrs(CPUState *cpu, target_ulong vaddr,
+                             hwaddr paddr, MemTxAttrs attrs,
+                             int prot, int mmu_idx, target_ulong size);
+#endif
+
+#if !defined(CONFIG_USER_ONLY) && defined(CONFIG_TCG)
 /* cputlb.c */
 /**
  * tlb_flush_page:
@@ -205,31 +233,6 @@ void tlb_flush_by_mmuidx_all_cpus(CPUState *cpu, uint16_t idxmap);
  * depend on when the guests translation ends the TB.
  */
 void tlb_flush_by_mmuidx_all_cpus_synced(CPUState *cpu, uint16_t idxmap);
-/**
- * tlb_set_page_with_attrs:
- * @cpu: CPU to add this TLB entry for
- * @vaddr: virtual address of page to add entry for
- * @paddr: physical address of the page
- * @attrs: memory transaction attributes
- * @prot: access permissions (PAGE_READ/PAGE_WRITE/PAGE_EXEC bits)
- * @mmu_idx: MMU index to insert TLB entry for
- * @size: size of the page in bytes
- *
- * Add an entry to this CPU's TLB (a mapping from virtual address
- * @vaddr to physical address @paddr) with the specified memory
- * transaction attributes. This is generally called by the target CPU
- * specific code after it has been called through the tlb_fill()
- * entry point and performed a successful page table walk to find
- * the physical address and attributes for the virtual address
- * which provoked the TLB miss.
- *
- * At most one entry for a given virtual address is permitted. Only a
- * single TARGET_PAGE_SIZE region is mapped; the supplied @size is only
- * used by tlb_flush_page.
- */
-void tlb_set_page_with_attrs(CPUState *cpu, target_ulong vaddr,
-                             hwaddr paddr, MemTxAttrs attrs,
-                             int prot, int mmu_idx, target_ulong size);
 /* tlb_set_page:
  *
  * This function is equivalent to calling tlb_set_page_with_attrs()
diff --git a/include/exec/helper-proto.h b/include/exec/helper-proto.h
index 954bef8..417c7b0 100644
--- a/include/exec/helper-proto.h
+++ b/include/exec/helper-proto.h
@@ -28,7 +28,9 @@ dh_ctype(ret) HELPER(name) (dh_ctype(t1), dh_ctype(t2), dh_ctype(t3), \
 
 #include "helper.h"
 #include "trace/generated-helpers.h"
+#ifdef CONFIG_TCG
 #include "tcg-runtime.h"
+#endif
 
 #undef DEF_HELPER_FLAGS_0
 #undef DEF_HELPER_FLAGS_1
-- 
1.9.1

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

* [Qemu-devel] [PATCH v2 14/15] tcg: add the tcg_enabled() in target/i386/
  2017-07-03 10:12 [Qemu-devel] [PATCH v2 00/15] add disable-tcg option for x86 build Yang Zhong
                   ` (12 preceding siblings ...)
  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 ` Yang Zhong
  2017-07-03 10:12 ` [Qemu-devel] [PATCH v2 15/15] tcg: add the CONFIG_TCG into Makefiles Yang Zhong
  14 siblings, 0 replies; 27+ messages in thread
From: Yang Zhong @ 2017-07-03 10:12 UTC (permalink / raw)
  To: pbonzini, rth, thuth; +Cc: qemu-devel, anthony.xu, a.rigo, yang.zhong

Add the tcg_enabled() to disable tcg code in x86 target.

Signed-off-by: Yang Zhong <yang.zhong@intel.com>
---
 target/i386/bpt_helper.c | 26 ++++++++++++++++++++------
 target/i386/cpu.c        |  4 +++-
 target/i386/machine.c    |  5 +++--
 3 files changed, 26 insertions(+), 9 deletions(-)

diff --git a/target/i386/bpt_helper.c b/target/i386/bpt_helper.c
index b3efdc7..083c712 100644
--- a/target/i386/bpt_helper.c
+++ b/target/i386/bpt_helper.c
@@ -216,7 +216,9 @@ void breakpoint_handler(CPUState *cs)
         if (cs->watchpoint_hit->flags & BP_CPU) {
             cs->watchpoint_hit = NULL;
             if (check_hw_breakpoints(env, false)) {
-                raise_exception(env, EXCP01_DB);
+                if (tcg_enabled()) {
+                    raise_exception(env, EXCP01_DB);
+                }
             } else {
                 cpu_loop_exit_noexc(cs);
             }
@@ -226,7 +228,9 @@ void breakpoint_handler(CPUState *cs)
             if (bp->pc == env->eip) {
                 if (bp->flags & BP_CPU) {
                     check_hw_breakpoints(env, true);
-                    raise_exception(env, EXCP01_DB);
+                    if (tcg_enabled()) {
+                        raise_exception(env, EXCP01_DB);
+                    }
                 }
                 break;
             }
@@ -241,7 +245,9 @@ void helper_single_step(CPUX86State *env)
     check_hw_breakpoints(env, true);
     env->dr[6] |= DR6_BS;
 #endif
-    raise_exception(env, EXCP01_DB);
+    if (tcg_enabled()) {
+        raise_exception(env, EXCP01_DB);
+    }
 }
 
 void helper_rechecking_single_step(CPUX86State *env)
@@ -282,7 +288,9 @@ void helper_set_dr(CPUX86State *env, int reg, target_ulong t0)
         cpu_x86_update_dr7(env, t0);
         return;
     }
-    raise_exception_err_ra(env, EXCP06_ILLOP, 0, GETPC());
+    if (tcg_enabled()) {
+        raise_exception_err_ra(env, EXCP06_ILLOP, 0, GETPC());
+    }
 #endif
 }
 
@@ -304,7 +312,11 @@ target_ulong helper_get_dr(CPUX86State *env, int reg)
             return env->dr[7];
         }
     }
-    raise_exception_err_ra(env, EXCP06_ILLOP, 0, GETPC());
+    if (tcg_enabled()) {
+        raise_exception_err_ra(env, EXCP06_ILLOP, 0, GETPC());
+    } else {
+        return 0;
+    }
 }
 
 /* Check if Port I/O is trapped by a breakpoint.  */
@@ -329,7 +341,9 @@ void helper_bpt_io(CPUX86State *env, uint32_t port,
     if (hit) {
         env->dr[6] = (env->dr[6] & ~0xf) | hit;
         env->eip = next_eip;
-        raise_exception(env, EXCP01_DB);
+        if (tcg_enabled()) {
+            raise_exception(env, EXCP01_DB);
+        }
     }
 #endif
 }
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index 642519a..c571772 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -4040,8 +4040,10 @@ static void x86_cpu_common_class_init(ObjectClass *oc, void *data)
     cc->class_by_name = x86_cpu_class_by_name;
     cc->parse_features = x86_cpu_parse_featurestr;
     cc->has_work = x86_cpu_has_work;
+#ifdef CONFIG_TCG
     cc->do_interrupt = x86_cpu_do_interrupt;
     cc->cpu_exec_interrupt = x86_cpu_exec_interrupt;
+#endif
     cc->dump_state = x86_cpu_dump_state;
     cc->get_crash_info = x86_cpu_get_crash_info;
     cc->set_pc = x86_cpu_set_pc;
@@ -4070,7 +4072,7 @@ static void x86_cpu_common_class_init(ObjectClass *oc, void *data)
     cc->gdb_core_xml_file = "i386-32bit.xml";
     cc->gdb_num_core_regs = 41;
 #endif
-#ifndef CONFIG_USER_ONLY
+#if defined(CONFIG_TCG) && !defined(CONFIG_USER_ONLY)
     cc->debug_excp_handler = breakpoint_handler;
 #endif
     cc->cpu_exec_enter = x86_cpu_exec_enter;
diff --git a/target/i386/machine.c b/target/i386/machine.c
index 53587ae..b78b36c 100644
--- a/target/i386/machine.c
+++ b/target/i386/machine.c
@@ -280,8 +280,9 @@ static int cpu_post_load(void *opaque, int version_id)
     for(i = 0; i < 8; i++) {
         env->fptags[i] = (env->fptag_vmstate >> i) & 1;
     }
-    update_fp_status(env);
-
+    if (tcg_enabled()) {
+        update_fp_status(env);
+    }
     cpu_breakpoint_remove_all(cs, BP_CPU);
     cpu_watchpoint_remove_all(cs, BP_CPU);
     {
-- 
1.9.1

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

* [Qemu-devel] [PATCH v2 15/15] tcg: add the CONFIG_TCG into Makefiles
  2017-07-03 10:12 [Qemu-devel] [PATCH v2 00/15] add disable-tcg option for x86 build Yang Zhong
                   ` (13 preceding siblings ...)
  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 ` Yang Zhong
  14 siblings, 0 replies; 27+ messages in thread
From: Yang Zhong @ 2017-07-03 10:12 UTC (permalink / raw)
  To: pbonzini, rth, thuth; +Cc: qemu-devel, anthony.xu, a.rigo, yang.zhong

Add the CONFIG_TCG for frontend and backend's files in the related
Makefiles.

Signed-off-by: Yang Zhong <yang.zhong@intel.com>
---
 Makefile.target           | 4 ++--
 accel/Makefile.objs       | 2 +-
 target/i386/Makefile.objs | 7 ++++---
 3 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/Makefile.target b/Makefile.target
index 0066579..8e185d4 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -90,8 +90,8 @@ all: $(PROGS) stap
 # cpu emulator library
 obj-y += exec.o
 obj-y += accel/
-obj-y += tcg/tcg.o tcg/tcg-op.o tcg/optimize.o
-obj-y += tcg/tcg-common.o tcg/tcg-runtime.o
+obj-$(CONFIG_TCG) += tcg/tcg.o tcg/tcg-op.o tcg/optimize.o
+obj-$(CONFIG_TCG) += tcg/tcg-common.o tcg/tcg-runtime.o
 obj-$(CONFIG_TCG_INTERPRETER) += tcg/tci.o
 obj-$(CONFIG_TCG_INTERPRETER) += disas/tci.o
 obj-y += fpu/softfloat.o
diff --git a/accel/Makefile.objs b/accel/Makefile.objs
index cd5702f..10666ed 100644
--- a/accel/Makefile.objs
+++ b/accel/Makefile.objs
@@ -1,4 +1,4 @@
 obj-$(CONFIG_SOFTMMU) += accel.o
 obj-y += kvm/
-obj-y += tcg/
+obj-$(CONFIG_TCG) += tcg/
 obj-y += stubs/
diff --git a/target/i386/Makefile.objs b/target/i386/Makefile.objs
index 4fcb7f3..fee6c7e 100644
--- a/target/i386/Makefile.objs
+++ b/target/i386/Makefile.objs
@@ -1,6 +1,7 @@
-obj-y += translate.o helper.o cpu.o bpt_helper.o
-obj-y += excp_helper.o fpu_helper.o cc_helper.o int_helper.o svm_helper.o
-obj-y += smm_helper.o misc_helper.o mem_helper.o seg_helper.o mpx_helper.o
+obj-y += helper.o cpu.o cc_helper.o bpt_helper.o
+obj-$(CONFIG_TCG) += translate.o
+obj-$(CONFIG_TCG) += excp_helper.o fpu_helper.o int_helper.o svm_helper.o
+obj-$(CONFIG_TCG) += smm_helper.o misc_helper.o mem_helper.o seg_helper.o mpx_helper.o
 obj-y += gdbstub.o
 obj-$(CONFIG_SOFTMMU) += machine.o arch_memory_mapping.o arch_dump.o monitor.o
 obj-$(CONFIG_KVM) += kvm.o hyperv.o
-- 
1.9.1

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

* Re: [Qemu-devel] [PATCH v2 01/15] configure: add the disable-tcg option
  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
  0 siblings, 1 reply; 27+ messages in thread
From: Daniel P. Berrange @ 2017-07-03 10:20 UTC (permalink / raw)
  To: Yang Zhong; +Cc: pbonzini, rth, thuth, anthony.xu, qemu-devel, a.rigo

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 :|

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

* Re: [Qemu-devel] [PATCH v2 01/15] configure: add the disable-tcg option
  2017-07-03 10:20   ` Daniel P. Berrange
@ 2017-07-03 10:25     ` Paolo Bonzini
  2017-07-03 10:33       ` Daniel P. Berrange
  0 siblings, 1 reply; 27+ messages in thread
From: Paolo Bonzini @ 2017-07-03 10:25 UTC (permalink / raw)
  To: Daniel P. Berrange, Yang Zhong; +Cc: rth, thuth, anthony.xu, qemu-devel, a.rigo



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).

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

Paolo

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

* Re: [Qemu-devel] [PATCH v2 01/15] configure: add the disable-tcg option
  2017-07-03 10:25     ` Paolo Bonzini
@ 2017-07-03 10:33       ` Daniel P. Berrange
  2017-07-03 10:55         ` Paolo Bonzini
  0 siblings, 1 reply; 27+ messages in thread
From: Daniel P. Berrange @ 2017-07-03 10:33 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: Yang Zhong, rth, thuth, anthony.xu, qemu-devel, a.rigo

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 :|

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

* Re: [Qemu-devel] [PATCH v2 01/15] configure: add the disable-tcg option
  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
  0 siblings, 2 replies; 27+ messages in thread
From: Paolo Bonzini @ 2017-07-03 10:55 UTC (permalink / raw)
  To: Daniel P. Berrange; +Cc: Yang Zhong, rth, thuth, anthony.xu, qemu-devel, a.rigo



On 03/07/2017 12:33, Daniel P. Berrange wrote:
>> 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.

It would leave you with a tools-only build; whether that's a good idea,
it's another story.  I think it's acceptable, but others may disagree.

Paolo

>> 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

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

* Re: [Qemu-devel] [PATCH v2 01/15] configure: add the disable-tcg option
  2017-07-03 10:55         ` Paolo Bonzini
@ 2017-07-03 11:40           ` Thomas Huth
  2017-07-03 12:09           ` Daniel P. Berrange
  1 sibling, 0 replies; 27+ messages in thread
From: Thomas Huth @ 2017-07-03 11:40 UTC (permalink / raw)
  To: Paolo Bonzini, Daniel P. Berrange
  Cc: Yang Zhong, rth, anthony.xu, qemu-devel, a.rigo

On 03.07.2017 12:55, Paolo Bonzini wrote:
> 
> 
> On 03/07/2017 12:33, Daniel P. Berrange wrote:
>>> 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.
> 
> It would leave you with a tools-only build; whether that's a good idea,
> it's another story.  I think it's acceptable, but others may disagree.

I think this is OK for the first version. We still can refine the checks
later if we then think that there is a need for it.

 Thomas

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

* Re: [Qemu-devel] [PATCH v2 01/15] configure: add the disable-tcg option
  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
  1 sibling, 1 reply; 27+ messages in thread
From: Daniel P. Berrange @ 2017-07-03 12:09 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: Yang Zhong, rth, thuth, anthony.xu, qemu-devel, a.rigo

On Mon, Jul 03, 2017 at 12:55:04PM +0200, Paolo Bonzini wrote:
> 
> 
> On 03/07/2017 12:33, Daniel P. Berrange wrote:
> >> 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.
> 
> It would leave you with a tools-only build; whether that's a good idea,
> it's another story.  I think it's acceptable, but others may disagree.

If you do 'configure --target-list=x86_64-softmmu --disable-tcg' on a
non-x86 host I would be surprised to find  x86_64-softmmu not built.
IMHO if you explicitly request system emulators and its not posisble
to build then, an error should be report, rather than silently ignoring
the request.


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 :|

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

* Re: [Qemu-devel] [PATCH v2 02/15] vl: add tcg_enabled() for tcg related code
  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
  0 siblings, 0 replies; 27+ messages in thread
From: Thomas Huth @ 2017-07-03 12:30 UTC (permalink / raw)
  To: Yang Zhong, pbonzini, rth; +Cc: anthony.xu, qemu-devel, a.rigo

On 03.07.2017 12:12, Yang Zhong wrote:
> Need to disable the tcg related code in the vl.c if the
> disable-tcg option is added into ./configure command.
> 
> Signed-off-by: Yang Zhong <yang.zhong@intel.com>
> ---
>  accel/tcg/tcg-all.c    |  2 +-
>  include/sysemu/accel.h |  2 +-
>  vl.c                   | 15 +++++++++++----
>  3 files changed, 13 insertions(+), 6 deletions(-)
> 
> diff --git a/accel/tcg/tcg-all.c b/accel/tcg/tcg-all.c
> index dba9931..b86c896 100644
> --- a/accel/tcg/tcg-all.c
> +++ b/accel/tcg/tcg-all.c
> @@ -28,7 +28,7 @@
>  #include "sysemu/sysemu.h"
>  #include "qom/object.h"
>  
> -int tcg_tb_size;
> +long tcg_tb_size;

This looks like a non-related change. I think you should either put it
into a separate patch, or drop it.

>  static bool tcg_allowed = true;
>  
>  static int tcg_init(MachineState *ms)
> diff --git a/include/sysemu/accel.h b/include/sysemu/accel.h
> index ecc5c84..7b905b7 100644
> --- a/include/sysemu/accel.h
> +++ b/include/sysemu/accel.h
> @@ -63,7 +63,7 @@ typedef struct AccelClass {
>  #define ACCEL_GET_CLASS(obj) \
>      OBJECT_GET_CLASS(AccelClass, (obj), TYPE_ACCEL)
>  
> -extern int tcg_tb_size;
> +extern long tcg_tb_size;
>  
>  void configure_accelerator(MachineState *ms);
>  /* Register accelerator specific global properties */
> diff --git a/vl.c b/vl.c
> index 36ff3f4..f28c1ac 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -3933,9 +3933,14 @@ int main(int argc, char **argv, char **envp)
>                  configure_rtc(opts);
>                  break;
>              case QEMU_OPTION_tb_size:
> -                tcg_tb_size = strtol(optarg, NULL, 0);
> -                if (tcg_tb_size < 0) {
> -                    tcg_tb_size = 0;
> +                if (tcg_enabled()) {
> +                    qemu_strtol(optarg, NULL, 0, &tcg_tb_size);
> +                    if (tcg_tb_size < 0) {
> +                        tcg_tb_size = 0;
> +                    }
> +                } else {
> +                    error_report("TCG is disabled");
> +                    exit(1);
>                  }


You could do this without an else-part, leaving the tcg_tb_size code
unmodified:

+                  if (!tcg_enabled()) {
+                      error_report("TCG is disabled");
+                      exit(1);
+                  }
                   tcg_tb_size = strtol(optarg, NULL, 0);
                   if (tcg_tb_size < 0) {
                       tcg_tb_size = 0;

>                  break;
>              case QEMU_OPTION_icount:
> @@ -4481,7 +4486,9 @@ int main(int argc, char **argv, char **envp)
>          qemu_opts_del(icount_opts);
>      }
>  
> -    qemu_tcg_configure(accel_opts, &error_fatal);
> +    if (tcg_enabled()) {
> +        qemu_tcg_configure(accel_opts, &error_fatal);
> +    }
>  
>      if (default_net) {
>          QemuOptsList *net = qemu_find_opts("net");
> 

 Thomas

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

* Re: [Qemu-devel] [PATCH v2 03/15] tcg: tcg_handle_interrupt() function
  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
  0 siblings, 0 replies; 27+ messages in thread
From: Thomas Huth @ 2017-07-03 12:35 UTC (permalink / raw)
  To: Yang Zhong, pbonzini, rth; +Cc: anthony.xu, qemu-devel, a.rigo

On 03.07.2017 12:12, Yang Zhong wrote:
> Move tcg_handle_interrupt() from translate-common.c to
> accel/tcg/tcg-all.c.

Why is this necessary / wanted? Could you please mention the reason in
the patch description?

 Thanks,
  Thomas

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

* Re: [Qemu-devel] [PATCH v2 01/15] configure: add the disable-tcg option
  2017-07-03 12:09           ` Daniel P. Berrange
@ 2017-07-03 12:55             ` Paolo Bonzini
  0 siblings, 0 replies; 27+ messages in thread
From: Paolo Bonzini @ 2017-07-03 12:55 UTC (permalink / raw)
  To: Daniel P. Berrange; +Cc: Yang Zhong, rth, thuth, anthony.xu, qemu-devel, a.rigo



On 03/07/2017 14:09, Daniel P. Berrange wrote:
>> It would leave you with a tools-only build; whether that's a good idea,
>> it's another story.  I think it's acceptable, but others may disagree.
> If you do 'configure --target-list=x86_64-softmmu --disable-tcg' on a
> non-x86 host I would be surprised to find  x86_64-softmmu not built.
> IMHO if you explicitly request system emulators and its not posisble
> to build then, an error should be report, rather than silently ignoring
> the request.

Technically you could build a qtest-only emulator, but I don't think
_that_ is a good idea (and it's not what the patch does).

Paolo

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

* Re: [Qemu-devel] [PATCH v2 06/15] kvmvapic: remove tcg related code
  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
  0 siblings, 1 reply; 27+ messages in thread
From: Paolo Bonzini @ 2017-07-03 14:28 UTC (permalink / raw)
  To: Yang Zhong, rth, thuth; +Cc: qemu-devel, anthony.xu, a.rigo



On 03/07/2017 12:12, Yang Zhong wrote:
> Since Paolo's below patch has fixed A20 issue
> commit bbfa326fc8028e275eddf8c9965c2a1b59405b2e
> target/i386: enable A20 automatically in system management mod

How is this patch related to kvmvapic?  It fixes a bug with vapic
disabled, but it's not a reason to disable kvmvapic.

Paolo

> The tcg code in kvmvapic.c is NOT useful, those code need remove.
> 
> Signed-off-by: Yang Zhong <yang.zhong@intel.com>
> ---
>  hw/i386/kvmvapic.c | 24 ------------------------
>  1 file changed, 24 deletions(-)

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

* Re: [Qemu-devel] [PATCH v2 06/15] kvmvapic: remove tcg related code
  2017-07-03 14:28   ` Paolo Bonzini
@ 2017-07-04  2:46     ` Zhong Yang
  0 siblings, 0 replies; 27+ messages in thread
From: Zhong Yang @ 2017-07-04  2:46 UTC (permalink / raw)
  To: Paolo Bonzini
  Cc: Richard Henderson, Thomas Huth, anthony.xu, a.rigo, yang.zhong,
	qemu-devel

On Mon, Jul 03, 2017 at 04:28:00PM +0200, Paolo Bonzini wrote:
> 
> 
> On 03/07/2017 12:12, Yang Zhong wrote:
> > Since Paolo's below patch has fixed A20 issue
> > commit bbfa326fc8028e275eddf8c9965c2a1b59405b2e
> > target/i386: enable A20 automatically in system management mod
> 
> How is this patch related to kvmvapic?  It fixes a bug with vapic
> disabled, but it's not a reason to disable kvmvapic.
> 
> Paolo
> 
  Hello Paolo,

  In that time, in order to verify the tcg code is not useful in kvmvapic.c 
  file, we disabled the kvmvapic rom in the seabios and use the tcg accelator 
  to boot guest image, we found this A20 bug.

  Once this A20 bug has been fixed, we can use the tcg to bootup the guest
  image without kvmvapic rom, which show the tcg code in kvmvapic is not useful.
  This is reason why i removed the tcg code replace of using tcg_enabled() to check
  the tcg code in kvmvapic.c. thanks!

  Regards,

  Yang  
  

> > The tcg code in kvmvapic.c is NOT useful, those code need remove.
> > 
> > Signed-off-by: Yang Zhong <yang.zhong@intel.com>
> > ---
> >  hw/i386/kvmvapic.c | 24 ------------------------
> >  1 file changed, 24 deletions(-)

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

end of thread, other threads:[~2017-07-04  2:46 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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.