1. 07 10月, 2015 1 次提交
  2. 28 9月, 2015 5 次提交
  3. 21 9月, 2015 1 次提交
    • A
      target-ppc: Fix SRR0 when taking unaligned exceptions · 6bb9a0a9
      Anton Blanchard 提交于
      We are setting SRR0 to the instruction before the one causing the
      unaligned exception. A quick testcase:
      
      . = 0x100
      .globl _start
      _start:
      	/* Cause a 0x600 */
      	li	3,0x1
      	stwcx.	3,0,3
      1:	b	1b
      
      . = 0x600
      1:	b	1b
      
      Built into something we can load as a BIOS image:
      
      gcc -mbig -c test.S
      ld -EB -Ttext 0x0 -o test test.o
      objcopy -O binary test test.bin
      
      Run with:
      
      qemu-system-ppc64 -nographic -bios test.bin
      
      Shows an incorrect SRR0 (points at the li):
      
      SRR0 0000000000000100
      
      With the patch we get the correct SRR0:
      
      SRR0 0000000000000104
      Signed-off-by: NAnton Blanchard <anton@samba.org>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      6bb9a0a9
  4. 15 9月, 2015 3 次提交
  5. 11 9月, 2015 1 次提交
  6. 09 9月, 2015 1 次提交
  7. 07 9月, 2015 1 次提交
  8. 25 8月, 2015 1 次提交
  9. 15 7月, 2015 1 次提交
  10. 09 7月, 2015 2 次提交
  11. 07 7月, 2015 1 次提交
    • L
      linux-user, ppc: mftbl can be used by user application · 7d6b1dae
      Laurent Vivier 提交于
      In qemu-linux-user, when calling gethostbyname2(),
      it was hanging in .__res_nmkquery.
      
      (gdb) bt
      0 in .__res_nmkquery () from /lib64/libresolv.so.2
      1 in .__libc_res_nquery () from /lib64/libresolv.so.2
      2 in .__libc_res_nsearch () from /lib64/libresolv.so.2
      3 in ._nss_dns_gethostbyname3_r () from /lib64/libnss_dns.so.2
      4 in ._nss_dns_gethostbyname2_r () from /lib64/libnss_dns.so.2
      5 in .gethostbyname2_r () from /lib64/libc.so.6
      6 in .gethostbyname2 () from /lib64/libc.so.6
      
      .__res_nmkquery() is:
      
      ...
      do { RANDOM_BITS (randombits); } while ((randombits & 0xffff) == 0);
      ...
      
      <.__res_nmkquery+112>:	mftbl   r11
      <.__res_nmkquery+116>:	clrlwi  r10,r11,16
      <.__res_nmkquery+120>:	cmpwi   cr7,r10,0
      <.__res_nmkquery+124>:	beq     cr7,<.__res_nmkquery+112>
      
      but as mftbl (Move From Time Base Lower) is not implemented,
      r11 is always 0, so we have an infinite loop.
      
      This patch fills the Time Base register with cpu_get_real_ticks().
      Signed-off-by: NLaurent Vivier <laurent@vivier.eu>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      7d6b1dae
  12. 16 6月, 2015 1 次提交
  13. 12 6月, 2015 1 次提交
  14. 05 6月, 2015 1 次提交
  15. 28 4月, 2015 1 次提交
  16. 23 3月, 2015 1 次提交
  17. 22 3月, 2015 1 次提交
  18. 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
  19. 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
  20. 03 3月, 2015 1 次提交
  21. 26 2月, 2015 1 次提交
  22. 10 2月, 2015 1 次提交
  23. 28 1月, 2015 2 次提交
  24. 20 1月, 2015 2 次提交
  25. 16 12月, 2014 1 次提交
  26. 11 12月, 2014 1 次提交
  27. 03 11月, 2014 2 次提交
  28. 12 9月, 2014 1 次提交
  29. 22 8月, 2014 1 次提交
  30. 08 7月, 2014 1 次提交