Commit 80e1b265f4505149ba256ab6e18be942830072d0

Authored by edgar_igl
1 parent bf91ada5

CRIS: Dont flush kernel protected pages when modifying $pid.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6161 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 2 additions and 5 deletions
target-cris/mmu.c
@@ -295,7 +295,7 @@ void cris_mmu_flush_pid(CPUState *env, uint32_t pid) @@ -295,7 +295,7 @@ void cris_mmu_flush_pid(CPUState *env, uint32_t pid)
295 unsigned int idx; 295 unsigned int idx;
296 uint32_t lo, hi; 296 uint32_t lo, hi;
297 uint32_t tlb_vpn; 297 uint32_t tlb_vpn;
298 - int tlb_pid, tlb_g, tlb_v, tlb_k; 298 + int tlb_pid, tlb_g, tlb_v;
299 unsigned int set; 299 unsigned int set;
300 unsigned int mmu; 300 unsigned int mmu;
301 301
@@ -311,11 +311,8 @@ void cris_mmu_flush_pid(CPUState *env, uint32_t pid) @@ -311,11 +311,8 @@ void cris_mmu_flush_pid(CPUState *env, uint32_t pid)
311 tlb_pid = EXTRACT_FIELD(hi, 0, 7); 311 tlb_pid = EXTRACT_FIELD(hi, 0, 7);
312 tlb_g = EXTRACT_FIELD(lo, 4, 4); 312 tlb_g = EXTRACT_FIELD(lo, 4, 4);
313 tlb_v = EXTRACT_FIELD(lo, 3, 3); 313 tlb_v = EXTRACT_FIELD(lo, 3, 3);
314 - tlb_k = EXTRACT_FIELD(lo, 2, 2);  
315 314
316 - /* Kernel protected areas need to be flushed  
317 - as well. */  
318 - if (tlb_v && !tlb_g && (tlb_pid == pid || tlb_k)) { 315 + if (tlb_v && !tlb_g && (tlb_pid == pid)) {
319 vaddr = tlb_vpn << TARGET_PAGE_BITS; 316 vaddr = tlb_vpn << TARGET_PAGE_BITS;
320 D(fprintf(logfile, 317 D(fprintf(logfile,
321 "flush pid=%x vaddr=%x\n", 318 "flush pid=%x vaddr=%x\n",