WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [RFC][PATCH 1/6] HVM PCI Passthrough (non-IOMMU)

To: Guy Zana <guy@xxxxxxxxxxxx>
Subject: Re: [Xen-devel] [RFC][PATCH 1/6] HVM PCI Passthrough (non-IOMMU)
From: Muli Ben-Yehuda <muli@xxxxxxxxxx>
Date: Mon, 4 Jun 2007 21:25:30 +0300
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 04 Jun 2007 11:23:48 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <9392A06CB0FDC847B3A530B3DC174E7B02A95EDB@xxxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <9392A06CB0FDC847B3A530B3DC174E7B02A95EDB@xxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.11
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 <guy@xxxxxxxxxxxx>
> 
> --- 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

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>