Cui, Dexuan
2009-Nov-06 09:29 UTC
[Xen-devel] [PATCH] Enlarge the size of the global mmio_space mmio[].
With the Multi-Function passthrough, we're actually able to assign more than 32 functions to guest, so we should enlarge the MAX_MMIO. 1024 should be big enough. Signed-off-by: Dexuan Cui <dexuan.cui@intel.com> diff --git a/i386-dm/exec-dm.c b/i386-dm/exec-dm.c index d0685af..2603de1 100644 --- a/i386-dm/exec-dm.c +++ b/i386-dm/exec-dm.c @@ -275,13 +275,13 @@ void cpu_abort(CPUState *env, const char *fmt, ...) /* XXX: Simple implementation. Fix later */ -#define MAX_MMIO 32 +#define MAX_MMIO 1024 static struct mmio_space { target_phys_addr_t start; unsigned long size; unsigned long io_index; } mmio[MAX_MMIO]; -unsigned long mmio_cnt; +static unsigned long mmio_cnt; /* register physical memory. 'size' must be a multiple of the target page size. If (phys_offset & ~TARGET_PAGE_MASK) != 0, then it is an _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Simon Horman
2009-Nov-07 13:07 UTC
Re: [Xen-devel] [PATCH] Enlarge the size of the global mmio_space mmio[].
On Fri, Nov 06, 2009 at 05:29:12PM +0800, Cui, Dexuan wrote:> With the Multi-Function passthrough, we''re actually able to assign more than > 32 functions to guest, so we should enlarge the MAX_MMIO. 1024 should be big > enough.Would 265 (= 32 * 8) be big enough? Or is it harmless to go to 1024 anyway?> > Signed-off-by: Dexuan Cui <dexuan.cui@intel.com> > > diff --git a/i386-dm/exec-dm.c b/i386-dm/exec-dm.c > index d0685af..2603de1 100644 > --- a/i386-dm/exec-dm.c > +++ b/i386-dm/exec-dm.c > @@ -275,13 +275,13 @@ void cpu_abort(CPUState *env, const char *fmt, ...) > > > /* XXX: Simple implementation. Fix later */ > -#define MAX_MMIO 32 > +#define MAX_MMIO 1024 > static struct mmio_space { > target_phys_addr_t start; > unsigned long size; > unsigned long io_index; > } mmio[MAX_MMIO]; > -unsigned long mmio_cnt; > +static unsigned long mmio_cnt; > > /* register physical memory. ''size'' must be a multiple of the target > page size. If (phys_offset & ~TARGET_PAGE_MASK) != 0, then it is an> _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Cui, Dexuan
2009-Nov-10 02:05 UTC
RE: [Xen-devel] [PATCH] Enlarge the size of the global mmio_space mmio[].
Hi Simon, 256 may be not enough as 1 function can consume more than 1 entry in that array. 1024 is harmless and should be enough, I think. :-) Thanks, -- Dexuan -----Original Message----- From: Simon Horman [mailto:horms@verge.net.au] Sent: 2009?11?7? 21:08 To: Cui, Dexuan Cc: Ian Jackson; xen-devel@lists.xensource.com Subject: Re: [Xen-devel] [PATCH] Enlarge the size of the global mmio_space mmio[]. On Fri, Nov 06, 2009 at 05:29:12PM +0800, Cui, Dexuan wrote:> With the Multi-Function passthrough, we''re actually able to assign more than > 32 functions to guest, so we should enlarge the MAX_MMIO. 1024 should be big > enough.Would 265 (= 32 * 8) be big enough? Or is it harmless to go to 1024 anyway?> > Signed-off-by: Dexuan Cui <dexuan.cui@intel.com> > > diff --git a/i386-dm/exec-dm.c b/i386-dm/exec-dm.c > index d0685af..2603de1 100644 > --- a/i386-dm/exec-dm.c > +++ b/i386-dm/exec-dm.c > @@ -275,13 +275,13 @@ void cpu_abort(CPUState *env, const char *fmt, ...) > > > /* XXX: Simple implementation. Fix later */ > -#define MAX_MMIO 32 > +#define MAX_MMIO 1024 > static struct mmio_space { > target_phys_addr_t start; > unsigned long size; > unsigned long io_index; > } mmio[MAX_MMIO]; > -unsigned long mmio_cnt; > +static unsigned long mmio_cnt; > > /* register physical memory. ''size'' must be a multiple of the target > page size. If (phys_offset & ~TARGET_PAGE_MASK) != 0, then it is an> _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Simon Horman
2009-Nov-10 04:38 UTC
Re: [Xen-devel] [PATCH] Enlarge the size of the global mmio_space mmio[].
On Tue, Nov 10, 2009 at 10:05:44AM +0800, Cui, Dexuan wrote:> Hi Simon, > 256 may be not enough as 1 function can consume more than 1 entry in that array. > 1024 is harmless and should be enough, I think. :-)Ok, thanks for the explanation. Acked-by: Simon Horman <horms@verge.net.au>> Thanks, > -- Dexuan > > -----Original Message----- > From: Simon Horman [mailto:horms@verge.net.au] > Sent: 2009?11?7? 21:08 > To: Cui, Dexuan > Cc: Ian Jackson; xen-devel@lists.xensource.com > Subject: Re: [Xen-devel] [PATCH] Enlarge the size of the global mmio_space mmio[]. > > On Fri, Nov 06, 2009 at 05:29:12PM +0800, Cui, Dexuan wrote: > > With the Multi-Function passthrough, we''re actually able to assign more than > > 32 functions to guest, so we should enlarge the MAX_MMIO. 1024 should be big > > enough. > > Would 265 (= 32 * 8) be big enough? > Or is it harmless to go to 1024 anyway? > > > > > Signed-off-by: Dexuan Cui <dexuan.cui@intel.com> > > > > diff --git a/i386-dm/exec-dm.c b/i386-dm/exec-dm.c > > index d0685af..2603de1 100644 > > --- a/i386-dm/exec-dm.c > > +++ b/i386-dm/exec-dm.c > > @@ -275,13 +275,13 @@ void cpu_abort(CPUState *env, const char *fmt, ...) > > > > > > /* XXX: Simple implementation. Fix later */ > > -#define MAX_MMIO 32 > > +#define MAX_MMIO 1024 > > static struct mmio_space { > > target_phys_addr_t start; > > unsigned long size; > > unsigned long io_index; > > } mmio[MAX_MMIO]; > > -unsigned long mmio_cnt; > > +static unsigned long mmio_cnt; > > > > /* register physical memory. ''size'' must be a multiple of the target > > page size. If (phys_offset & ~TARGET_PAGE_MASK) != 0, then it is an > > > > _______________________________________________ > > Xen-devel mailing list > > Xen-devel@lists.xensource.com > > http://lists.xensource.com/xen-devel > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel