From mboxrd@z Thu Jan 1 00:00:00 1970 From: Muli Ben-Yehuda Subject: Re: [RFC][PATCH 1/6] HVM PCI Passthrough (non-IOMMU) Date: Mon, 4 Jun 2007 21:25:30 +0300 Message-ID: <20070604182530.GD4556@rhun.ibm.com> References: <9392A06CB0FDC847B3A530B3DC174E7B02A95EDB@mse10be1.mse10.exchange.ms> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <9392A06CB0FDC847B3A530B3DC174E7B02A95EDB@mse10be1.mse10.exchange.ms> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Guy Zana Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On Thu, May 31, 2007 at 07:04:40PM -0400, Guy Zana wrote: > conf.patch: > > - Compile in x86_32 (disable PAE) > - Additional compilation switches (found in Config.mk): > mapping_1to1 - enables the 1:1 layout that allows DMA > passthrough - enables non-IOMMU pass-through > > Signed-off-by: Guy Zana > > --- a/Config.mk Sat May 05 13:48:05 2007 +0100 > +++ b/Config.mk Thu May 31 21:05:07 2007 +0300 > @@ -1,7 +1,11 @@ > # -*- mode: Makefile; -*- > > # A debug build of Xen and tools? > -debug ?= n > +debug ?= n Whitespace damage. > + > +# PCI pass-through flags > +mapping_1to1 ?= y > +passthrough ?= y Does one make sense without the other? > XEN_COMPILE_ARCH ?= $(shell uname -m | sed -e s/i.86/x86_32/ \ > -e s/ppc/powerpc/ -e s/i86pc/x86_32/) > @@ -9,7 +13,7 @@ XEN_OS ?= $(shell uname -s) > XEN_OS ?= $(shell uname -s) > > ifeq ($(XEN_TARGET_ARCH),x86_32) > -XEN_TARGET_X86_PAE ?= y > +XEN_TARGET_X86_PAE ?= n Is there a dependency between 1-1 / passthrough and !PAE, or is this just for convenience? > endif > > CONFIG_$(XEN_OS) := y > --- a/tools/Rules.mk Sat May 05 13:48:05 2007 +0100 > +++ b/tools/Rules.mk Thu May 31 21:04:53 2007 +0300 > @@ -13,6 +13,14 @@ X11_LDPATH = -L/usr/X11R6/$(LIBDIR) > X11_LDPATH = -L/usr/X11R6/$(LIBDIR) > > CFLAGS += -D__XEN_TOOLS__ > + > +ifeq ($(passthrough),y) > + CFLAGS += -DCONFIG_NEO > +endif You probably want a better name than CONFIG_NEO, much to the disappointment of matrix fans everywhere. > + > +ifeq ($(mapping_1to1),y) > + CFLAGS += -DCONFIG_1TO1 > +endif > > # Enable implicit LFS support *and* explicit LFS names. > CFLAGS += $(shell getconf LFS_CFLAGS) > --- a/xen/Rules.mk Sat May 05 13:48:05 2007 +0100 > +++ b/xen/Rules.mk Thu May 31 21:04:53 2007 +0300 > @@ -50,12 +50,16 @@ ALL_OBJS-$(ACM_SECURITY) += $(BASEDIR)/a > ALL_OBJS-$(ACM_SECURITY) += $(BASEDIR)/acm/built_in.o > ALL_OBJS-y += $(BASEDIR)/arch/$(TARGET_ARCH)/built_in.o > > -CFLAGS-y += -g -D__XEN__ > -CFLAGS-$(ACM_SECURITY) += -DACM_SECURITY > -CFLAGS-$(verbose) += -DVERBOSE > -CFLAGS-$(crash_debug) += -DCRASH_DEBUG > -CFLAGS-$(perfc) += -DPERF_COUNTERS > -CFLAGS-$(perfc_arrays) += -DPERF_ARRAYS > +CFLAGS-y += -g -D__XEN__ > +# NEO stuff > +CFLAGS-$(passthrough) += -DCONFIG_NEO > +CFLAGS-$(mapping_1to1) += -DCONFIG_1TO1 > + > +CFLAGS-$(ACM_SECURITY) += -DACM_SECURITY > +CFLAGS-$(verbose) += -DVERBOSE > +CFLAGS-$(crash_debug) += -DCRASH_DEBUG > +CFLAGS-$(perfc) += -DPERF_COUNTERS > +CFLAGS-$(perfc_arrays) += -DPERF_ARRAYS This should be changed to only touch the new bits, makes it easier to review. Cheers, Muli