1. 24 10月, 2016 1 次提交
  2. 12 10月, 2016 1 次提交
    • D
      trace: provide mechanism for registering trace events · fe4db84d
      Daniel P. Berrange 提交于
      Remove the notion of there being a single global array
      of trace events, by introducing a method for registering
      groups of events.
      
      The module_call_init() needs to be invoked at the start
      of any program that wants to make use of the trace
      support. Currently this covers system emulators qemu-nbd,
      qemu-img and qemu-io.
      
      [Squashed the following fix from Daniel P. Berrange
      <berrange@redhat.com>:
      
      linux-user/bsd-user: initialize trace events subsystem
      
      The bsd-user/linux-user programs make use of the CPU emulation
      code and this now requires that the trace events subsystem
      is enabled, otherwise it'll crash trying to allocate an empty
      trace events bitmap for the CPU object.
      
      --Stefan]
      Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
      Reviewed-by: NLluís Vilanova <vilanova@ac.upc.edu>
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      Message-id: 1475588159-30598-14-git-send-email-berrange@redhat.com
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      fe4db84d
  3. 07 10月, 2016 1 次提交
  4. 29 9月, 2016 1 次提交
  5. 27 9月, 2016 3 次提交
  6. 24 8月, 2016 1 次提交
  7. 11 8月, 2016 1 次提交
  8. 01 8月, 2016 1 次提交
    • S
      Fix bsd-user build errors after 8642c1b8 · ded554cd
      Sean Bruno 提交于
        LINK  sparc-bsd-user/qemu-sparc
      bsd-user/main.o: In function `cpu_loop':
      /home/sbruno/bsd/qemu/bsd-user/main.c:515: undefined reference to `cpu_sparc_exec'
      c++: error: linker command failed with exit code 1 (use -v to see invocation)
      gmake[1]: *** [Makefile:197: qemu-sparc] Error 1
      gmake: *** [Makefile:204: subdir-sparc-bsd-user] Error 2
      
        LINK  i386-bsd-user/qemu-i386
      bsd-user/main.o: In function `cpu_loop':
      /home/sbruno/bsd/qemu/bsd-user/main.c:174: undefined reference to `cpu_x86_exec'
      c++: error: linker command failed with exit code 1 (use -v to see invocation)
      gmake[1]: *** [Makefile:197: qemu-i386] Error 1
      gmake: *** [Makefile:204: subdir-i386-bsd-user] Error 2
      Signed-off-by: NSean Bruno <sbruno@freebsd.org>
      Message-id: 20160729160235.64525-1-sbruno@freebsd.org
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      ded554cd
  9. 19 7月, 2016 2 次提交
  10. 20 6月, 2016 1 次提交
    • M
      log: Fix qemu_set_log_filename() error handling · daa76aa4
      Markus Armbruster 提交于
      When qemu_set_log_filename() detects an invalid file name, it reports
      an error, closes the log file (if any), and starts logging to stderr
      (unless daemonized or nothing is being logged).
      
      This is wrong.  Asking for an invalid log file on the command line
      should be fatal.  Asking for one in the monitor should fail without
      messing up an existing logfile.
      
      Fix by converting qemu_set_log_filename() to Error.  Pass it
      &error_fatal, except for hmp_logfile report errors.
      
      This also permits testing without a subprocess, so do that.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Message-Id: <1466011636-6112-4-git-send-email-armbru@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      daa76aa4
  11. 17 6月, 2016 1 次提交
  12. 24 5月, 2016 1 次提交
  13. 19 5月, 2016 2 次提交
  14. 23 3月, 2016 1 次提交
  15. 05 2月, 2016 1 次提交
  16. 03 2月, 2016 1 次提交
  17. 18 12月, 2015 1 次提交
  18. 09 10月, 2015 1 次提交
  19. 25 8月, 2015 1 次提交
  20. 30 7月, 2015 1 次提交
  21. 09 7月, 2015 2 次提交
  22. 05 6月, 2015 1 次提交
  23. 28 4月, 2015 1 次提交
  24. 11 3月, 2015 1 次提交
    • E
      cpu: Make cpu_init() return QOM CPUState object · 2994fd96
      Eduardo Habkost 提交于
      Instead of making cpu_init() return CPUArchState, return CPUState.
      
      Changes were made using the Coccinelle semantic patch below.
      
        @@
        typedef CPUState;
        identifier e;
        expression args;
        type CPUArchState;
        @@
        -   e =
        +   cpu =
                cpu_init(args);
        -   if (!e) {
        +   if (!cpu) {
                ...
            }
        -   cpu = ENV_GET_CPU(env);
        +   e = cpu->env_ptr;
      
        @@
        identifier new_env, new_cpu, env, cpu;
        type CPUArchState;
        expression args;
        @@
        -{
        -   CPUState *cpu = ENV_GET_CPU(env);
        -   CPUArchState *new_env = cpu_init(args);
        -   CPUState *new_cpu = ENV_GET_CPU(new_env);
        +{
        +   CPUState *cpu = ENV_GET_CPU(env);
        +   CPUState *new_cpu = cpu_init(args);
        +   CPUArchState *new_env = new_cpu->env_ptr;
            ...
        }
      
        @@
        identifier c, cpu_init_func, cpu_model;
        type StateType, CPUType;
        @@
        -static inline StateType* cpu_init(const char *cpu_model)
        -{
        -   CPUType *c = cpu_init_func(cpu_model);
        (
        -   if (c == NULL) {
        -       return NULL;
        -   }
        -   return &c->env;
        |
        -   if (c) {
        -       return &c->env;
        -   }
        -   return NULL;
        )
        -}
        +#define cpu_init(cpu_model) CPU(cpu_init_func(cpu_model))
      
        @@
        identifier cpu_init_func;
        identifier model;
        @@
        -#define cpu_init(model) (&cpu_init_func(model)->env)
        +#define cpu_init(model) CPU(cpu_init_func(model))
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      Cc: Blue Swirl <blauwirbel@gmail.com>
      Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
      Cc: Riku Voipio <riku.voipio@iki.fi>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Peter Maydell <peter.maydell@linaro.org>
      Cc: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Michael Walle <michael@walle.cc>
      Cc: Aurelien Jarno <aurelien@aurel32.net>
      Cc: Leon Alrae <leon.alrae@imgtec.com>
      Cc: Anthony Green <green@moxielogic.com>
      Cc: Jia Liu <proljc@gmail.com>
      Cc: Alexander Graf <agraf@suse.de>
      Cc: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
      Cc: Max Filippov <jcmvbkbc@gmail.com>
      [AF: Fixed up cpu_copy() manually]
      Signed-off-by: NAndreas Färber <afaerber@suse.de>
      2994fd96
  25. 02 6月, 2014 1 次提交
    • P
      Revert "bsd-user: replace fprintf(stderr, ...) with error_report()" · 9bb93180
      Peter Maydell 提交于
      This reverts commit 1fba5095.
      
      That commit converted various fprintf(stderr, ...) calls to
      use error_report(); however none of these bsd-user files include
      a header which gives a prototype for error_report, so this
      causes compiler warnings. Since these are just straightforward
      reporting of command line errors, we should handle these in the
      obvious way by printing to stderr, as we do for linux-user.
      There's no need to drag in the error-handling framework for this,
      especially since user-mode doesn't have the "maybe we need to
      send this to the monitor" issues system emulation does.
      Acked-by: NMichael Tokarev <mjt@tls.msk.ru>
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      9bb93180
  26. 26 5月, 2014 1 次提交
  27. 22 5月, 2014 1 次提交
  28. 13 5月, 2014 2 次提交
  29. 14 3月, 2014 1 次提交
  30. 23 7月, 2013 1 次提交
  31. 10 7月, 2013 1 次提交
  32. 28 6月, 2013 1 次提交
  33. 14 6月, 2013 1 次提交
  34. 02 5月, 2013 1 次提交
    • E
      target-i386: Replace cpuid_*features fields with a feature word array · 0514ef2f
      Eduardo Habkost 提交于
      This replaces the feature-bit fields on both X86CPU and x86_def_t
      structs with an array.
      
      With this, we will be able to simplify code that simply does the same
      operation on all feature words (e.g. kvm_check_features_against_host(),
      filter_features_for_kvm(), add_flagname_to_bitmaps(), CPU feature-bit
      property lookup/registration, and the proposed "feature-words" property)
      
      The following field replacements were made on X86CPU and x86_def_t:
      
        (cpuid_)features         -> features[FEAT_1_EDX]
        (cpuid_)ext_features     -> features[FEAT_1_ECX]
        (cpuid_)ext2_features    -> features[FEAT_8000_0001_EDX]
        (cpuid_)ext3_features    -> features[FEAT_8000_0001_ECX]
        (cpuid_)ext4_features    -> features[FEAT_C000_0001_EDX]
        (cpuid_)kvm_features     -> features[FEAT_KVM]
        (cpuid_)svm_features     -> features[FEAT_SVM]
        (cpuid_)7_0_ebx_features -> features[FEAT_7_0_EBX]
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      Reviewed-by: NIgor Mammedov <imammedo@redhat.com>
      Signed-off-by: NAndreas Färber <afaerber@suse.de>
      0514ef2f