diff mbox series

[21/46] tools/testing/cxl: Move cxl_test resources to the top of memory

Message ID 165603886021.551046.12395967874222763381.stgit@dwillia2-xfh (mailing list archive)
State Superseded
Headers show
Series CXL PMEM Region Provisioning | expand

Commit Message

Dan Williams June 24, 2022, 2:47 a.m. UTC
A recent QEMU upgrade resulted in collisions between QEMU's chosen
location for PCI MMIO and cxl_test's fake address location for emulated
CXL purposes. This was great for testing resource collisions, but not so
great for continuing to test the nominal cases. Move cxl_test to the
top-of-memory where it is less likely to collide with other resources.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
---
 tools/testing/cxl/test/cxl.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Jonathan Cameron June 29, 2022, 4:11 p.m. UTC | #1
On Thu, 23 Jun 2022 19:47:40 -0700
Dan Williams <dan.j.williams@intel.com> wrote:

> A recent QEMU upgrade resulted in collisions between QEMU's chosen
> location for PCI MMIO and cxl_test's fake address location for emulated
> CXL purposes. This was great for testing resource collisions, but not so
> great for continuing to test the nominal cases. Move cxl_test to the
> top-of-memory where it is less likely to collide with other resources.
*snigger*

Seems reasonable, though I'm sure someone else will have the same
idea for some other usecase and we'll keep moving this around...
Ah well.

Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

> 
> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
> ---
>  tools/testing/cxl/test/cxl.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/testing/cxl/test/cxl.c b/tools/testing/cxl/test/cxl.c
> index f52a5dd69d36..b6e6bc02a507 100644
> --- a/tools/testing/cxl/test/cxl.c
> +++ b/tools/testing/cxl/test/cxl.c
> @@ -632,7 +632,8 @@ static __init int cxl_test_init(void)
>  		goto err_gen_pool_create;
>  	}
>  
> -	rc = gen_pool_add(cxl_mock_pool, SZ_512G, SZ_64G, NUMA_NO_NODE);
> +	rc = gen_pool_add(cxl_mock_pool, iomem_resource.end + 1 - SZ_64G,
> +			  SZ_64G, NUMA_NO_NODE);
>  	if (rc)
>  		goto err_gen_pool_add;
>  
>
Dan Williams July 10, 2022, 5:19 p.m. UTC | #2
Jonathan Cameron wrote:
> On Thu, 23 Jun 2022 19:47:40 -0700
> Dan Williams <dan.j.williams@intel.com> wrote:
> 
> > A recent QEMU upgrade resulted in collisions between QEMU's chosen
> > location for PCI MMIO and cxl_test's fake address location for emulated
> > CXL purposes. This was great for testing resource collisions, but not so
> > great for continuing to test the nominal cases. Move cxl_test to the
> > top-of-memory where it is less likely to collide with other resources.
> *snigger*
> 
> Seems reasonable, though I'm sure someone else will have the same
> idea for some other usecase and we'll keep moving this around...
> Ah well.

Indeed.

> 
> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

Thanks.

> 
> > 
> > Signed-off-by: Dan Williams <dan.j.williams@intel.com>
> > ---
> >  tools/testing/cxl/test/cxl.c |    3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/tools/testing/cxl/test/cxl.c b/tools/testing/cxl/test/cxl.c
> > index f52a5dd69d36..b6e6bc02a507 100644
> > --- a/tools/testing/cxl/test/cxl.c
> > +++ b/tools/testing/cxl/test/cxl.c
> > @@ -632,7 +632,8 @@ static __init int cxl_test_init(void)
> >  		goto err_gen_pool_create;
> >  	}
> >  
> > -	rc = gen_pool_add(cxl_mock_pool, SZ_512G, SZ_64G, NUMA_NO_NODE);
> > +	rc = gen_pool_add(cxl_mock_pool, iomem_resource.end + 1 - SZ_64G,
> > +			  SZ_64G, NUMA_NO_NODE);
> >  	if (rc)
> >  		goto err_gen_pool_add;
> >  
> > 
> 
>
diff mbox series

Patch

diff --git a/tools/testing/cxl/test/cxl.c b/tools/testing/cxl/test/cxl.c
index f52a5dd69d36..b6e6bc02a507 100644
--- a/tools/testing/cxl/test/cxl.c
+++ b/tools/testing/cxl/test/cxl.c
@@ -632,7 +632,8 @@  static __init int cxl_test_init(void)
 		goto err_gen_pool_create;
 	}
 
-	rc = gen_pool_add(cxl_mock_pool, SZ_512G, SZ_64G, NUMA_NO_NODE);
+	rc = gen_pool_add(cxl_mock_pool, iomem_resource.end + 1 - SZ_64G,
+			  SZ_64G, NUMA_NO_NODE);
 	if (rc)
 		goto err_gen_pool_add;