From: CLEMENT MATHIEU--DRIF <clement.mathieu--drif@eviden.com>
To: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Cc: "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>,
"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>,
"Peter Xu" <peterx@redhat.com>,
"Marcelo Tosatti" <mtosatti@redhat.com>,
"Max Filippov" <jcmvbkbc@gmail.com>,
"qemu-arm@nongnu.org" <qemu-arm@nongnu.org>,
"qemu-ppc@nongnu.org" <qemu-ppc@nongnu.org>,
"qemu-riscv@nongnu.org" <qemu-riscv@nongnu.org>,
"qemu-s390x@nongnu.org" <qemu-s390x@nongnu.org>,
"qemu-block@nongnu.org" <qemu-block@nongnu.org>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
"Alex Williamson" <alex.williamson@redhat.com>,
"Cédric Le Goater" <clg@redhat.com>,
"Stefano Garzarella" <sgarzare@redhat.com>,
"Alistair Francis" <alistair.francis@wdc.com>
Subject: Re: [PATCH 10/35] hw/i386: QOM-ify AddressSpace
Date: Thu, 18 Sep 2025 05:53:45 +0000 [thread overview]
Message-ID: <d571d1aa47ddbf466e9e8edf1cbb7d29f3bb0a83.camel@eviden.com> (raw)
In-Reply-To: <20250917-qom-v1-10-7262db7b0a84@rsg.ci.i.u-tokyo.ac.jp>
Hi Akihiko,
Why do we change the naming scheme in amd-vi?
Did you have any issue with the old one?
If we decide not to stick to the old one, maybe splitting the slot and function would be convenient.
Thanks
On Wed, 2025-09-17 at 21:56 +0900, Akihiko Odaki wrote:
>
>
> 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.
>
> The name arguments were used to distinguish AddresSpaces in debugging
> output, but they will represent property names after QOM-ification and
> debugging output will show QOM paths. So change them to make them more
> concise and also avoid conflicts with other properties.
>
> Signed-off-by: Akihiko Odaki <[odaki@rsg.ci.i.u-tokyo.ac.jp](mailto:odaki@rsg.ci.i.u-tokyo.ac.jp)>
> ---
> hw/i386/amd_iommu.c | 5 +++--
> hw/i386/intel_iommu.c | 6 ++++--
> 2 files changed, 7 insertions(+), 4 deletions(-)
>
> diff --git a/hw/i386/amd_iommu.c b/hw/i386/amd_iommu.c
> index af239390ba04..541b9a8c89e1 100644
> --- a/hw/i386/amd_iommu.c
> +++ b/hw/i386/amd_iommu.c
> @@ -1494,7 +1494,7 @@ static AddressSpace *amdvi_host_dma_iommu(PCIBus *bus, void *opaque, int devfn)
>
> /* set up AMD-Vi region */
> if (!iommu_as[devfn]) {
> - snprintf(name, sizeof(name), "amd_iommu_devfn_%d", devfn);
> + snprintf(name, sizeof(name), "as-%d", devfn);
>
> iommu_as[devfn] = g_new0(AMDVIAddressSpace, 1);
> iommu_as[devfn]->bus_num = (uint8_t)bus_num;
> @@ -1522,7 +1522,8 @@ static AddressSpace *amdvi_host_dma_iommu(PCIBus *bus, void *opaque, int devfn)
> "amd_iommu", UINT64_MAX);
> memory_region_init(&amdvi_dev_as->root, OBJECT(s),
> "amdvi_root", UINT64_MAX);
> - address_space_init(&amdvi_dev_as->as, NULL, &amdvi_dev_as->root, name);
> + address_space_init(&amdvi_dev_as->as, OBJECT(s), &amdvi_dev_as->root,
> + name);
> memory_region_add_subregion_overlap(&amdvi_dev_as->root, 0,
> MEMORY_REGION(&amdvi_dev_as->iommu),
> 0);
> diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c
> index 1f40d904326e..5e6d7d510e03 100644
> --- a/hw/i386/intel_iommu.c
> +++ b/hw/i386/intel_iommu.c
> @@ -4221,6 +4221,7 @@ VTDAddressSpace *vtd_find_add_as(IntelIOMMUState *s, PCIBus *bus,
> vtd_iommu_unlock(s);
>
> if (!vtd_dev_as) {
> + g_autofree char *as_name = NULL;
> struct vtd_as_key *new_key;
> /* Slow path */
>
> @@ -4263,8 +4264,9 @@ VTDAddressSpace *vtd_find_add_as(IntelIOMMUState *s, PCIBus *bus,
> vtd_dev_as->iova_tree = iova_tree_new();
>
> memory_region_init(&vtd_dev_as->root, OBJECT(s), name, UINT64_MAX);
> - address_space_init(&vtd_dev_as->as, NULL, &vtd_dev_as->root,
> - "vtd-root");
> + as_name = g_strconcat(name, "-as", NULL);
> + address_space_init(&vtd_dev_as->as, OBJECT(s), &vtd_dev_as->root,
> + as_name);
>
> /*
> * Build the DMAR-disabled container with aliases to the
>
> --
> 2.51.0
>
next prev parent reply other threads:[~2025-09-18 5:55 UTC|newest]
Thread overview: 50+ 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 [this message]
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 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
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=d571d1aa47ddbf466e9e8edf1cbb7d29f3bb0a83.camel@eviden.com \
--to=clement.mathieu--drif@eviden.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=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=peterx@redhat.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).