qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
To: BALATON Zoltan <balaton@eik.bme.hu>,
	qemu-devel@nongnu.org, qemu-ppc@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>,
	David Gibson <david@gibson.dropbear.id.au>,
	Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [PATCH v6 2/8] vt82c686: QOM-ify superio related functionality
Date: Wed, 10 Mar 2021 00:58:05 +0100	[thread overview]
Message-ID: <4657f73d-570a-77df-6272-704a1cc128cd@amsat.org> (raw)
In-Reply-To: <80bbf52721592742e7ca8ac5d4eea3ddd0c125b6.1615321729.git.balaton@eik.bme.hu>

On 3/9/21 9:28 PM, BALATON Zoltan wrote:
> Collect superio functionality and its controlling config registers
> handling in an abstract VIA_SUPERIO class that is a subclass of
> ISA_SUPERIO and put vt82c686b specific parts in a subclass of this
> abstract class.
> 
> Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
> ---
>  hw/isa/vt82c686.c         | 240 ++++++++++++++++++++++++--------------
>  include/hw/isa/vt82c686.h |   1 -
>  2 files changed, 150 insertions(+), 91 deletions(-)

>  static MemoryRegion *find_subregion(ISADevice *d, MemoryRegion *parent,
>                                      int offs)
> @@ -270,10 +279,76 @@ static MemoryRegion *find_subregion(ISADevice *d, MemoryRegion *parent,
>      return mr;
>  }
>  
> -static void superio_cfg_write(void *opaque, hwaddr addr, uint64_t data,
> -                              unsigned size)
> +static void via_superio_realize(DeviceState *d, Error **errp)
> +{
> +    ViaSuperIOState *s = VIA_SUPERIO(d);
> +    ISASuperIOClass *ic = ISA_SUPERIO_GET_CLASS(s);
> +    int i;
> +
> +    assert(s->io_ops);
> +    ic->parent_realize(d, errp);
> +    if (*errp) {

Unfortunately this doesn't work because errp can be NULL...
This is described in "qapi/error.h". You have to use a local_err.

> +        return;
> +    }


  reply	other threads:[~2021-03-10  0:02 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-09 20:28 [PATCH v6 0/8] Pegasos2 emulation BALATON Zoltan
2021-03-02  8:05 ` [PATCH v6 6/8] hw/isa/Kconfig: Add missing dependency VIA VT82C686 -> APM BALATON Zoltan
2021-04-12 18:31   ` Richard Henderson
2021-03-09 20:28 ` [PATCH v6 1/8] vt82c686: Implement control of serial port io ranges via config regs BALATON Zoltan
2021-03-09 20:28 ` [PATCH v6 5/8] vt82c686: Add emulation of VT8231 south bridge BALATON Zoltan
2021-03-09 20:28 ` [PATCH v6 3/8] vt82c686: Add VT8231_SUPERIO based on VIA_SUPERIO BALATON Zoltan
2021-03-09 20:28 ` [PATCH v6 4/8] vt82c686: Introduce abstract TYPE_VIA_ISA and base vt82c686b_isa on it BALATON Zoltan
2021-03-10  0:02   ` Philippe Mathieu-Daudé
2021-03-10  2:36     ` BALATON Zoltan
2021-03-09 20:28 ` [PATCH v6 2/8] vt82c686: QOM-ify superio related functionality BALATON Zoltan
2021-03-09 23:58   ` Philippe Mathieu-Daudé [this message]
2021-03-09 20:28 ` [PATCH v6 7/8] hw/pci-host: Add emulation of Marvell MV64361 PPC system controller BALATON Zoltan
2021-03-09 20:28 ` [PATCH v6 8/8] hw/ppc: Add emulation of Genesi/bPlan Pegasos II BALATON Zoltan

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=4657f73d-570a-77df-6272-704a1cc128cd@amsat.org \
    --to=f4bug@amsat.org \
    --cc=balaton@eik.bme.hu \
    --cc=david@gibson.dropbear.id.au \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --subject='Re: [PATCH v6 2/8] vt82c686: QOM-ify superio related functionality' \
    /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

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).