All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Xu <peterx@redhat.com>
To: "Akihiko Odaki" <odaki@rsg.ci.i.u-tokyo.ac.jp>,
	"Cédric Le Goater" <clg@redhat.com>
Cc: "Cédric Le Goater" <clg@redhat.com>,
	qemu-devel@nongnu.org,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Cédric Le Goater" <clg@kaod.org>,
	"Steven Lee" <steven_lee@aspeedtech.com>,
	"Troy Lee" <leetroy@gmail.com>,
	"Jamin Lin" <jamin_lin@aspeedtech.com>,
	"Andrew Jeffery" <andrew@codeconstruct.com.au>,
	"Joel Stanley" <joel@jms.id.au>,
	"Eric Auger" <eric.auger@redhat.com>,
	"Helge Deller" <deller@gmx.de>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Hervé Poussineau" <hpoussin@reactos.org>,
	"Aleksandar Rikalo" <arikalo@gmail.com>,
	"Edgar E. Iglesias" <edgar.iglesias@gmail.com>,
	"Alistair Francis" <alistair@alistair23.me>,
	"Ninad Palsule" <ninad@linux.ibm.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Eduardo Habkost" <eduardo@habkost.net>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>,
	"Jason Wang" <jasowang@redhat.com>, "Yi Liu" <yi.l.liu@intel.com>,
	"Clément Mathieu--Drif" <clement.mathieu--drif@eviden.com>,
	"Nicholas Piggin" <npiggin@gmail.com>,
	"Aditya Gupta" <adityag@linux.ibm.com>,
	"Gautam Menghani" <gautam@linux.ibm.com>,
	"Song Gao" <gaosong@loongson.cn>,
	"Bibo Mao" <maobibo@loongson.cn>,
	"Jiaxun Yang" <jiaxun.yang@flygoat.com>,
	"Jonathan Cameron" <jonathan.cameron@huawei.com>,
	"Fan Ni" <fan.ni@samsung.com>,
	"David Hildenbrand" <david@redhat.com>,
	"Igor Mammedov" <imammedo@redhat.com>,
	"Xiao Guangrong" <xiaoguangrong.eric@gmail.com>,
	"Beniamino Galvani" <b.galvani@gmail.com>,
	"Strahinja Jankovic" <strahinja.p.jankovic@gmail.com>,
	"Subbaraya Sundeep" <sundeep.lkml@gmail.com>,
	"Jan Kiszka" <jan.kiszka@web.de>,
	"Laurent Vivier" <laurent@vivier.eu>,
	"Andrey Smirnov" <andrew.smirnov@gmail.com>,
	"Aurelien Jarno" <aurelien@aurel32.net>,
	"BALATON Zoltan" <balaton@eik.bme.hu>,
	"Bernhard Beschow" <shentey@gmail.com>,
	"Harsh Prateek Bora" <harshpb@linux.ibm.com>,
	"Elena Ufimtseva" <elena.ufimtseva@oracle.com>,
	"Jagannathan Raman" <jag.raman@oracle.com>,
	"Palmer Dabbelt" <palmer@dabbelt.com>,
	"Weiwei Li" <liwei1518@gmail.com>,
	"Daniel Henrique Barboza" <dbarboza@ventanamicro.com>,
	"Liu Zhiwei" <zhiwei_liu@linux.alibaba.com>,
	"Matthew Rosato" <mjrosato@linux.ibm.com>,
	"Eric Farman" <farman@linux.ibm.com>,
	"Thomas Huth" <thuth@redhat.com>,
	"Halil Pasic" <pasic@linux.ibm.com>,
	"Christian Borntraeger" <borntraeger@linux.ibm.com>,
	"Ilya Leoshkevich" <iii@linux.ibm.com>,
	"Fam Zheng" <fam@euphon.net>, "Bin Meng" <bmeng.cn@gmail.com>,
	"Mark Cave-Ayland" <mark.cave-ayland@ilande.co.uk>,
	"Artyom Tarasenko" <atar4qemu@gmail.com>,
	"Marcelo Tosatti" <mtosatti@redhat.com>,
	"Max Filippov" <jcmvbkbc@gmail.com>,
	qemu-arm@nongnu.org, qemu-ppc@nongnu.org, qemu-riscv@nongnu.org,
	qemu-s390x@nongnu.org, qemu-block@nongnu.org,
	kvm@vger.kernel.org,
	"Alex Williamson" <alex.williamson@redhat.com>,
	"Stefano Garzarella" <sgarzare@redhat.com>,
	"Alistair Francis" <alistair.francis@wdc.com>
Subject: Re: [PATCH 00/35] memory: QOM-ify AddressSpace
Date: Mon, 29 Sep 2025 16:58:41 -0400	[thread overview]
Message-ID: <aNrzASvJCP_axv22@x1.local> (raw)
In-Reply-To: <61e4c2bb-d8fa-446a-b4ec-027d4eae35b5@rsg.ci.i.u-tokyo.ac.jp>

