From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: Re: [RFC] Patch - Big real mode emulation Date: Wed, 21 May 2008 13:18:05 -0300 Message-ID: <20080521161805.GA9298@dmt> References: <20080521113410.43ec182f@frecb000711.frec.bull.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org, Avi Kivity , Anthony Liguori , Mohammed Gamal , "Kamble, Nitin A" , Alexander Graf To: Guillaume Thouvenin Return-path: Received: from mx1.redhat.com ([66.187.233.31]:50322 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759172AbYEUQQB (ORCPT ); Wed, 21 May 2008 12:16:01 -0400 Content-Disposition: inline In-Reply-To: <20080521113410.43ec182f@frecb000711.frec.bull.fr> Sender: kvm-owner@vger.kernel.org List-ID: Hi Guillaume, On Wed, May 21, 2008 at 11:34:10AM +0200, Guillaume Thouvenin wrote: > Hello, > > Opensuse 10.3 is it uses a version of gfxboot that reads SS after > switching from real to protected mode, where SS contains an invalid > value, which VMX does not allow. So this patch > add: /* add */ > + if ((c->d & ModRM) && c->modrm_mod == 3) { > + c->dst.bytes = (c->d & ByteOp) ? 1 : c->op_bytes; > + c->dst.ptr = decode_register(c->modrm_rm, c->regs, c->d & ByteOp); > + } > emulate_2op_SrcV("add", c->src, c->dst, ctxt->eflags); > break; I don't see any difference from the previous patch here (on the issue that add result was stored in the wrong register) ? 6486: 66 64 89 3e 72 01 mov %edi,%fs:0x172 648c: 66 be 8d 03 00 00 mov $0x38d,%esi 6492: 66 c1 e6 04 shl $0x4,%esi 6496: 66 b8 98 0a 00 00 mov $0xa98,%eax 649c: 66 03 f0 add %eax,%esi So "66 03 f0" stores result in eax instead of esi. And of course this can be fatal (in the FreeDOS case the TSS data was copied to a wrong location). Better fix that before merging. Thanks!