[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 05/22] i8259.c: move parent_realize from PICClass to I8259CommonClass
- To: Mark Cave-Ayland <mark.caveayland@xxxxxxxxxxx>
- From: Peter Maydell <peter.maydell@xxxxxxxxxx>
- Date: Tue, 13 Oct 2026 16:54:46 +0100
- Arc-authentication-results: i=1; mx.google.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=xUX7O0hyhnzIaBL4GI7Fs2xl6p868YhCKfTy7miSTVE=; fh=O8iawPLS+ehX6UAPcVgqxNWbNsAxaElMVazIf4YE99A=; b=QjvF40ipFq3tFAQVHJin7CWaeGsKT5JZZeWiLpA258JrpPTIu+hic7X0zMnL6Tj/hD BCIuQzSuXs8BYAlvpliZLFUIRt+u965paTxL3D9LUHgRjQ+9tTUb4lx/fO+J+gBC4fva oUKO15p14x9xA3E29GPG/N69TDrQDoFqTeyxpd2t3uGs0crp7o4Yq20/3PuswEmHPkdm 6lEN23DBl8GapecbF/X/xhzxeyc/Vv/kKQcth9fbF7bTBCEY+0Vx1I8KfEV2ExLOWJ1U kEodpcW3F1opPNIVRk2EIO81u1EJypgHyzE1sxdYB2dLWHuGzTvZz3yUwObE6XS5P6oT a5UQ==; darn=lists.xenproject.org
- Arc-seal: i=1; a=rsa-sha256; t=1791906899; cv=none; d=google.com; s=arc-20260327; b=XKhBcxyA0VLq25NAA/P3IKLEPFKJ+5N8YvJ/v+1qG4dHRjpPfPfR3GYWn2rnU59JYG nfROq1rCI7YM5FQ/uKcVmJ4jrySQIGGIVQzGcVGLnbeEVhrw22G4xrW4vPPs3gpbuEri /dI4aLPCT5uRDBpD+wEVBx8vDJv9/pWfsadir/NfOuFwkVhDmDHDHjt1Dpw8FaizuiJD +/5ltRjeXur4QkAdh2MwgNSi/6i9lPfrdbfmZSdg0ksy0wPwoa+97t5Zn6cbtmMkqsd1 PPqozjXyinP4EaKiZtwRu6LT3V2Hf3Tu3Zj/9AKGdnrGtmKhlLbsXqthYh95mCmt2Eek Ya2Q==
- Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=google header.d=linaro.org header.i="@linaro.org" header.h="Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To:References:MIME-Version"
- Cc: pbonzini@xxxxxxxxxx, richard.henderson@xxxxxxxxxx, mst@xxxxxxxxxx, sstabellini@xxxxxxxxxx, anthony@xxxxxxxxxxxxxx, edgar.iglesias@xxxxxxxxx, qemu-devel@xxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx
- Delivery-date: Tue, 13 Oct 2026 15:55:12 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Wed, 16 Sept 2026 at 11:49, Mark Cave-Ayland
<mark.caveayland@xxxxxxxxxxx> wrote:
>
> Both the emulated and KVM i8259 implementations store a reference to the
> parent_realize function in their respective classes. Start by moving
> parent_realize from PICClass to I8259CommonClass and removing PICClass since
> it is no longer required.
>
> Signed-off-by: Mark Cave-Ayland <mark.caveayland@xxxxxxxxxxx>
This is one of those things where I think we're not 100% consistent
about whether we think the parent_realize field should go in the
child class struct or the parent class struct. The name "parent_realize"
implies it ought to be in the child struct, though, and I think we
do that more often than we put it in the parent class. This also
makes some kind of separation-of-concerns sense too: it's the child
that knows (a) that it exists at all and that (b) it wants to have a
realize method that will mean it needs to chain back to the parent.
The docs for device_class_set_parent_realize() claim the parent
realize ptr is stored "usually in the instance structure" which
I think is just completely wrong.
I could be persuaded otherwise. As usual with QOM/qdev, I'm
mostly interested in (a) consistency and (b) documenting what the
"right thing" is. Realize, reset and unrealize are the three
methods where QOM's lack of convenient support for "child
implementation of method will need to chain to parent impl"
is most awkward.
thanks
-- PMM
|