On Thu, Sep 18, 2025 at 09:47:07PM +0900, Akihiko Odaki wrote:
> On 2025/09/18 21:39, Cédric Le Goater wrote:
> > Hello Akihiko,
> > 
> > On 9/17/25 14:56, Akihiko Odaki wrote:
> > > Based-on: <20250917-subregion-v1-0-bef37d9b4f73@rsg.ci.i.u-tokyo.ac.jp>
> > > ("[PATCH 00/14] Fix memory region use-after-finalization")
> > > 
> > > Make AddressSpaces QOM objects to ensure that they are destroyed when
> > > their owners are finalized and also to get a unique path for debugging
> > > output.
> > > 
> > > Suggested by BALATON Zoltan:
> > > https://lore.kernel.org/qemu-devel/cd21698f-db77-eb75-6966-
> > > d559fdcab835@eik.bme.hu/
> > > 
> > > Signed-off-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
> > 
> > I wonder if this is going to fix an issue I was seeing a while ago
> > in the FSI models. I couldn't find a clean way to avoid corrupting
> > memory because of how the address_space was created and later on
> > destroyed. See below,
> 
> Partially, but this is insufficient.
> 
> The first problem is that AddressSpace suffers from circular references the
> following series solves:
> https://lore.kernel.org/qemu-devel/20250906-mr-v2-0-2820f5a3d282@rsg.ci.i.u-tokyo.ac.jp/
> "[PATCH v2 0/3] memory: Stop piggybacking on memory region owners"
> 
> Another problem is that RCU is not properly waited. This is left to future
> work.

Just to mention, Peter Maydell just posted a series for fixing AS
destructions here:

https://lore.kernel.org/qemu-devel/20250929144228.1994037-1-peter.maydell@linaro.org/

IIUC it should also work for FSI, if FSI can convert to use dynamically
allocated AddressSpaces (with/without QOMify; as Akihiko pointed out
correctly, these should be orthogonal), then provide a proper unrealize()
of the bus device to invoke address_space_destroy_free().

Thanks,

