From: David Gibson <david@gibson.dropbear.id.au>
To: Greg Kurz <groug@kaod.org>
Cc: qemu-devel@nongnu.org, qemu-ppc@nongnu.org
Subject: Re: [Qemu-devel] [PATCH for-2.13] spapr: drop useless dynamic sysbus device sanity check
Date: Thu, 12 Apr 2018 12:23:06 +1000 [thread overview]
Message-ID: <20180412022306.GE9425@umbus.fritz.box> (raw)
In-Reply-To: <152345888086.82965.6686500865958674552.stgit@bahia.lan>
[-- Attachment #1: Type: text/plain, Size: 1852 bytes --]
On Wed, Apr 11, 2018 at 05:01:20PM +0200, Greg Kurz wrote:
> Since commit 7da79a167aa11, the machine class init function registers
> dynamic sysbus device types it supports. Passing an unsupported device
> type on the command line causes QEMU to exit with an error message
> just after machine init.
>
> It is hence not needed to do the same sanity check at machine reset.
>
> Signed-off-by: Greg Kurz <groug@kaod.org>
Applied to ppc-for-2.13, thanks.
> ---
> hw/ppc/spapr.c | 18 ------------------
> 1 file changed, 18 deletions(-)
>
> diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
> index 3ffadd6ac7ce..637e50e6d10b 100644
> --- a/hw/ppc/spapr.c
> +++ b/hw/ppc/spapr.c
> @@ -1440,21 +1440,6 @@ void spapr_setup_hpt_and_vrma(sPAPRMachineState *spapr)
> }
> }
>
> -static void find_unknown_sysbus_device(SysBusDevice *sbdev, void *opaque)
> -{
> - bool matched = false;
> -
> - if (object_dynamic_cast(OBJECT(sbdev), TYPE_SPAPR_PCI_HOST_BRIDGE)) {
> - matched = true;
> - }
> -
> - if (!matched) {
> - error_report("Device %s is not supported by this machine yet.",
> - qdev_fw_name(DEVICE(sbdev)));
> - exit(1);
> - }
> -}
> -
> static int spapr_reset_drcs(Object *child, void *opaque)
> {
> sPAPRDRConnector *drc =
> @@ -1478,9 +1463,6 @@ static void spapr_machine_reset(void)
> void *fdt;
> int rc;
>
> - /* Check for unknown sysbus devices */
> - foreach_dynamic_sysbus_device(find_unknown_sysbus_device, NULL);
> -
> spapr_caps_reset(spapr);
>
> first_ppc_cpu = POWERPC_CPU(first_cpu);
>
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2018-04-12 2:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-11 15:01 [Qemu-devel] [PATCH for-2.13] spapr: drop useless dynamic sysbus device sanity check Greg Kurz
2018-04-12 2:23 ` David Gibson [this message]
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=20180412022306.GE9425@umbus.fritz.box \
--to=david@gibson.dropbear.id.au \
--cc=groug@kaod.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).