[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Help on TLB Flush
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] Help on TLB Flush |
Date: |
Fri, 13 Feb 2015 07:24:57 +0000 |
On 13 February 2015 at 07:16, Mark Burton <address@hidden> wrote:
> If the kernel is doing this - then effectively - for X86, each CPU only
> flush’s it’s own TLB (from the perspective of Qemu) - correct?
> (in which case, for Qemu itself - for x86) - we dont need to implement
> a global flush, and hence we dont need to build the mechanism to sync ?
The semantics you need are "flush the QEMU TLB for CPU X" (where
X may not be the CPU you're running on). This is what tlb_flush()
does: it takes a CPU argument to act on. (Ditto tlb_flush_page, etc.)
We then use that to implement the target's required semantics
(eg in ARM the tlbiall_is_write() function is handled by iterating
through all CPUs and calling tlb_flush on them).
If you don't want the pain of checking the semantics of every
backend and figuring out a new set of primitives to implement,
then what you need to do is continue to provide the guarantees
the current tlb_flush function does: when it returns then the
CPU it's supposed to have acted on has definitely done so.
You can try and be cleverer if you want to, but personally
I would recommend keeping the scope of your work simple
where you can.
-- PMM
- [Qemu-devel] Help on TLB Flush, Mark Burton, 2015/02/12
- Re: [Qemu-devel] Help on TLB Flush, Alexander Graf, 2015/02/12
- Re: [Qemu-devel] Help on TLB Flush, Peter Maydell, 2015/02/12
- Re: [Qemu-devel] Help on TLB Flush, Alexander Graf, 2015/02/12
- Re: [Qemu-devel] Help on TLB Flush, Mark Burton, 2015/02/12
- Re: [Qemu-devel] Help on TLB Flush, Lluís Vilanova, 2015/02/12
- Re: [Qemu-devel] Help on TLB Flush, Mark Burton, 2015/02/13
- Re: [Qemu-devel] Help on TLB Flush,
Peter Maydell <=
- Re: [Qemu-devel] Help on TLB Flush, Mark Burton, 2015/02/13
- Re: [Qemu-devel] Help on TLB Flush, Lluís Vilanova, 2015/02/13
- Re: [Qemu-devel] Help on TLB Flush, Mark Burton, 2015/02/13
- Re: [Qemu-devel] Help on TLB Flush, Peter Maydell, 2015/02/12
Re: [Qemu-devel] Help on TLB Flush, Peter Maydell, 2015/02/12
- Re: [Qemu-devel] Help on TLB Flush, Mark Burton, 2015/02/12
- Re: [Qemu-devel] Help on TLB Flush, Alexander Graf, 2015/02/12
- Re: [Qemu-devel] Help on TLB Flush, Peter Maydell, 2015/02/12
- Re: [Qemu-devel] Help on TLB Flush, Paolo Bonzini, 2015/02/13
- Re: [Qemu-devel] Help on TLB Flush, Mark Burton, 2015/02/13