-- 
Peter Xu


  reply	other threads:[~2025-09-29 20:58 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-17 12:56 [PATCH 00/35] memory: QOM-ify AddressSpace Akihiko Odaki
2025-09-17 12:56 ` [PATCH 01/35] " Akihiko Odaki
2025-09-17 15:53   ` Richard Henderson
2025-09-17 12:56 ` [PATCH 02/35] hw/core/loader: Use address_space_get_path() Akihiko Odaki
2025-09-17 15:18   ` Richard Henderson
2025-09-17 15:55     ` Richard Henderson
2025-09-17 12:56 ` [PATCH 03/35] vfio: " Akihiko Odaki
2025-09-18  9:52   ` Cédric Le Goater
2025-09-17 12:56 ` [PATCH 04/35] hw/alpha: QOM-ify AddressSpace Akihiko Odaki
2025-09-17 15:56   ` Richard Henderson
2025-09-17 12:56 ` [PATCH 05/35] hw/arm: " Akihiko Odaki
2025-09-17 15:57   ` Richard Henderson
2025-09-17 12:56 ` [PATCH 06/35] hw/display: " Akihiko Odaki
2025-09-17 12:56 ` [PATCH 07/35] hw/dma: " Akihiko Odaki
2025-09-17 12:56 ` [PATCH 08/35] hw/fsi: " Akihiko Odaki
2025-09-17 12:56 ` [PATCH 09/35] hw/i2c: " Akihiko Odaki
2025-09-17 12:56 ` [PATCH 10/35] hw/i386: " Akihiko Odaki
2025-09-18  5:53   ` CLEMENT MATHIEU--DRIF
2025-09-18 12:16     ` Akihiko Odaki
2025-09-17 12:56 ` [PATCH 11/35] hw/intc: " Akihiko Odaki
2025-09-17 12:56 ` [PATCH 12/35] hw/loongarch: " Akihiko Odaki
2025-09-17 12:56 ` [PATCH 13/35] hw/mem: " Akihiko Odaki
2025-09-17 13:24   ` Jonathan Cameron
2025-09-17 13:24     ` Jonathan Cameron via
2025-09-17 13:24     ` Jonathan Cameron via
2025-09-17 13:24     ` Jonathan Cameron via
2025-09-17 12:56 ` [PATCH 14/35] hw/misc: " Akihiko Odaki
2025-09-17 12:56 ` [PATCH 15/35] hw/net: " Akihiko Odaki
2025-09-17 12:56 ` [PATCH 16/35] hw/nubus: " Akihiko Odaki
2025-09-17 12:56 ` [PATCH 17/35] hw/pci: " Akihiko Odaki
2025-09-17 12:56 ` [PATCH 18/35] hw/pci-host: " Akihiko Odaki
2025-09-17 12:56 ` [PATCH 19/35] hw/ppc: " Akihiko Odaki
2025-09-17 12:56 ` [PATCH 20/35] hw/remote: " Akihiko Odaki
2025-09-17 12:56 ` [PATCH 21/35] hw/riscv: " Akihiko Odaki
2025-09-17 12:56 ` [PATCH 22/35] hw/s390x: " Akihiko Odaki
2025-09-17 12:56 ` [PATCH 23/35] hw/scsi: " Akihiko Odaki
2025-09-17 12:56 ` [PATCH 24/35] hw/sd: " Akihiko Odaki
2025-09-17 12:56 ` [PATCH 25/35] hw/sparc: " Akihiko Odaki
2025-09-17 12:56 ` [PATCH 26/35] hw/sparc64: " Akihiko Odaki
2025-09-17 12:56 ` [PATCH 27/35] hw/ssi: " Akihiko Odaki
2025-09-17 12:56 ` [PATCH 28/35] hw/usb: " Akihiko Odaki
2025-09-17 12:56 ` [PATCH 29/35] " Akihiko Odaki
2025-09-17 12:56 ` [PATCH 30/35] hw/virtio: " Akihiko Odaki
2025-09-17 12:56 ` [PATCH 31/35] system/physmem: " Akihiko Odaki
2025-09-17 12:56 ` [PATCH 32/35] target/i386: " Akihiko Odaki
2025-09-17 12:56 ` [PATCH 33/35] target/mips: " Akihiko Odaki
2025-09-17 12:56 ` [PATCH 34/35] target/xtensa: " Akihiko Odaki
2025-09-17 12:56 ` [PATCH 35/35] memory: Drop non-QOM AddressSpace support Akihiko Odaki
2025-09-17 16:01   ` Richard Henderson
2025-09-18 12:39 ` [PATCH 00/35] memory: QOM-ify AddressSpace Cédric Le Goater
2025-09-18 12:47   ` Akihiko Odaki
2025-09-29 20:58     ` Peter Xu [this message]
2025-09-30  8:06       ` Cédric Le Goater

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=aNrzASvJCP_axv22@x1.local \
    --to=peterx@redhat.com \
    --cc=adityag@linux.ibm.com \
    --cc=alex.williamson@redhat.com \
    --cc=alistair.francis@wdc.com \
    --cc=alistair@alistair23.me \
    --cc=andrew.smirnov@gmail.com \
    --cc=andrew@codeconstruct.com.au \
    --cc=arikalo@gmail.com \
    --cc=atar4qemu@gmail.com \
    --cc=aurelien@aurel32.net \
    --cc=b.galvani@gmail.com \
    --cc=balaton@eik.bme.hu \
    --cc=bmeng.cn@gmail.com \
    --cc=borntraeger@linux.ibm.com \
    --cc=clement.mathieu--drif@eviden.com \
    --cc=clg@kaod.org \
    --cc=clg@redhat.com \
    --cc=david@redhat.com \
    --cc=dbarboza@ventanamicro.com \
    --cc=deller@gmx.de \
    --cc=edgar.iglesias@gmail.com \
    --cc=eduardo@habkost.net \
    --cc=elena.ufimtseva@oracle.com \
    --cc=eric.auger@redhat.com \
    --cc=fam@euphon.net \
    --cc=fan.ni@samsung.com \
    --cc=farman@linux.ibm.com \
    --cc=gaosong@loongson.cn \
    --cc=gautam@linux.ibm.com \
    --cc=harshpb@linux.ibm.com \
    --cc=hpoussin@reactos.org \
    --cc=iii@linux.ibm.com \
    --cc=imammedo@redhat.com \
    --cc=jag.raman@oracle.com \
    --cc=jamin_lin@aspeedtech.com \
    --cc=jan.kiszka@web.de \
    --cc=jasowang@redhat.com \
    --cc=jcmvbkbc@gmail.com \
    --cc=jiaxun.yang@flygoat.com \
    --cc=joel@jms.id.au \
    --cc=jonathan.cameron@huawei.com \
    --cc=kvm@vger.kernel.org \
    --cc=laurent@vivier.eu \
    --cc=leetroy@gmail.com \
    --cc=liwei1518@gmail.com \
    --cc=maobibo@loongson.cn \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=mjrosato@linux.ibm.com \
    --cc=mst@redhat.com \
    --cc=mtosatti@redhat.com \
    --cc=ninad@linux.ibm.com \
    --cc=npiggin@gmail.com \
    --cc=odaki@rsg.ci.i.u-tokyo.ac.jp \
    --cc=palmer@dabbelt.com \
    --cc=pasic@linux.ibm.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=qemu-riscv@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=sgarzare@redhat.com \
    --cc=shentey@gmail.com \
    --cc=steven_lee@aspeedtech.com \
    --cc=strahinja.p.jankovic@gmail.com \
    --cc=sundeep.lkml@gmail.com \
    --cc=thuth@redhat.com \
    --cc=xiaoguangrong.eric@gmail.com \
    --cc=yi.l.liu@intel.com \
    --cc=zhiwei_liu@linux.alibaba.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.