Diff for /qemu/kqemu.c between versions 1.1.1.2 and 1.1.1.3

version 1.1.1.2, 2018/04/24 16:40:30 version 1.1.1.3, 2018/04/24 16:42:32
Line 119  static int is_cpuid_supported(void) Line 119  static int is_cpuid_supported(void)
   
 static void kqemu_update_cpuid(CPUState *env)  static void kqemu_update_cpuid(CPUState *env)
 {  {
     int critical_features_mask, features;      int critical_features_mask, features, ext_features, ext_features_mask;
     uint32_t eax, ebx, ecx, edx;      uint32_t eax, ebx, ecx, edx;
   
     /* the following features are kept identical on the host and      /* the following features are kept identical on the host and
Line 130  static void kqemu_update_cpuid(CPUState  Line 130  static void kqemu_update_cpuid(CPUState 
         CPUID_CMOV | CPUID_CX8 |           CPUID_CMOV | CPUID_CX8 | 
         CPUID_FXSR | CPUID_MMX | CPUID_SSE |           CPUID_FXSR | CPUID_MMX | CPUID_SSE | 
         CPUID_SSE2 | CPUID_SEP;          CPUID_SSE2 | CPUID_SEP;
       ext_features_mask = CPUID_EXT_SSE3 | CPUID_EXT_MONITOR;
     if (!is_cpuid_supported()) {      if (!is_cpuid_supported()) {
         features = 0;          features = 0;
           ext_features = 0;
     } else {      } else {
         cpuid(1, eax, ebx, ecx, edx);          cpuid(1, eax, ebx, ecx, edx);
         features = edx;          features = edx;
           ext_features = ecx;
     }      }
 #ifdef __x86_64__  #ifdef __x86_64__
     /* NOTE: on x86_64 CPUs, SYSENTER is not supported in      /* NOTE: on x86_64 CPUs, SYSENTER is not supported in
Line 144  static void kqemu_update_cpuid(CPUState  Line 147  static void kqemu_update_cpuid(CPUState 
 #endif  #endif
     env->cpuid_features = (env->cpuid_features & ~critical_features_mask) |      env->cpuid_features = (env->cpuid_features & ~critical_features_mask) |
         (features & critical_features_mask);          (features & critical_features_mask);
       env->cpuid_ext_features = (env->cpuid_ext_features & ~ext_features_mask) |
           (ext_features & ext_features_mask);
     /* XXX: we could update more of the target CPUID state so that the      /* XXX: we could update more of the target CPUID state so that the
        non accelerated code sees exactly the same CPU features as the         non accelerated code sees exactly the same CPU features as the
        accelerated code */         accelerated code */
Line 598  void kqemu_record_dump(void) Line 603  void kqemu_record_dump(void)
         perror("/tmp/kqemu.stats");          perror("/tmp/kqemu.stats");
         exit(1);          exit(1);
     }      }
     fprintf(f, "total: %lld\n", total);      fprintf(f, "total: %" PRId64 "\n", total);
     sum = 0;      sum = 0;
     for(i = 0; i < nb_pc_records; i++) {      for(i = 0; i < nb_pc_records; i++) {
         r = pr[i];          r = pr[i];
         sum += r->count;          sum += r->count;
         fprintf(f, "%08lx: %lld %0.2f%% %0.2f%%\n",           fprintf(f, "%08lx: %" PRId64 " %0.2f%% %0.2f%%\n", 
                 r->pc,                   r->pc, 
                 r->count,                   r->count, 
                 (double)r->count / (double)total * 100.0,                  (double)r->count / (double)total * 100.0,

Removed from v.1.1.1.2  
changed lines
  Added in v.1.1.1.3


unix.superglobalmegacorp.com