Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751295AbWCOXec (ORCPT ); Wed, 15 Mar 2006 18:34:32 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752165AbWCOXec (ORCPT ); Wed, 15 Mar 2006 18:34:32 -0500 Received: from mailout1.vmware.com ([65.113.40.130]:40970 "EHLO mailout1.vmware.com") by vger.kernel.org with ESMTP id S1751295AbWCOXeb (ORCPT ); Wed, 15 Mar 2006 18:34:31 -0500 Message-ID: <4418A486.2010409@vmware.com> Date: Wed, 15 Mar 2006 15:34:30 -0800 From: Zachary Amsden User-Agent: Thunderbird 1.5 (X11/20051201) MIME-Version: 1.0 To: "Eric W. Biederman" Cc: Linus Torvalds , Linux Kernel Mailing List , Virtualization Mailing List , Xen-devel , Andrew Morton , Dan Hecht , Dan Arai , Anne Holler , Pratap Subrahmanyam , Christopher Li , Joshua LeVasseur , Chris Wright , Rik Van Riel , Jyothy Reddy , Jack Lo , Kip Macy , Jan Beulich , Ky Srinivasan , Wim Coekaerts , Leendert van Doorn Subject: Re: [RFC, PATCH 16/24] i386 Vmi io header References: <200603131811.k2DIBS8j005741@zach-dev.vmware.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2156 Lines: 43 Eric W. Biederman wrote: > Zachary Amsden writes: > > >> Move I/O instruction building to the sub-arch layer. Some very crafty >> but esoteric macros are used here to get optimized native instructions >> for port I/O in Linux be writing raw instruction strings. Adding a >> wrapper layer here is fairly easy, and makes the full range of I/O >> instructions available to the VMI interface. >> >> Also, slowing down I/O is not a useful operation in a VM, so there >> is a VMI call specifically to allow making it a NOP. I could find >> no place where SLOW_IO_BY_JUMPING is still used, and consider it >> obsoleted. Even on older 386 systems, the I/O delay approximation >> by touching the extra page register is likely to better. >> > > This sounds like a prime candidate for the alternate instruction interfaces > and I don't see that being used here. The problem is that floppy controllers and other crufty hardware actually do need those slowing port operations to work reliably. If you look at the usage of slow_down_io, you get scared pretty quick. If you want your driver to use it, you have the option of defining REALLY_SLOW_IO in your C file, then suffix your I/O calls with _p. The definition of SLOW_DOWN_IO actually used to be raw assembly instructions encapsulated in quotations. I just realized this does actually change the semantics of drivers/net/de600.c, which really is the only driver which defines SLOW_IO_BY_JUMPING. This usage of predefined macros in the driver causing port I/O semantics to change seems a little strange to try to wrap onto an alternate instruction interfaces, since it is dependent definitions local to each .C file, rather than global processor or derived feature bits. The VMI call wrappers are very much similar to the alternate instruction interfaces - they just leave the alternative to be defined by the hypervisor. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/