From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 1/2] kvm: Fix x86 emulator writeback Date: Mon, 18 Jun 2007 14:32:39 +0300 Message-ID: <46766D57.8040206@qumranet.com> References: <20070613204948.GA14710@dreamland.darkstar.lan> <4670FBB5.70707@qumranet.com> <20070614225324.GA4088@dreamland.darkstar.lan> <20070614231359.GA5705@dreamland.darkstar.lan> <68676e00706141627s3cb87391sa0ee6711d2f7933f@mail.gmail.com> <467256AA.1040001@qumranet.com> <20070615214915.GA10536@dreamland.darkstar.lan> <4673949B.1070505@qumranet.com> <20070617151452.GA21971@dreamland.darkstar.lan> <4675523C.9020703@qumranet.com> <20070617165201.GA23885@dreamland.darkstar.lan> <46765954.60102@qumranet.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Luca Tettamanti Return-path: In-Reply-To: <46765954.60102-atKUWr5tajBWk0Htik3J/w@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org Avi Kivity wrote: > Luca Tettamanti wrote: >> When the old value and new one are the same the emulator skips the >> write; this is undesiderable when the destination is a MMIO area and the >> write shall be performed regardless of the previous value. This >> optimization breaks e.g. a Linux guest APIC compiled without >> X86_GOOD_APIC. >> >> Remove the check and always perform the writeback stage in the >> emulation. >> >> > > Unfortunately, this kills Windows XP (first run with a guest crash, > second with a host oops), so I reverted it. I'd guess some operation > which doesn't need writeback ends up in the modified code. > Previously, the check caused it to skip writeback, but now it writes > back random memory, causing a crash. > There are comments around like > /* Disable writeback. */ > dst.orig_val = dst.val; Best option is probably to add an explicit disable_writeback flag and set it there. -- error compiling committee.c: too many arguments to function ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/