From: Bernhard Beschow <shentey@gmail.com>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>, qemu-devel@nongnu.org
Cc: "Yi Liu" <yi.l.liu@intel.com>,
"Markus Armbruster" <armbru@redhat.com>,
"Eduardo Habkost" <eduardo@habkost.net>,
"Anthony PERARD" <anthony@xenproject.org>,
"Gustavo Romero" <gustavo.romero@linaro.org>,
"Jason Wang" <jasowang@redhat.com>,
qemu-ppc@nongnu.org, "Michael S. Tsirkin" <mst@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Alexander Graf" <graf@amazon.com>,
"Richard Henderson" <richard.henderson@linaro.org>,
"Stefan Berger" <stefanb@linux.vnet.ibm.com>,
"Stefano Stabellini" <sstabellini@kernel.org>,
"Gerd Hoffmann" <kraxel@redhat.com>,
"Daniel P. Berrangé" <berrange@redhat.com>,
"Edgar E. Iglesias" <edgar.iglesias@gmail.com>,
xen-devel@lists.xenproject.org,
"Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>,
"Alex Williamson" <alex.williamson@redhat.com>,
"Paul Durrant" <paul@xen.org>,
"Clément Mathieu--Drif" <clement.mathieu--drif@eviden.com>,
"Cédric Le Goater" <clg@redhat.com>
Subject: Re: [RFC PATCH 9/9] hw/xen: Have legacy Xen backend inherit from DYNAMIC_SYS_BUS_DEVICE
Date: Tue, 04 Feb 2025 23:12:03 +0000 [thread overview]
Message-ID: <685742EB-EDAA-488F-852C-C0AA24BD4721@gmail.com> (raw)
In-Reply-To: <02ea4b41-3594-4ead-90d3-0ab06f2be7fa@linaro.org>
Am 4. Februar 2025 21:25:46 UTC schrieb "Philippe Mathieu-Daudé" <philmd@linaro.org>:
>Hi Bernhard,
>
>On 27/1/25 10:46, Bernhard Beschow wrote:
>> Am 25. Januar 2025 18:13:43 UTC schrieb "Philippe Mathieu-Daudé" <philmd@linaro.org>:
>>> Because the legacy Xen backend devices can optionally be plugged on the
>>> TYPE_PLATFORM_BUS_DEVICE, have it inherit TYPE_DYNAMIC_SYS_BUS_DEVICE.
>>> Remove the implicit TYPE_XENSYSDEV instance_size.
>>>
>>> Untested, but I'm surprised the legacy devices work because they
>>> had a broken instance size (QDev instead of Sysbus...), so accesses
>>> of XenLegacyDevice fields were overwritting sysbus ones.
>>>
>>> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>>> ---
>>> include/hw/xen/xen_pvdev.h | 3 ++-
>>> hw/xen/xen-legacy-backend.c | 7 ++-----
>>> 2 files changed, 4 insertions(+), 6 deletions(-)
>>>
>>> diff --git a/include/hw/xen/xen_pvdev.h b/include/hw/xen/xen_pvdev.h
>>> index 0c984440476..48950dc2b57 100644
>>> --- a/include/hw/xen/xen_pvdev.h
>>> +++ b/include/hw/xen/xen_pvdev.h
>>> @@ -32,7 +32,8 @@ struct XenDevOps {
>>> };
>>>
>>> struct XenLegacyDevice {
>>> - DeviceState qdev;
>>> + SysBusDevice parent_obj;
>>
>> This then needs sysbus.h rather than qdev-core.h include.
>>
>> Moreover, the patch in the reply needs to be inserted into the series before this patch.
>>
>> Both are needed for the patch to compile.
>
>Per your reply on patch #7, might I include your
>
>Tested-by: Bernhard Beschow <shentey@gmail.com>
>Acked-by: Bernhard Beschow <shentey@gmail.com>
>(or R-b)
I only did a compile test and I'm not a Xen maintainer, so I guess above tags don't apply. Right?
>
>squashing:
>
>-- >8 --
>diff --git a/include/hw/xen/xen_pvdev.h b/include/hw/xen/xen_pvdev.h
>index 48950dc2b57..629bec90d09 100644
>--- a/include/hw/xen/xen_pvdev.h
>+++ b/include/hw/xen/xen_pvdev.h
>@@ -1,7 +1,7 @@
> #ifndef QEMU_HW_XEN_PVDEV_H
> #define QEMU_HW_XEN_PVDEV_H
>
>-#include "hw/qdev-core.h"
>+#include "hw/sysbus.h"
> #include "hw/xen/xen_backend_ops.h"
>
> /* ------------------------------------------------------------- */
>---
>
>?
With the squash applied:
Reviewed-by: Bernhard Beschow <shentey@gmail.com>
next prev parent reply other threads:[~2025-02-04 23:16 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-25 18:13 [PATCH 0/9] hw/sysbus/platform-bus: Introduce TYPE_DYNAMIC_SYS_BUS_DEVICE Philippe Mathieu-Daudé
2025-01-25 18:13 ` [PATCH 1/9] hw/sysbus: Use sizeof(BusState) in main_system_bus_create() Philippe Mathieu-Daudé
2025-01-26 21:42 ` Richard Henderson
2025-01-27 6:21 ` CLEMENT MATHIEU--DRIF
2025-01-25 18:13 ` [PATCH 2/9] hw/sysbus: Declare QOM types using DEFINE_TYPES() macro Philippe Mathieu-Daudé
2025-01-26 21:45 ` Richard Henderson
2025-01-27 6:26 ` CLEMENT MATHIEU--DRIF
2025-01-27 9:23 ` Bernhard Beschow
2025-01-25 18:13 ` [PATCH 3/9] hw/sysbus: Introduce TYPE_DYNAMIC_SYS_BUS_DEVICE Philippe Mathieu-Daudé
2025-01-26 21:47 ` Richard Henderson
2025-01-27 6:19 ` CLEMENT MATHIEU--DRIF
2025-01-25 18:13 ` [PATCH 4/9] hw/vfio: Have VFIO_PLATFORM devices inherit from DYNAMIC_SYS_BUS_DEVICE Philippe Mathieu-Daudé
2025-01-26 21:52 ` Richard Henderson
2025-01-25 18:13 ` [PATCH 5/9] hw/display: Have RAMFB device " Philippe Mathieu-Daudé
2025-01-26 21:53 ` Richard Henderson
2025-01-27 6:17 ` CLEMENT MATHIEU--DRIF
2025-01-25 18:13 ` [PATCH 6/9] hw/i386: Have X86_IOMMU devices " Philippe Mathieu-Daudé
2025-01-26 21:54 ` Richard Henderson
2025-01-27 6:14 ` CLEMENT MATHIEU--DRIF
2025-01-25 18:13 ` [PATCH 7/9] hw/net: Have eTSEC device " Philippe Mathieu-Daudé
2025-01-26 21:54 ` Richard Henderson
2025-01-27 6:21 ` CLEMENT MATHIEU--DRIF
2025-01-27 9:21 ` Bernhard Beschow
2025-01-25 18:13 ` [PATCH 8/9] hw/tpm: Have TPM TIS sysbus " Philippe Mathieu-Daudé
2025-01-26 21:55 ` Richard Henderson
2025-01-27 6:16 ` CLEMENT MATHIEU--DRIF
2025-01-27 16:52 ` Stefan Berger
2025-01-25 18:13 ` [RFC PATCH 9/9] hw/xen: Have legacy Xen backend " Philippe Mathieu-Daudé
2025-01-27 9:41 ` [PATCH] hw/*/xen*: Prefer QOM cast for XenLegacyDevice Bernhard Beschow
2025-02-04 21:23 ` Philippe Mathieu-Daudé
2025-01-27 9:46 ` [RFC PATCH 9/9] hw/xen: Have legacy Xen backend inherit from DYNAMIC_SYS_BUS_DEVICE Bernhard Beschow
2025-02-04 21:25 ` Philippe Mathieu-Daudé
2025-02-04 23:12 ` Bernhard Beschow [this message]
2025-02-05 18:10 ` Philippe Mathieu-Daudé
2025-01-27 0:29 ` [PATCH 0/9] hw/sysbus/platform-bus: Introduce TYPE_DYNAMIC_SYS_BUS_DEVICE Alexander Graf
2025-01-28 10:41 ` Gerd Hoffmann
2025-01-28 10:50 ` Peter Maydell
2025-01-28 12:57 ` BALATON Zoltan
2025-01-28 15:10 ` Philippe Mathieu-Daudé
2025-01-28 19:13 ` Bernhard Beschow
2025-02-10 20:36 ` Philippe Mathieu-Daudé
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=685742EB-EDAA-488F-852C-C0AA24BD4721@gmail.com \
--to=shentey@gmail.com \
--cc=alex.williamson@redhat.com \
--cc=anthony@xenproject.org \
--cc=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=clement.mathieu--drif@eviden.com \
--cc=clg@redhat.com \
--cc=edgar.iglesias@gmail.com \
--cc=eduardo@habkost.net \
--cc=graf@amazon.com \
--cc=gustavo.romero@linaro.org \
--cc=jasowang@redhat.com \
--cc=kraxel@redhat.com \
--cc=marcel.apfelbaum@gmail.com \
--cc=mst@redhat.com \
--cc=paul@xen.org \
--cc=pbonzini@redhat.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=sstabellini@kernel.org \
--cc=stefanb@linux.vnet.ibm.com \
--cc=xen-devel@lists.xenproject.org \
--cc=yi.l.liu@intel.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).