Re: Crash with CXL + TCG on 8.2: Was Re: qemu cxl memory expander shows numa_node -1

2024-02-18 Thread Mattias Nissler
On Thu, Feb 15, 2024 at 4:29 PM Jonathan Cameron < jonathan.came...@huawei.com> wrote: > On Thu, 8 Feb 2024 14:50:59 + > Jonathan Cameron wrote: > > > On Wed, 7 Feb 2024 17:34:15 + > > Jonathan Cameron wrote: > > > > > On Fri, 2 Feb 2024 16:56:18 + > > > Peter Maydell wrote: > > >

Re: Crash with CXL + TCG on 8.2: Was Re: qemu cxl memory expander shows numa_node -1

2024-02-15 Thread Jonathan Cameron via
On Thu, 8 Feb 2024 14:50:59 + Jonathan Cameron wrote: > On Wed, 7 Feb 2024 17:34:15 + > Jonathan Cameron wrote: > > > On Fri, 2 Feb 2024 16:56:18 + > > Peter Maydell wrote: > > > > > On Fri, 2 Feb 2024 at 16:50, Gregory Price > > > wrote: > > > > > > > > On Fri, Feb 02,

Re: Crash with CXL + TCG on 8.2: Was Re: qemu cxl memory expander shows numa_node -1

2024-02-15 Thread Jonathan Cameron via
On Thu, 1 Feb 2024 16:00:56 + Peter Maydell wrote: > On Thu, 1 Feb 2024 at 15:17, Alex Bennée wrote: > > > > Peter Maydell writes: > > > So, that looks like: > > > * we call cpu_tb_exec(), which executes some generated code > > > * that generated code calls the lookup_tb_ptr helper to

Re: Crash with CXL + TCG on 8.2: Was Re: qemu cxl memory expander shows numa_node -1

2024-02-08 Thread Jonathan Cameron via
On Wed, 7 Feb 2024 17:34:15 + Jonathan Cameron wrote: > On Fri, 2 Feb 2024 16:56:18 + > Peter Maydell wrote: > > > On Fri, 2 Feb 2024 at 16:50, Gregory Price > > wrote: > > > > > > On Fri, Feb 02, 2024 at 04:33:20PM +, Peter Maydell wrote: > > > > Here we are trying to take

Re: Crash with CXL + TCG on 8.2: Was Re: qemu cxl memory expander shows numa_node -1

2024-02-07 Thread Jonathan Cameron via
On Fri, 2 Feb 2024 16:56:18 + Peter Maydell wrote: > On Fri, 2 Feb 2024 at 16:50, Gregory Price wrote: > > > > On Fri, Feb 02, 2024 at 04:33:20PM +, Peter Maydell wrote: > > > Here we are trying to take an interrupt. This isn't related to the > > > other can_do_io stuff, it's

Re: Crash with CXL + TCG on 8.2: Was Re: qemu cxl memory expander shows numa_node -1

2024-02-02 Thread Peter Maydell
On Fri, 2 Feb 2024 at 16:50, Gregory Price wrote: > > On Fri, Feb 02, 2024 at 04:33:20PM +, Peter Maydell wrote: > > Here we are trying to take an interrupt. This isn't related to the > > other can_do_io stuff, it's happening because do_ld_mmio_beN assumes > > it's called with the BQL not

Re: Crash with CXL + TCG on 8.2: Was Re: qemu cxl memory expander shows numa_node -1

2024-02-02 Thread Gregory Price
On Fri, Feb 02, 2024 at 04:33:20PM +, Peter Maydell wrote: > On Fri, 2 Feb 2024 at 16:26, Jonathan Cameron > wrote: > > #7 0x55ab1929 in bql_lock_impl (file=0x56049122 > > "../../accel/tcg/cputlb.c", line=2033) at ../../system/cpus.c:524 > > #8 bql_lock_impl

Re: Crash with CXL + TCG on 8.2: Was Re: qemu cxl memory expander shows numa_node -1

2024-02-02 Thread Peter Maydell
On Fri, 2 Feb 2024 at 16:26, Jonathan Cameron wrote: > New exciting trace... > Thread 5 "qemu-system-x86" received signal SIGABRT, Aborted. > [Switching to Thread 0x74efe6c0 (LWP 16503)] > __pthread_kill_implementation (no_tid=0, signo=6, threadid=) > at ./nptl/pthread_kill.c:44 > Download

Re: Crash with CXL + TCG on 8.2: Was Re: qemu cxl memory expander shows numa_node -1

2024-02-02 Thread Jonathan Cameron via
On Thu, 1 Feb 2024 13:56:09 -0500 Gregory Price wrote: > On Thu, Feb 01, 2024 at 06:04:26PM +, Peter Maydell wrote: > > On Thu, 1 Feb 2024 at 17:25, Alex Bennée wrote: > > > > > > Jonathan Cameron writes: > > > >> > #21 0x55ca3e5d in do_st8_mmu (cpu=0x578e0cb0, > > > >> >

