1. 12 6月, 2015 1 次提交
  2. 05 6月, 2015 1 次提交
  3. 28 4月, 2015 1 次提交
  4. 23 3月, 2015 1 次提交
  5. 22 3月, 2015 1 次提交
  6. 16 3月, 2015 1 次提交
    • M
      linux-user: Access correct register for get/set_tls syscalls on ARM TZ CPUs · b8d43285
      Mikhail Ilyin 提交于
      When support was added for TrustZone to ARM CPU emulation, we failed
      to correctly update the support for the linux-user implementation of
      the get/set_tls syscalls. This meant that accesses to the TPIDRURO
      register via the syscalls were always using the non-secure copy of
      the register even if native MRC/MCR accesses were using the secure
      register. This inconsistency caused most binaries to segfault on startup
      if the CPU type was explicitly set to one of the TZ-enabled ones like
      cortex-a15. (The default "any" CPU doesn't have TZ enabled and so is
      not affected.)
      
      Use access_secure_reg() to determine whether we should be using
      the secure or the nonsecure copy of TPIDRURO when emulating these
      syscalls.
      Signed-off-by: NMikhail Ilyin <m.ilin@samsung.com>
      Message-id: 1426505198-2411-1-git-send-email-m.ilin@samsung.com
      [PMM: rewrote commit message to more clearly explain the issue
       and its consequences.]
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      b8d43285
  7. 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
  8. 03 3月, 2015 1 次提交
  9. 26 2月, 2015 1 次提交
  10. 10 2月, 2015 1 次提交
  11. 28 1月, 2015 2 次提交
  12. 20 1月, 2015 2 次提交
  13. 16 12月, 2014 1 次提交
  14. 11 12月, 2014 1 次提交
  15. 03 11月, 2014 2 次提交
  16. 12 9月, 2014 1 次提交
  17. 22 8月, 2014 1 次提交
  18. 08 7月, 2014 1 次提交
  19. 25 6月, 2014 1 次提交
  20. 23 6月, 2014 2 次提交
  21. 16 6月, 2014 2 次提交
  22. 22 5月, 2014 1 次提交
  23. 13 5月, 2014 1 次提交
  24. 03 5月, 2014 1 次提交
    • R
      linux-user: remove configure option for setting uname release · e586822a
      Riku Voipio 提交于
      --enable-uname-release was a rather heavyweight hammer, as it allows
      providing values less that UNAME_MINIMUM_RELEASE. Also, it affects
      all built linux-user targets, which in most cases is not what user
      wants.
      
      Now that we have UNAME_MINIMUM_RELEASE for all linux-user platforms,
      we can drop --enable-uname-release and the related CONFIG_UNAME_RELEASE
      define.
      
      Users can still override the variable with QEMU_UNAME=2.6.32 or -r
      command line option. If distributors need to update a minimum version
      for a specific target, it can be done by updating UNAME_MINIMUM_RELEASE.
      Signed-off-by: NRiku Voipio <riku.voipio@linaro.org>
      e586822a
  25. 18 4月, 2014 1 次提交
    • P
      target-arm: Define exception record for AArch64 exceptions · abf1172f
      Peter Maydell 提交于
      For AArch32 exceptions, the only information provided about
      the cause of an exception is the individual exception type (data
      abort, undef, etc), which we store in cs->exception_index. For
      AArch64, the CPU provides much more detail about the cause of
      the exception, which can be found in the syndrome register.
      Create a set of fields in CPUARMState which must be filled in
      whenever an exception is raised, so that exception entry can
      correctly fill in the syndrome register for the guest.
      This includes the information which in AArch32 appears in
      the DFAR and IFAR (fault address registers) and the DFSR
      and IFSR (fault status registers) for data aborts and
      prefetch aborts, since if we end up taking the MMU fault
      to AArch64 rather than AArch32 this will need to end up
      in different system registers.
      
      This patch does a refactoring which moves the setting of the
      AArch32 DFAR/DFSR/IFAR/IFSR from the point where the exception
      is raised to the point where it is taken. (This is no change
      for cores with an MMU, retains the existing clearly incorrect
      behaviour for ARM946 of trashing the MP access permissions
      registers which share the c5_data and c5_insn state fields,
      and has no effect for v7M because we don't implement its
      MPU fault status or address registers.)
      
      As a side effect of the cleanup we fix a bug in the AArch64
      linux-user mode code where we were passing a 64 bit fault
      address through the 32 bit c6_data/c6_insn fields: it now
      goes via the always-64-bit exception.vaddress.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NPeter Crosthwaite <peter.crosthwaite@xilinx.com>
      abf1172f
  26. 14 3月, 2014 6 次提交
  27. 05 3月, 2014 1 次提交
  28. 04 3月, 2014 1 次提交
  29. 20 2月, 2014 1 次提交
  30. 09 1月, 2014 1 次提交
    • M
      target-arm: A64: support for ld/st/cl exclusive · fa2ef212
      Michael Matz 提交于
      This implement exclusive loads/stores for aarch64 along the lines of
      arm32 and ppc implementations. The exclusive load remembers the address
      and loaded value. The exclusive store throws an an exception which uses
      those values to check for equality in a proper exclusive region.
      
      This is not actually the architecture mandated semantics (for either
      AArch32 or AArch64) but it is close enough for typical guest code
      sequences to work correctly, and saves us from having to monitor all
      guest stores. It's fairly easy to come up with test cases where we
      don't behave like hardware - we don't for example model cache line
      behaviour. However in the common patterns this works, and the existing
      32 bit ARM exclusive access implementation has the same limitations.
      
      AArch64 also implements new acquire/release loads/stores (which may be
      either exclusive or non-exclusive). These imposes extra ordering
      constraints on memory operations (ie they act as if they have an implicit
      barrier built into them). As TCG is single-threaded all our barriers
      are no-ops, so these just behave like normal loads and stores.
      Signed-off-by: NMichael Matz <matz@suse.de>
      Signed-off-by: NAlex Bennée <alex.bennee@linaro.org>
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NRichard Henderson <rth@twiddle.net>
      fa2ef212