[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 03/23] cputlb: handle first atomic write to the page
From: |
David Gibson |
Subject: |
[Qemu-devel] [PULL 03/23] cputlb: handle first atomic write to the page |
Date: |
Thu, 11 May 2017 14:14:06 +1000 |
From: Nikunj A Dadhania <address@hidden>
In case where the conditional write is the first write to the page,
TLB_NOTDIRTY will be set and stop_the_world is triggered. Handle this as
a special case and set the dirty bit. After that fall through to the
actual atomic instruction below.
Signed-off-by: Nikunj A Dadhania <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
cputlb.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/cputlb.c b/cputlb.c
index f5d056c..743776a 100644
--- a/cputlb.c
+++ b/cputlb.c
@@ -930,7 +930,13 @@ static void *atomic_mmu_lookup(CPUArchState *env,
target_ulong addr,
tlb_addr = tlbe->addr_write;
}
- /* Notice an IO access, or a notdirty page. */
+ /* Check notdirty */
+ if (unlikely(tlb_addr & TLB_NOTDIRTY)) {
+ tlb_set_dirty(ENV_GET_CPU(env), addr);
+ tlb_addr = tlb_addr & ~TLB_NOTDIRTY;
+ }
+
+ /* Notice an IO access */
if (unlikely(tlb_addr & ~TARGET_PAGE_MASK)) {
/* There's really nothing that can be done to
support this apart from stop-the-world. */
--
2.9.3
- [Qemu-devel] [PULL 00/23] ppc-for-2.10 queue 20170511, David Gibson, 2017/05/11
- [Qemu-devel] [PULL 03/23] cputlb: handle first atomic write to the page,
David Gibson <=
- [Qemu-devel] [PULL 02/23] target/ppc: Emulate LL/SC using cmpxchg helpers, David Gibson, 2017/05/11
- [Qemu-devel] [PULL 04/23] target/ppc: Generate fence operations, David Gibson, 2017/05/11
- [Qemu-devel] [PULL 01/23] ppc/pnv: restrict BMC object to the BMC simulator, David Gibson, 2017/05/11
- [Qemu-devel] [PULL 09/23] ppc/xics: preserve P and Q bits for KVM IRQs, David Gibson, 2017/05/11
- [Qemu-devel] [PULL 06/23] tcg: enable MTTCG by default for PPC64 on x86, David Gibson, 2017/05/11
- [Qemu-devel] [PULL 12/23] ppc: add qemu_vga.ndrv ROM to fw_cfg interface for OldWorld Macs, David Gibson, 2017/05/11
- [Qemu-devel] [PULL 07/23] target/ppc: do not reset reserve_addr in exec_enter, David Gibson, 2017/05/11
- [Qemu-devel] [PULL 15/23] target/ppc: Update tlbie to check privilege level based on GTSE, David Gibson, 2017/05/11
- [Qemu-devel] [PULL 05/23] cpus: Fix CPU unplug for MTTCG, David Gibson, 2017/05/11
- [Qemu-devel] [PULL 08/23] ppc/xics: Fix stale irq->status bits after get, David Gibson, 2017/05/11