Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754265AbZIARkP (ORCPT ); Tue, 1 Sep 2009 13:40:15 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753438AbZIARkO (ORCPT ); Tue, 1 Sep 2009 13:40:14 -0400 Received: from cantor.suse.de ([195.135.220.2]:47715 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752757AbZIARkM (ORCPT ); Tue, 1 Sep 2009 13:40:12 -0400 Subject: Re: [PATCH] SCSI driver for VMware's virtual HBA. From: James Bottomley To: Roland Dreier Cc: Dmitry Torokhov , Matthew Wilcox , Bart Van Assche , Alok Kataria , Robert Love , Randy Dunlap , Mike Christie , "linux-scsi@vger.kernel.org" , LKML , Andrew Morton , Rolf Eike Beer , Maxime Austruy In-Reply-To: References: <1251415060.16297.58.camel@ank32.eng.vmware.com> <20090901161651.GO22870@parisc-linux.org> <200909010933.50571.dtor@vmware.com> <1251823925.3864.216.camel@mulgrave.site> Content-Type: text/plain Date: Tue, 01 Sep 2009 12:40:04 -0500 Message-Id: <1251826804.12482.47.camel@mulgrave.site> Mime-Version: 1.0 X-Mailer: Evolution 2.24.1.1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1956 Lines: 36 On Tue, 2009-09-01 at 10:25 -0700, Roland Dreier wrote: > > Nobody said you had to have the exact same driver for every hypervisor. > > What people are suggesting is that we look at commonalities in the > > interfaces both from a control plane point of view (transport class) and > > from a code sharing point of view (libscsivirt). However, all the > > hypervisor interfaces I've seen are basically DMA rings ... > > I don't think that's anything special about hypervisors though -- pretty > much all modern device interfaces are basically DMA rings, aren't they? > I'm definitely in favor of common code to handle commonality but on the > other hand I don't see what's so special about virtual devices vs. real > HW devices. One the one side we have VMware's closed hypervisor code > and on the other side we have vendor XYZ's closed RTL and firmware code. But the main difference between actual hardware and hypervisors is the fact that to set up a DMA transfer you have to poke registers on the card, set up a mailbox and manage queues of commands to the card. For a hypervisor, sending a DMA transaction is a hypercall. Now for most physical drivers, take for example FCP ones, we have a common control plane interface (fc transport class), we're evolving a frame handling library (libfc) so all the drivers really have are specific codes to bit bang the hardware. Some of the libfc handling is actually done in intelligent offload firmware on the HBAs, so some will use more or less of the libfc handling (same is true for SAS and libsas). When there's no actual hardware to be bit banged, and no real firmware offload, it does make one wonder what would be left unique to the driver. James -- 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/