ia64/xen-unstable

changeset 15804:3805cc382dbe

qemu: Remove mapcache lock - we no longer have multiple threads in core qemu code.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Thu Aug 30 15:35:10 2007 +0100 (2007-08-30)
parents 23bf79231e12
children 8f1c807ace97
files tools/ioemu/Makefile.target tools/ioemu/target-i386-dm/exec-dm.c tools/ioemu/vl.h
line diff
     1.1 --- a/tools/ioemu/Makefile.target	Thu Aug 30 15:00:49 2007 +0100
     1.2 +++ b/tools/ioemu/Makefile.target	Thu Aug 30 15:35:10 2007 +0100
     1.3 @@ -197,7 +197,6 @@ CPPFLAGS+=-D_GNU_SOURCE
     1.4  LIBS+=-lm
     1.5  LIBS+=-L../../libxc -lxenctrl -lxenguest
     1.6  LIBS+=-L../../xenstore -lxenstore
     1.7 -LIBS+=-lpthread
     1.8  ifndef CONFIG_USER_ONLY
     1.9  LIBS+=-lz
    1.10  endif
     2.1 --- a/tools/ioemu/target-i386-dm/exec-dm.c	Thu Aug 30 15:00:49 2007 +0100
     2.2 +++ b/tools/ioemu/target-i386-dm/exec-dm.c	Thu Aug 30 15:35:10 2007 +0100
     2.3 @@ -125,17 +125,10 @@ static int io_mem_nb = 1;
     2.4  FILE *logfile;
     2.5  int loglevel;
     2.6  
     2.7 -#ifdef MAPCACHE
     2.8 -pthread_mutex_t mapcache_mutex;
     2.9 -#endif
    2.10 -
    2.11  void cpu_exec_init(CPUState *env)
    2.12  {
    2.13      CPUState **penv;
    2.14      int cpu_index;
    2.15 -#ifdef MAPCACHE
    2.16 -    pthread_mutexattr_t mxattr; 
    2.17 -#endif
    2.18  
    2.19      env->next_cpu = NULL;
    2.20      penv = &first_cpu;
    2.21 @@ -149,14 +142,6 @@ void cpu_exec_init(CPUState *env)
    2.22  
    2.23      /* alloc dirty bits array */
    2.24      phys_ram_dirty = qemu_malloc(phys_ram_size >> TARGET_PAGE_BITS);
    2.25 -
    2.26 -#ifdef MAPCACHE
    2.27 -    /* setup memory access mutex to protect mapcache */
    2.28 -    pthread_mutexattr_init(&mxattr); 
    2.29 -    pthread_mutexattr_settype(&mxattr, PTHREAD_MUTEX_RECURSIVE);
    2.30 -    pthread_mutex_init(&mapcache_mutex, &mxattr); 
    2.31 -    pthread_mutexattr_destroy(&mxattr); 
    2.32 -#endif
    2.33  }
    2.34  
    2.35  /* enable or disable low levels log */
     3.1 --- a/tools/ioemu/vl.h	Thu Aug 30 15:00:49 2007 +0100
     3.2 +++ b/tools/ioemu/vl.h	Thu Aug 30 15:35:10 2007 +0100
     3.3 @@ -160,26 +160,16 @@ extern FILE *logfile;
     3.4  
     3.5  
     3.6  #if defined(__i386__) || defined(__x86_64__)
     3.7 -
     3.8  #define MAPCACHE
     3.9 -
    3.10  uint8_t *qemu_map_cache(target_phys_addr_t phys_addr);
    3.11  void     qemu_invalidate_map_cache(void);
    3.12 -
    3.13 -#include <pthread.h>
    3.14 -extern  pthread_mutex_t mapcache_mutex;
    3.15 -#define mapcache_lock() pthread_mutex_lock(&mapcache_mutex)
    3.16 -#define mapcache_unlock() pthread_mutex_unlock(&mapcache_mutex)
    3.17 -
    3.18  #else 
    3.19 -
    3.20  #define qemu_invalidate_map_cache() ((void)0)
    3.21 +#endif
    3.22  
    3.23  #define mapcache_lock()   ((void)0)
    3.24  #define mapcache_unlock() ((void)0)
    3.25  
    3.26 -#endif
    3.27 -
    3.28  extern int xc_handle;
    3.29  extern int domid;
    3.30