From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH RESEND] KVM: when entering real mode align segment base to 16 bytes Date: Mon, 27 Dec 2010 17:15:51 +0200 Message-ID: <4D18ADA7.1080402@redhat.com> References: <20101227130110.GK2231@redhat.com> <4D18A101.90407@redhat.com> <20101227143727.GN2231@redhat.com> <4D18A8CC.7010500@redhat.com> <20101227145842.GO2231@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: mtosatti@redhat.com, kvm@vger.kernel.org To: Gleb Natapov Return-path: Received: from mx1.redhat.com ([209.132.183.28]:62805 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754022Ab0L0PPy (ORCPT ); Mon, 27 Dec 2010 10:15:54 -0500 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id oBRFFsRI023799 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 27 Dec 2010 10:15:54 -0500 In-Reply-To: <20101227145842.GO2231@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 12/27/2010 04:58 PM, Gleb Natapov wrote: > On Mon, Dec 27, 2010 at 04:55:08PM +0200, Avi Kivity wrote: > > On 12/27/2010 04:37 PM, Gleb Natapov wrote: > > >> What's the scenario here? And what segment is involved? if it's fs > > >> or gs, or maybe ss, I can see it working out, but hardly otherwise. > > >> > > >The scenario is older Seabios that lefts DS segment unaligned during > > >switch to real mode in int1587 function (copy extended memory). > > > > > > > Did it not use %ds then? > > > It restores %ds before first use. There can be other guests of course > that try to use %ds in protected mode. We can distinguish one from the > other. Okay. Please add a printk_once() if we lose some bits here, so we know something bad happened. In theory we should do this for the other cases too, but they have been there long enough. -- error compiling committee.c: too many arguments to function