vbox的更動 18598 路徑 trunk/src/recompiler_new
- 時間撮記:
- 2009-4-1 下午02:38:44 (16 年 以前)
- 檔案:
-
- 修改 1 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/recompiler_new/exec.c
r18597 r18598 185 185 #endif 186 186 #ifdef VBOX 187 /* Note: Not for PhysPageDesc, only to speed up page_flush_tb. */188 187 #define L0_BITS (TARGET_PHYS_ADDR_SPACE_BITS - 32) 189 188 #endif … … 205 204 #ifndef VBOX 206 205 static PageDesc *l1_map[L1_SIZE]; 207 #else 208 static l0_map_max_used = 0; 206 static PhysPageDesc **l1_phys_map; 207 #else 208 static unsigned l0_map_max_used = 0; 209 209 static PageDesc **l0_map[L0_SIZE]; 210 #endif 211 static PhysPageDesc **l1_phys_map; 210 static void **l0_phys_map[L0_SIZE]; 211 #endif 212 212 213 213 #if !defined(CONFIG_USER_ONLY) … … 320 320 qemu_host_page_bits++; 321 321 qemu_host_page_mask = ~(qemu_host_page_size - 1); 322 #ifndef VBOX 322 323 l1_phys_map = qemu_vmalloc(L1_SIZE * sizeof(void *)); 323 324 memset(l1_phys_map, 0, L1_SIZE * sizeof(void *)); 325 #endif 324 326 #ifdef VBOX 325 327 /* We use other means to set reserved bit on our pages */ … … 446 448 PhysPageDesc *pd; 447 449 450 #ifndef VBOX 448 451 p = (void **)l1_phys_map; 449 452 #if TARGET_PHYS_ADDR_SPACE_BITS > 32 … … 463 466 } 464 467 #endif 468 #else /* VBOX */ 469 /* level 0 lookup and lazy allocation. */ 470 if (RT_UNLIKELY(index >= (target_ulong)L2_SIZE * L1_SIZE * L0_SIZE)) 471 return NULL; 472 p = l0_phys_map[index >> (L1_BITS + L2_BITS)]; 473 if (RT_UNLIKELY(!p)) { 474 if (!alloc) 475 return NULL; 476 p = qemu_vmalloc(sizeof(PhysPageDesc **) * L0_SIZE); 477 memset(p, 0, sizeof(PhysPageDesc **) * L0_SIZE); 478 l0_phys_map[index >> (L1_BITS + L2_BITS)] = (PhysPageDesc **)p; 479 } 480 481 /* level 1 lookup and lazy allocation. */ 482 #endif /* VBOX */ 465 483 lp = p + ((index >> L2_BITS) & (L1_SIZE - 1)); 466 484 pd = *lp;
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器