qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
To: "Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	David Gibson <david@gibson.dropbear.id.au>
Cc: Peter Maydell <peter.maydell@linaro.org>,
	Gerd Hoffmann <kraxel@redhat.com>,
	"qemu-ppc@nongnu.org list:PowerPC" <qemu-ppc@nongnu.org>,
	"qemu-devel@nongnu.org Developers" <qemu-devel@nongnu.org>,
	Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [PATCH v5 4/8] vt82c686: Introduce abstract TYPE_VIA_ISA and base vt82c686b_isa on it
Date: Tue, 9 Mar 2021 18:05:23 +0100	[thread overview]
Message-ID: <CAAdtpL7+ev=e15xpG1Bsg4KbFDUUaRFzZY=gMxcZ9V7yzw5nyw@mail.gmail.com> (raw)
In-Reply-To: <f8f3f750-b9b5-8a99-4df7-93bb7daf0cb6@amsat.org>

On Tue, Mar 9, 2021 at 6:03 PM Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>
> +Gerd
>
> On 3/9/21 5:00 PM, Dr. David Alan Gilbert wrote:
> > * David Gibson (david@gibson.dropbear.id.au) wrote:
> >> On Thu, Mar 04, 2021 at 11:42:10PM +0100, Philippe Mathieu-Daudé wrote:
> >>> On 3/4/21 9:16 PM, BALATON Zoltan wrote:
> >>>> On Thu, 4 Mar 2021, Philippe Mathieu-Daudé wrote:
> >>>>> On 3/2/21 10:11 PM, BALATON Zoltan wrote:
> >>>>>> To allow reusing ISA bridge emulation for vt8231_isa move the device
> >>>>>> state of vt82c686b_isa emulation in an abstract via_isa class.
> >>>>>>
> >>>>>> Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
> >>>>>> ---
> >>>>>>  hw/isa/vt82c686.c        | 70 ++++++++++++++++++++++------------------
> >>>>>>  include/hw/pci/pci_ids.h |  2 +-
> >>>>>>  2 files changed, 40 insertions(+), 32 deletions(-)
> >>>>>>
> >>>>>> diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c
> >>>>>> index 72234bc4d1..5137f97f37 100644
> >>>>>> --- a/hw/isa/vt82c686.c
> >>>>>> +++ b/hw/isa/vt82c686.c
> >>>>>> @@ -609,24 +609,48 @@ static const TypeInfo vt8231_superio_info = {
> >>>>>>  };
> >>>>>>
> >>>>>>
> >>>>>> -OBJECT_DECLARE_SIMPLE_TYPE(VT82C686BISAState, VT82C686B_ISA)
> >>>>>> +#define TYPE_VIA_ISA "via-isa"
> >>>>>> +OBJECT_DECLARE_SIMPLE_TYPE(ViaISAState, VIA_ISA)
> >>>>>>
> >>>>>> -struct VT82C686BISAState {
> >>>>>> +struct ViaISAState {
> >>>>>>      PCIDevice dev;
> >>>>>>      qemu_irq cpu_intr;
> >>>>>>      ViaSuperIOState *via_sio;
> >>>>>>  };
> >>>>>>
> >>>>>> +static const VMStateDescription vmstate_via = {
> >>>>>> +    .name = "via-isa",
> >>>>>
> >>>>> You changed the migration stream name, so I think we have
> >>>>> a problem with migration... No clue how to do that properly.
> >>>>
> >>>> I don't think these machines support migration or state description of
> >>>> vt86c686b was not missing something before these patches that would make
> >>>> it not work anyway so I did not worry about this too much. I doubt
> >>>> anybody wants to migrate a fuloong2e machine so this should not be a
> >>>> problem in practice but maybe you can mention it in the release notes if
> >>>> you think that would be necessary.
> >>>
> >>> Maybe just add in the description:
> >>>
> >>>  This change breaks migration back compatibility, but
> >>>  this is not an issue for the Fuloong2E machine.
> >>
> >> Hrm.  If migration was never supported, why is there a vmstate
> >> description there at all though?
> >>
> >> That said, I don't think breaking compat is a problem: that's only an
> >> issue where we actually have versioned machine types, which covers
> >> only pc, pseries, arm virt and a very few others.  I don't think this
> >> device was used on any of them.
> >
> > Except 'vt82c686b-usb-uhci' is a generic PCI device that anyone can
> > instantiate, so it's not actually Fuloong specific.
>
> I tend to see this as a bug, as this is a function specific to the
> southbridge chipset and isn't meant to be used apart...
>
> If this isn't a feature but really a bug, a simple way to clean this
> is to make struct UHCIInfo and usb_uhci_common_realize() public, and
> type_register "vt82c686b-usb-uhci" elsewhere.
>
> Gerd would that work with you?

Or is it too late, we can not make this device kconfig-selectable now?


  reply	other threads:[~2021-03-09 19:37 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-02 21:11 [PATCH v5 0/8] Pegasos2 emulation BALATON Zoltan
2021-03-02 21:11 ` [PATCH v5 7/8] hw/pci-host: Add emulation of Marvell MV64361 PPC system controller BALATON Zoltan
2021-03-02 21:11 ` [PATCH v5 6/8] hw/isa/Kconfig: Add missing dependency VIA VT82C686 -> APM BALATON Zoltan
2021-03-02 21:11 ` [PATCH v5 3/8] vt82c686: Add VT8231_SUPERIO based on VIA_SUPERIO BALATON Zoltan
2021-03-02 21:11 ` [PATCH v5 8/8] hw/ppc: Add emulation of Genesi/bPlan Pegasos II BALATON Zoltan
2021-03-02 21:11 ` [PATCH v5 1/8] vt82c686: Implement control of serial port io ranges via config regs BALATON Zoltan
2021-03-02 21:11 ` [PATCH v5 5/8] vt82c686: Add emulation of VT8231 south bridge BALATON Zoltan
2021-03-04 20:08   ` Philippe Mathieu-Daudé
2021-03-02 21:11 ` [PATCH v5 2/8] vt82c686: QOM-ify superio related functionality BALATON Zoltan
2021-03-02 21:11 ` [PATCH v5 4/8] vt82c686: Introduce abstract TYPE_VIA_ISA and base vt82c686b_isa on it BALATON Zoltan
2021-03-04 19:58   ` Philippe Mathieu-Daudé
2021-03-04 20:16     ` BALATON Zoltan
2021-03-04 22:42       ` Philippe Mathieu-Daudé
2021-03-05  1:02         ` David Gibson
2021-03-09  9:12           ` Philippe Mathieu-Daudé
2021-03-09 22:44             ` David Gibson
2021-03-09 16:00           ` Dr. David Alan Gilbert
2021-03-09 16:09             ` BALATON Zoltan
2021-03-09 17:03             ` Philippe Mathieu-Daudé
2021-03-09 17:05               ` Philippe Mathieu-Daudé [this message]
2021-03-10 10:17               ` Gerd Hoffmann

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='CAAdtpL7+ev=e15xpG1Bsg4KbFDUUaRFzZY=gMxcZ9V7yzw5nyw@mail.gmail.com' \
    --to=f4bug@amsat.org \
    --cc=david@gibson.dropbear.id.au \
    --cc=dgilbert@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    /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).