Skip to content
Snippets Groups Projects
  1. Feb 25, 2016
  2. Feb 23, 2016
  3. Feb 04, 2016
  4. Feb 03, 2016
  5. Dec 17, 2015
  6. Dec 02, 2015
    • Paolo Bonzini's avatar
      translate-all: ensure host page mask is always extended with 1's · 0c2d70c4
      Paolo Bonzini authored
      
      Anthony reported that >4GB guests on Xen with 32bit QEMU broke after
      commit 4ed023ce ("Round up RAMBlock sizes to host page sizes", 2015-11-05).
      
      In that patch sizes are masked against qemu_host_page_size/mask which
      are uintptr_t, and thus 32bit on a 32bit QEMU, even though the ram space
      might be bigger than 4GB on Xen.
      
      Since ram_addr_t is not available on user-mode emulation targets, ensure
      that we get a sign extension when masking away the low bits of the address.
      Remove the ~10 year old scary comment that the type of these variables
      is probably wrong, with another equally scary comment.  The new comment
      however does not have "???" in it, which is arguably an improvement.
      
      For completeness use the alignment macros in linux-user and bsd-user
      instead of manually doing an &.  linux-user and bsd-user are not affected
      by the Xen issue, however.
      
      Reviewed-by: default avatarJuan Quintela <quintela@redhat.com>
      Reported-by: default avatarAnthony PERARD <anthony.perard@citrix.com>
      Fixes: 4ed023ce
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      0c2d70c4
  7. Oct 08, 2015
  8. Sep 11, 2015
  9. Sep 09, 2015
  10. Aug 24, 2015
  11. Jul 30, 2015
  12. Jul 09, 2015
  13. Jun 05, 2015
  14. Apr 27, 2015
  15. Mar 10, 2015
    • Eduardo Habkost's avatar
      cpu: Make cpu_init() return QOM CPUState object · 2994fd96
      Eduardo Habkost authored
      
      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: default avatarEduardo 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: default avatarAndreas Färber <afaerber@suse.de>
      2994fd96
  16. Jan 20, 2015
  17. Jun 10, 2014
  18. Jun 05, 2014
  19. Jun 02, 2014
    • Peter Maydell's avatar
      Revert "bsd-user: replace fprintf(stderr, ...) with error_report()" · 9bb93180
      Peter Maydell authored
      
      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: default avatarMichael Tokarev <mjt@tls.msk.ru>
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      9bb93180
  20. May 26, 2014
  21. May 21, 2014
  22. May 13, 2014
  23. Mar 13, 2014
  24. Sep 20, 2013
  25. Jul 23, 2013
  26. Jul 09, 2013
  27. Jun 28, 2013
Loading