[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] general question
From: |
Wei-Ren Chen |
Subject: |
Re: [Qemu-devel] general question |
Date: |
Thu, 31 May 2012 17:21:41 +0800 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
> Hmmm, does it?
>
> void helper_invlpg(target_ulong addr)
> {
> helper_svm_check_intercept_param(SVM_EXIT_INVLPG, 0);
> tlb_flush_page(env, addr);
> }
I would be wrong, so let the code speak. ;)
---
void tlb_flush_page(CPUArchState *env, target_ulong addr)
{
if ((addr & env->tlb_flush_mask) == env->tlb_flush_addr) {
tlb_flush(env, 1); --- (1)
return;
}
... snip ...
addr &= TARGET_PAGE_MASK;
i = (addr >> TARGET_PAGE_BITS) & (CPU_TLB_SIZE - 1);
for (mmu_idx = 0; mmu_idx < NB_MMU_MODES; mmu_idx++) {
tlb_flush_entry(&env->tlb_table[mmu_idx][i], addr);
}
tb_flush_jmp_cache(env, addr);
}
---
The comment of tlb_flush (1) says,
QEMU doesn't currently implement a global/not-global flag
for tlb entries, at the moment tlb_flush() will also flush all
tlb entries in the flush_global == false case.
That's why I get impression on QEMU flush the entire tlb. So it could flush
particular tlb entry in tlb_flush_entry?
Regards,
chenwj
--
Wei-Ren Chen (陳韋任)
Computer Systems Lab, Institute of Information Science,
Academia Sinica, Taiwan (R.O.C.)
Tel:886-2-2788-3799 #1667
Homepage: http://people.cs.nctu.edu.tw/~chenwj