Re: Crash with CXL + TCG on 8.2: Was Re: qemu cxl memory expander shows numa_node -1

2024-02-01 Thread Gregory Price
On Thu, Feb 01, 2024 at 06:04:26PM +, Peter Maydell wrote: > On Thu, 1 Feb 2024 at 17:25, Alex Bennée wrote: > > > > Jonathan Cameron writes: > > >> > #21 0x55ca3e5d in do_st8_mmu (cpu=0x578e0cb0, addr=23937, > > >> > val=18386491784638059520, oi=6, ra=140736029817822) at > >

Re: Crash with CXL + TCG on 8.2: Was Re: qemu cxl memory expander shows numa_node -1

2024-02-01 Thread Peter Maydell
On Thu, 1 Feb 2024 at 17:25, Alex Bennée wrote: > > Jonathan Cameron writes: > >> > #21 0x55ca3e5d in do_st8_mmu (cpu=0x578e0cb0, addr=23937, > >> > val=18386491784638059520, oi=6, ra=140736029817822) at > >> > ../../accel/tcg/cputlb.c:2853 > >> > #22 0x7fffa9107c63 in

Re: Crash with CXL + TCG on 8.2: Was Re: qemu cxl memory expander shows numa_node -1

2024-02-01 Thread Jonathan Cameron via
On Thu, 1 Feb 2024 17:21:49 + Peter Maydell wrote: > On Thu, 1 Feb 2024 at 17:08, Jonathan Cameron > wrote: > > > > On Thu, 01 Feb 2024 16:45:30 + > > Alex Bennée wrote: > > > > > Jonathan Cameron writes: > > > > > > > On Thu, 1 Feb 2024 16:00:56 + > > > > Peter Maydell

Re: Crash with CXL + TCG on 8.2: Was Re: qemu cxl memory expander shows numa_node -1

2024-02-01 Thread Gregory Price
On Thu, Feb 01, 2024 at 05:07:31PM +, Peter Maydell wrote: > On Thu, 1 Feb 2024 at 17:04, Gregory Price wrote: > > > > On Thu, Feb 01, 2024 at 04:45:30PM +, Alex Bennée wrote: > > > > No thats different - we are actually writing to the MMIO region here. > > > But the fact we hit

Re: Crash with CXL + TCG on 8.2: Was Re: qemu cxl memory expander shows numa_node -1

2024-02-01 Thread Alex Bennée
Jonathan Cameron writes: > On Thu, 01 Feb 2024 16:45:30 + > Alex Bennée wrote: > >> Jonathan Cameron writes: >> >> > On Thu, 1 Feb 2024 16:00:56 + >> > Peter Maydell wrote: >> > >> >> On Thu, 1 Feb 2024 at 15:17, Alex Bennée wrote: >> >> > >> >> > Peter Maydell writes: >>

Re: Crash with CXL + TCG on 8.2: Was Re: qemu cxl memory expander shows numa_node -1

2024-02-01 Thread Peter Maydell
On Thu, 1 Feb 2024 at 17:08, Jonathan Cameron wrote: > > On Thu, 01 Feb 2024 16:45:30 + > Alex Bennée wrote: > > > Jonathan Cameron writes: > > > > > On Thu, 1 Feb 2024 16:00:56 + > > > Peter Maydell wrote: > > > > > >> On Thu, 1 Feb 2024 at 15:17, Alex Bennée wrote: > > >> > > > >> >

Re: Crash with CXL + TCG on 8.2: Was Re: qemu cxl memory expander shows numa_node -1

2024-02-01 Thread Gregory Price
On Thu, Feb 01, 2024 at 04:45:30PM +, Alex Bennée wrote: > Jonathan Cameron writes: > > > On Thu, 1 Feb 2024 16:00:56 + > > Peter Maydell wrote: > > > >> On Thu, 1 Feb 2024 at 15:17, Alex Bennée wrote: > >> > > >> > Peter Maydell writes: > >> > > So, that looks like: > >> > > * we

Re: Crash with CXL + TCG on 8.2: Was Re: qemu cxl memory expander shows numa_node -1

2024-02-01 Thread Jonathan Cameron via
On Thu, 01 Feb 2024 16:45:30 + Alex Bennée wrote: > Jonathan Cameron writes: > > > On Thu, 1 Feb 2024 16:00:56 + > > Peter Maydell wrote: > > > >> On Thu, 1 Feb 2024 at 15:17, Alex Bennée wrote: > >> > > >> > Peter Maydell writes: > >> > > So, that looks like: > >> > > * we

Re: Crash with CXL + TCG on 8.2: Was Re: qemu cxl memory expander shows numa_node -1

