From 0966fe8621f4df908210d92e3d2074aa7a186b27 Mon Sep 17 00:00:00 2001 From: Stanislav Shwartsman Date: Tue, 23 Sep 2008 17:33:18 +0000 Subject: [PATCH] Fix corruption when executing WBINVD in SMP --- bochs/cpu/icache.cc | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/bochs/cpu/icache.cc b/bochs/cpu/icache.cc index ad153ef8b..0cbae56fd 100755 --- a/bochs/cpu/icache.cc +++ b/bochs/cpu/icache.cc @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////// -// $Id: icache.cc,v 1.16 2008-08-12 19:25:42 sshwarts Exp $ +// $Id: icache.cc,v 1.17 2008-09-23 17:33:18 sshwarts Exp $ ///////////////////////////////////////////////////////////////////////// // // Copyright (c) 2007 Stanislav Shwartsman @@ -57,22 +57,21 @@ bx_bool BX_CPU_C::fetchInstruction(bxInstruction_c *iStorage, Bit32u eipBiased) bxPageWriteStampTable pageWriteStampTable; -void purgeICaches(void) -{ - for (unsigned i=0; iiCache.purgeICacheEntries(); - - pageWriteStampTable.purgeWriteStamps(); -} - void flushICaches(void) { - for (unsigned i=0; iiCache.flushICacheEntries(); + BX_CPU(i)->async_event |= BX_ASYNC_EVENT_STOP_TRACE; + } pageWriteStampTable.resetWriteStamps(); } +void purgeICaches(void) +{ + flushICaches(); +} + #if BX_SUPPORT_TRACE_CACHE void handleSMC(void)