Re: [PULL 1/3] linux-user: un-parent OBJECT(cpu) when closing thread

2022-08-19 Thread Richard Henderson
On 8/19/22 01:37, Alex Bennée wrote: This has caused a regression in arm/aarch64. We hard-code ARMCPRegInfo pointers into TranslationBlocks, for calling into helper_{get,set}cp_reg{,64}. So we have a race condition between whichever cpu thread translates the code first (encoding the pointer), a

Re: [PULL 1/3] linux-user: un-parent OBJECT(cpu) when closing thread

2022-08-19 Thread Alex Bennée
Richard Henderson writes: > On 8/16/22 05:26, Alex Bennée wrote: >> While forcing the CPU to unrealize by hand does trigger the clean-up >> code we never fully free resources because refcount never reaches >> zero. This is because QOM automatically added objects without an >> explicit parent to

Re: [PULL 1/3] linux-user: un-parent OBJECT(cpu) when closing thread

2022-08-18 Thread Richard Henderson
On 8/16/22 05:26, Alex Bennée wrote: While forcing the CPU to unrealize by hand does trigger the clean-up code we never fully free resources because refcount never reaches zero. This is because QOM automatically added objects without an explicit parent to /unattached/, incrementing the refcount.

[PULL 1/3] linux-user: un-parent OBJECT(cpu) when closing thread

2022-08-16 Thread Alex Bennée
While forcing the CPU to unrealize by hand does trigger the clean-up code we never fully free resources because refcount never reaches zero. This is because QOM automatically added objects without an explicit parent to /unattached/, incrementing the refcount. Instead of manually triggering unreali