Skip to contentSkip to conversation

Question about softmmu

Qemu-devel olivier cozette 2 participants 2 messages Nov 7, 2004 – Nov 8, 2004

lore
Share & tools
lore
#0 lore raw

Hello,

Quoted 6 lines

I'm reading the QEMU code. I have a question haunting my mind for some time about tb flushing due to MMU change. Generally, whenever the page table has any change, we should flush the tb hash table. But I only see in the code that when CR3 is changed, the tb_flush is called. What if the CR3 does not change, but some level 2 page table in the memory change, should the tb also be flushed?

In this case, in the real processor (see Intel Manual), the processor TLBs (it's like the Qemu tb) are not flushed, so Qemu act as a real processor.

Olivier

#1 lore raw

Another related question Re: [Qemu-devel] Question about softmmu

Thanks Olivier.

Another question:
When translating instructions that access PC, e.g. move pc to register, actually the PC value at translation time is used. This causes a problem that if the address mapping changes later, this translated basic block is still using the old PC value. Is it right? How does QEMU deal with it? Or is it completely impossible?

Thanks,
Ye

Quoting olivier cozette <[email protected]>:

Quoted 16 lines

Hello,

Quoted 3 lines

I'm reading the QEMU code. I have a question haunting my mind for some time about tb flushing due to MMU change. Generally, whenever the page table has any change, we should flush the tb hash table. But I only see in the code

that

Quoted 1 line

when CR3 is changed, the tb_flush is called. What if the CR3 does not

change,

Quoted 2 lines

but some level 2 page table in the memory change, should the tb also be flushed?

In this case, in the real processor (see Intel Manual), the processor TLBs (it's
like the Qemu tb) are not flushed, so Qemu act as a real processor.

Quoted 8 lines

Olivier

_______________________________________________
Qemu-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/qemu-devel

--
Ye Wen
[email protected]