2024-02-01 Thread Peter Maydell
On Thu, 1 Feb 2024 at 17:04, Gregory Price wrote: > > On Thu, Feb 01, 2024 at 04:45:30PM +, Alex Bennée wrote: > > No thats different - we are actually writing to the MMIO region here. > > But the fact we hit cpu_abort because we can't find the TB we are > > executing is a little

Re: Crash with CXL + TCG on 8.2: Was Re: qemu cxl memory expander shows numa_node -1

2024-02-01 Thread Alex Bennée
Jonathan Cameron writes: > On Thu, 1 Feb 2024 16:00:56 + > Peter Maydell wrote: > >> On Thu, 1 Feb 2024 at 15:17, Alex Bennée wrote: >> > >> > Peter Maydell writes: >> > > So, that looks like: >> > > * we call cpu_tb_exec(), which executes some generated code >> > > * that generated

Re: Crash with CXL + TCG on 8.2: Was Re: qemu cxl memory expander shows numa_node -1

2024-02-01 Thread Jonathan Cameron via
On Thu, 1 Feb 2024 16:00:56 + Peter Maydell wrote: > On Thu, 1 Feb 2024 at 15:17, Alex Bennée wrote: > > > > Peter Maydell writes: > > > So, that looks like: > > > * we call cpu_tb_exec(), which executes some generated code > > > * that generated code calls the lookup_tb_ptr helper to

Re: Crash with CXL + TCG on 8.2: Was Re: qemu cxl memory expander shows numa_node -1

2024-02-01 Thread Peter Maydell
On Thu, 1 Feb 2024 at 15:17, Alex Bennée wrote: > > Peter Maydell writes: > > So, that looks like: > > * we call cpu_tb_exec(), which executes some generated code > > * that generated code calls the lookup_tb_ptr helper to see > >if we have a generated TB already for the address we're

Re: Crash with CXL + TCG on 8.2: Was Re: qemu cxl memory expander shows numa_node -1

2024-02-01 Thread Jonathan Cameron via
On Thu, 01 Feb 2024 15:17:53 + Alex Bennée wrote: > Peter Maydell writes: > > > On Thu, 1 Feb 2024 at 14:01, Jonathan Cameron > > wrote: > >> > Can you run QEMU under gdb and give the backtrace when it stops > >> > on the abort() ? That will probably have a helpful clue. I > >> >

Re: Crash with CXL + TCG on 8.2: Was Re: qemu cxl memory expander shows numa_node -1

2024-02-01 Thread Alex Bennée
Peter Maydell writes: > On Thu, 1 Feb 2024 at 14:01, Jonathan Cameron > wrote: >> > Can you run QEMU under gdb and give the backtrace when it stops >> > on the abort() ? That will probably have a helpful clue. I >> > suspect something is failing to pass a valid retaddr in >> > when it calls a

Re: Crash with CXL + TCG on 8.2: Was Re: qemu cxl memory expander shows numa_node -1

2024-02-01 Thread Peter Maydell
On Thu, 1 Feb 2024 at 14:01, Jonathan Cameron wrote: > > Can you run QEMU under gdb and give the backtrace when it stops > > on the abort() ? That will probably have a helpful clue. I > > suspect something is failing to pass a valid retaddr in > > when it calls a load/store function. >

Re: Crash with CXL + TCG on 8.2: Was Re: qemu cxl memory expander shows numa_node -1

2024-02-01 Thread Jonathan Cameron via
On Thu, 1 Feb 2024 13:12:23 + Peter Maydell wrote: > On Thu, 1 Feb 2024 at 13:04, Jonathan Cameron via > wrote: > > > > > > > > root@localhost:~/devmem2# numactl --membind=1 touch a > > qemu: fatal: cpu_io_recompile: could not find TB for pc=(nil) > > Can you run QEMU under gdb

Re: Crash with CXL + TCG on 8.2: Was Re: qemu cxl memory expander shows numa_node -1

2024-02-01 Thread Peter Maydell
On Thu, 1 Feb 2024 at 13:04, Jonathan Cameron via wrote: > > root@localhost:~/devmem2# numactl --membind=1 touch a > qemu: fatal: cpu_io_recompile: could not find TB for pc=(nil) Can you run QEMU under gdb and give the backtrace when it stops on the abort() ? That will probably have a

Crash with CXL + TCG on 8.2: Was Re: qemu cxl memory expander shows numa_node -1

2024-02-01 Thread Jonathan Cameron via
On Tue, 30 Jan 2024 13:50:18 +0530 Sajjan Rao wrote: > Hi Jonathan, > > The QEMU command line in the original email has been corrected back in > August 2023 based on the subsequent responses. > > My current QEMU command line reads like below. As you can see I am not > assigning numa to the CXL