From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N5CZI-0000sP-An for qemu-devel@nongnu.org; Tue, 03 Nov 2009 01:08:36 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N5CZD-0000rl-Cg for qemu-devel@nongnu.org; Tue, 03 Nov 2009 01:08:35 -0500 Received: from [199.232.76.173] (port=52537 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N5CZD-0000ra-2e for qemu-devel@nongnu.org; Tue, 03 Nov 2009 01:08:31 -0500 Received: from mx1.redhat.com ([209.132.183.28]:40833) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N5CZC-0007w2-HO for qemu-devel@nongnu.org; Tue, 03 Nov 2009 01:08:30 -0500 Message-ID: <4AEFC8D9.6050000@redhat.com> Date: Tue, 03 Nov 2009 08:08:25 +0200 From: Avi Kivity MIME-Version: 1.0 Subject: Re: [Qemu-devel] PC machine types switched to SeaBIOS/gPXE References: <4AEAFE39.1030302@us.ibm.com> <4AEED5EC.8000406@suse.de> <4AEED9D8.2020307@redhat.com> <4AEEDB75.3090100@suse.de> <4AEEDF86.7080009@redhat.com> <20091102135107.GA9856@morn.localdomain> <4AEEE4F8.1020409@redhat.com> <20091103045056.GA13246@morn.localdomain> <6C88F564-1E98-4F82-90F8-99F390927042@suse.de> <4AEFB940.1020201@redhat.com> <20091103060223.GB13492@morn.localdomain> In-Reply-To: <20091103060223.GB13492@morn.localdomain> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin O'Connor Cc: "qemu-devel@nongnu.org" , Gleb Natapov On 11/03/2009 08:02 AM, Kevin O'Connor wrote: > On Tue, Nov 03, 2009 at 07:01:52AM +0200, Avi Kivity wrote: > >> That works too, but if firmware config can use rep/ins, that's one less >> interface we have to add. >> > The following patch to seabios seems to work. I'm not sure if there > are any special implications to qemu. > > -Kevin > > > > --- a/src/paravirt.c > +++ b/src/paravirt.c > @@ -23,8 +23,7 @@ qemu_cfg_select(u16 f) > static void > qemu_cfg_read(u8 *buf, int len) > { > - while (len--) > - *(buf++) = inb(PORT_QEMU_CFG_DATA); > + insb(PORT_QEMU_CFG_DATA, buf, len); > } > Should make sure to use the 32-bit address size version so we use ecx, not cx, in case len doesn't fit in 16 bits. -- Do not meddle in the internals of kernels, for they are subtle and quick to panic.