Linux CXL
 help / color / mirror / Atom feed
From: Dave Jiang <dave.jiang@intel.com>
To: Itaru Kitayama <itaru.kitayama@linux.dev>,
	Marc Herbert <Marc.Herbert@linux.intel.com>
Cc: linux-cxl@vger.kernel.org
Subject: Re: ndctl cxl test suite fails in arm64 QEMU
Date: Wed, 26 Feb 2025 12:30:42 -0700	[thread overview]
Message-ID: <8b538927-6825-4e01-a24b-f58b93631829@intel.com> (raw)
In-Reply-To: <AD05AE2B-9AA4-4E60-AEF7-705281368838@linux.dev>



On 2/25/25 3:37 PM, Itaru Kitayama wrote:
> Hi Marc,
> 
>> On Feb 26, 2025, at 2:08, Marc Herbert <Marc.Herbert@linux.intel.com> wrote:
>>
>> On 2025-02-24 20:09, Itaru Kitayama wrote:
>>>
>>> Has anyone noticed the ndctl cxl test suite failures I reported below on arm64, QEMU emulation?
>>>
>>> https://github.com/pmem/ndctl/issues/278
>>>
>>> I’m using Jonathan’s latest CXL capable QEMU [1], and the latest CXL kernel [2].
>>>
>>
>>
>> Hi,
>>
>> Sorry I wanted to spend more time and share a more detailed answer and
>> of course I got side-tracked.
>>
>> Do you have CONFIG_RANDOMIZE_MEMORY on?
>>
>> If yes then please try this either this:
>>
>>  cd kernel
>>  ./scripts/config -d CONFIG_RANDOMIZE_MEMORY
>>
>> ... or this:
>>
>> --- a/run_qemu.sh
>> +++ b/run_qemu.sh
>> @@ -681,6 +681,7 @@ build_kernel_cmdline()
>> "initcall_debug"
>> "log_buf_len=20M"
>> "memory_hotplug.memmap_on_memory=force"
>> + "nokaslr"
>> )
>> if [[ $_arg_gdb == "on" ]]; then
>> kcmd+=(
> 
> I chose the kernel configuration change and rebuilt the kernel, modules installed, then finally cxl_test kernel module installed on the emulated system, but I got worth results (occasionally, the kernel OOPS as well):

There's a known lockdep false positive that can trigger and cause cxl_test to fail. Does the kernel OOPS go away once you disable lockdep?

DJ

> 
> Log of Meson test suite run on 2025-02-26T07:32:24.101461
> 
> Inherited environment: LANG=C.UTF-8 LS_COLORS='' TERM=xterm-256color PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin MAIL=/var/mail/root LOGNAME=root USER=root HOME=/root SHELL=/bin/bash SUDO_COMMAND='/usr/bin/meson test cxl-region-sysfs.sh' SUDO_USER=realm SUDO_UID=1000 SUDO_GID=1000 
> 
> ==================================== 1/1 =====================================
> test:         ndctl:cxl / cxl-region-sysfs.sh
> start time:   22:32:24
> duration:     0.71s
> result:       exit status 1
> command:      NDCTL=/home/realm/projects/ndctl/build/ndctl/ndctl DAXCTL=/home/realm/projects/ndctl/build/daxctl/daxctl TEST_PATH=/home/realm/projects/ndctl/build/test UBSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1 ASAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1 MALLOC_PERTURB_=29 MSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1 DATA_PATH=/home/realm/projects/ndctl/test MESON_TEST_ITERATION=1 LD_LIBRARY_PATH=/home/realm/projects/ndctl/build/daxctl/lib:/home/realm/projects/ndctl/build/ndctl/lib:/home/realm/projects/ndctl/build/cxl/lib /bin/bash /home/realm/projects/ndctl/test/cxl-region-sysfs.sh
> ----------------------------------- stdout -----------------------------------
> test/cxl-region-sysfs.sh: failed at line 40
> ----------------------------------- stderr -----------------------------------
> + trap 'err $LINENO' ERR
> + check_prereq jq
> + command -v jq
> + modprobe -r cxl_test
> + modprobe cxl_test
> + rc=1
> ++ ./cxl/cxl list -b cxl_test -D -d root
> ++ jq -r '.[] |
>   select(.pmem_capable == true) |
>   select(.nr_targets == 2) |
>   .decoder'
>   Warning: no matching devices found
> 
> + decoder=
> + readarray -t mem
> ++ ./cxl/cxl list -M -d
> ++ jq -r '.[].memdev'
>   Error: switch `d' requires a value
> 
>  usage: cxl list [<options>]
> 
>     -d, --decoder <decoder device name>
>                           filter by CXL decoder device name(s) / class
> + readarray -t endpoint
> ++ ./cxl/cxl reserve-dpa -t pmem -s 268435456
> ++ jq -r '.[] | .decoder.decoder'
> 
>  usage: cxl reserve-dpa <mem0> [<mem1>..<memn>] [<options>]
> 
>     -b, --bus <bus name>  Limit operation to the specified bus
>     -v, --verbose         turn on debug
>     -S, --serial          use serial numbers to id memdevs
>     -s, --size <size>     size in bytes (Default: all available capacity)
>     -d, --decoder <decoder instance id>
>                           override the automatic decoder selection
>     -t, --type <type>     'pmem' or 'ram' (volatile) (Default: 'pmem')
>     -f, --force           Attempt 'expected to fail' operations
> 
> ++ cat /sys/bus/cxl/devices//create_pmem_region
> cat: /sys/bus/cxl/devices//create_pmem_region: No such file or directory
> + region=
> ++ err 40
> +++ basename /home/realm/projects/ndctl/test/cxl-region-sysfs.sh
> ++ echo test/cxl-region-sysfs.sh: failed at line 40
> ++ '[' -n '' ']'
> ++ exit 1
> ==============================================================================
> 
> 
> Summary of Failures:
> 
> 1/1 ndctl:cxl / cxl-region-sysfs.sh FAIL             0.71s   exit status 1
> 
> Ok:                 0   
> Expected Fail:      0   
> Fail:               1   
> Unexpected Pass:    0   
> Skipped:            0   
> Timeout:            0   
> 
> 


  parent reply	other threads:[~2025-02-26 19:30 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-25  4:09 ndctl cxl test suite fails in arm64 QEMU Itaru Kitayama
2025-02-25 17:08 ` Marc Herbert
2025-02-25 22:37   ` Itaru Kitayama
2025-02-25 22:48     ` Alison Schofield
2025-02-25 23:53       ` Itaru Kitayama
2025-02-26 18:45         ` Alison Schofield
2025-02-26 22:07           ` Itaru Kitayama
2025-02-27  0:44           ` Itaru Kitayama
2025-02-27  5:31           ` Itaru Kitayama
2025-02-26 19:30     ` Dave Jiang [this message]
2025-02-26 22:04       ` Itaru Kitayama
2025-03-01  0:27         ` Marc Herbert
2025-02-26  8:02   ` Itaru Kitayama
2025-02-25 22:40 ` Alison Schofield
2025-02-28 12:15   ` Itaru Kitayama
2025-02-28 14:34   ` Itaru Kitayama
2025-03-07  1:44     ` Itaru Kitayama
2025-03-13  9:11       ` Jonathan Cameron
2025-03-25 10:14         ` Itaru Kitayama

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8b538927-6825-4e01-a24b-f58b93631829@intel.com \
    --to=dave.jiang@intel.com \
    --cc=Marc.Herbert@linux.intel.com \
    --cc=itaru.kitayama@linux.dev \
    --cc=linux-cxl@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox