Avoid redundant TLB flushes (Daniel Jacobowitz).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2211 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
		
							parent
							
								
									b362e5e067
								
							
						
					
					
						commit
						483dcf538e
					
				@ -572,8 +572,17 @@ static void invalidate_tlb (int idx)
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
    tlb_t *tlb;
 | 
					    tlb_t *tlb;
 | 
				
			||||||
    target_ulong addr;
 | 
					    target_ulong addr;
 | 
				
			||||||
 | 
					    uint8_t ASID;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    ASID = env->CP0_EntryHi & 0xFF;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    tlb = &env->tlb[idx];
 | 
					    tlb = &env->tlb[idx];
 | 
				
			||||||
 | 
					    /* The qemu TLB is flushed then the ASID changes, so no need to
 | 
				
			||||||
 | 
					       flush these entries again.  */
 | 
				
			||||||
 | 
					    if (tlb->G == 0 && tlb->ASID != ASID) {
 | 
				
			||||||
 | 
					        return;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (tlb->V0) {
 | 
					    if (tlb->V0) {
 | 
				
			||||||
        tb_invalidate_page_range(tlb->PFN[0], tlb->end - tlb->VPN);
 | 
					        tb_invalidate_page_range(tlb->PFN[0], tlb->end - tlb->VPN);
 | 
				
			||||||
        addr = tlb->VPN;
 | 
					        addr = tlb->VPN;
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user