[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH RFC V3 24/29] target/arm: Add support of *unrealize* ARMCPU d
From: |
Peter Maydell |
Subject: |
Re: [PATCH RFC V3 24/29] target/arm: Add support of *unrealize* ARMCPU during vCPU Hot-unplug |
Date: |
Mon, 19 Aug 2024 14:43:43 +0100 |
On Mon, 19 Aug 2024 at 13:59, Salil Mehta <salil.mehta@huawei.com> wrote:
>
> > From: Peter Maydell <peter.maydell@linaro.org>
> > Sent: Friday, August 16, 2024 6:00 PM
> > To: Alex Bennée <alex.bennee@linaro.org>
> >
> > On Fri, 16 Aug 2024 at 16:50, Peter Maydell <peter.maydell@linaro.org>
> > wrote:
> > > We shouldn't need to explicitly call cpu_address_space_destroy() from
> > > a target-specific unrealize anyway: we can do it all from the base
> > > class (and I think this would fix some leaks in current code for
> > > targets that hot-unplug, though I should check that). Otherwise you
> > > need to duplicate all the logic for figuring out which address spaces
> > > we created in realize, which is fragile and not necessary when all we
> > > want to do is "delete every address space the CPU object has"
> > > and we want to do that for every target architecture always.
> >
> > I have a patch to do this now, but I need to test it a bit more and
> > confirm (or
> > disprove) my hypothesis that we're currently leaking memory on existing
> > architectures with vCPU hot-unplug before I send it out.
>
> I think you are referring to this patch?
>
> https://lore.kernel.org/qemu-devel/20230918160257.30127-9-philmd@linaro.org/
I'd forgotten that Phil had sent that patch out. My patch
is a bit different because it refactors cpu_address_space_destroy()
into a single function that destroys all the ASes (and so we
don't for instance need cpu->cpu_ases_count any more).
-- PMM
RE: [PATCH RFC V3 24/29] target/arm: Add support of *unrealize* ARMCPU during vCPU Hot-unplug, Salil Mehta, 2024/08/19