[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 09/12] qapi/meson: Restrict qdev code to system-mode emula
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH v2 09/12] qapi/meson: Restrict qdev code to system-mode emulation |
Date: |
Sun, 24 Jan 2021 01:32:56 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 |
On 1/23/21 7:10 PM, Paolo Bonzini wrote:
> On 22/01/21 21:44, Philippe Mathieu-Daudé wrote:
>> Beside a CPU device, user-mode emulation doesn't access
>> anything else from qdev subsystem.
>>
>> Tools don't need anything from qdev.
>
> I prefer to avoid stubs. So if this patch can simply be dropped with no
> effects on 10-12, that's nicer for me.
The alternative is ugly:
-- >8 --
diff --git a/hw/core/qdev.c b/hw/core/qdev.c
index cefc5eaa0a9..d09f32e38d6 100644
--- a/hw/core/qdev.c
+++ b/hw/core/qdev.c
@@ -950,7 +950,9 @@ static void device_finalize(Object *obj)
if (dev->pending_deleted_event) {
g_assert(dev->canonical_path);
+#ifdef CONFIG_USER_ONLY
qapi_event_send_device_deleted(!!dev->id, dev->id,
dev->canonical_path);
+#endif
g_free(dev->canonical_path);
dev->canonical_path = NULL;
}
---
Maybe wrapping it in an inlined function?
- Re: [PATCH v2 05/12] meson: Restrict block subsystem processing, (continued)
- [PATCH v2 10/12] qapi/meson: Remove QMP from user-mode emulation, Philippe Mathieu-Daudé, 2021/01/22
- [PATCH v2 11/12] qapi/meson: Restrict system-mode specific modules, Philippe Mathieu-Daudé, 2021/01/22
- [PATCH v2 12/12] qapi/meson: Restrict UI module to system emulation and tools, Philippe Mathieu-Daudé, 2021/01/22
- Re: [PATCH v2 00/12] buildsys: Do not build various objects if not necessary, Paolo Bonzini, 2021/01/23
- Re: [PATCH v2 00/12] buildsys: Do not build various objects if not necessary, Alex Bennée, 2021/01/26