From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] (big) real mode emulation - initialization fixes Date: Fri, 14 Sep 2007 20:42:19 +0300 Message-ID: <46EAC7FB.60207@qumranet.com> References: <1188349132.9270.7.camel@lnitindesktop.sc.intel.com> <46E79B2A.60506@qumranet.com> <46E7A073.6030601@bull.net> <46E7A317.208@qumranet.com> <47DF6B76DC88174EB18F2393E76FC46EB20712F4@scsmsx412.amr.corp.intel.com> <1189707324.28738.0.camel@lnitindesktop.sc.intel.com> <1189709705.28738.9.camel@lnitindesktop.sc.intel.com> <1189725509.28738.12.camel@lnitindesktop.sc.intel.com> <1189725983.28738.15.camel@lnitindesktop.sc.intel.com> <1189726560.28738.18.camel@lnitindesktop.sc.intel.com> <1189727241.28738.21.camel@lnitindesktop.sc.intel.com> <1189727640.28738.24.camel@lnitindesktop.sc.intel.com> <1189728138.28738.27.camel@lnitindesktop.sc.intel.com> <1189728902.28738.31.camel@lnitindesktop.sc.intel.com> <1189729357.28738.33.camel@lnitindesktop.sc.intel.com> <46EAC01F.7040609@qumranet.com> <1189791233.28738.42.camel@lnitindesktop.sc.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel , Laurent Vivier To: nitin.a.kamble-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org Return-path: In-Reply-To: <1189791233.28738.42.camel-mpPvwfgnXtFHIUuj5cj4Omt3HXsI98Cx0E9HWUfgJXw@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 Nitin A Kamble wrote: > On Fri, 2007-09-14 at 10:08 -0700, Avi Kivity wrote: > >> This seems like it is papering over other bugs. Some instructions use >> src.val or dst.val without having decoded the src or dst operand. >> >> Which instructions are these? Can we fix them instead? >> > > Instructions using 8bit operands such as al, ah are affected. > Especially utilizing signed operands. By not using this initialization > these operands are getting wrong value from remaining stale bits. > > I see. SrcMem decode does ->read_emulated() into src.val, leaving stale bits. I agree your patch is the best way to fix it. -- Do not meddle in the internals of kernels, for they are subtle and quick to panic. ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/