From: "Hervé Poussineau" <hpoussin@reactos.org>
To: Thomas Huth <thuth@redhat.com>, qemu-ppc@nongnu.org
Cc: qemu-devel@nongnu.org, David Gibson <david@gibson.dropbear.id.au>,
qemu-trivial@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] hw/isa/pc87312: Mark the device with user_creatable = false
Date: Wed, 13 Sep 2017 23:08:35 +0200 [thread overview]
Message-ID: <67cd5928-8afa-ede8-039b-a0204e504df7@reactos.org> (raw)
In-Reply-To: <1505293637-10450-1-git-send-email-thuth@redhat.com>
Le 13/09/2017 à 11:07, Thomas Huth a écrit :
> QEMU currently aborts if you try to use the device at the command
> line:
>
> $ ppc64-softmmu/qemu-system-ppc64 -S -machine prep -device pc87312
> Unexpected error in qemu_chr_fe_init() at chardev/char-fe.c:222:
> qemu-system-ppc64: -device pc87312: Device 'parallel0' is in use
> Aborted (core dumped)
>
> It uses parallel_hds in its realize function, so I can not be
> instantiated by the user again.
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Hervé Poussineau <hpoussin@reactos.org>
However, a better solution would probably to not directly use parallel_hds[0], but to add some Chardev properties to the device, and to fill them in the mainboard code.
This is noted as a "Future incompatible change" in changelog since 2.8
Hervé
> ---
> hw/isa/pc87312.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/hw/isa/pc87312.c b/hw/isa/pc87312.c
> index 5ce9f0a..48b29e3 100644
> --- a/hw/isa/pc87312.c
> +++ b/hw/isa/pc87312.c
> @@ -386,6 +386,8 @@ static void pc87312_class_init(ObjectClass *klass, void *data)
> dc->reset = pc87312_reset;
> dc->vmsd = &vmstate_pc87312;
> dc->props = pc87312_properties;
> + /* Reason: Uses parallel_hds[0] in realize(), so it can't be used twice */
> + dc->user_creatable = false;
> }
>
> static const TypeInfo pc87312_type_info = {
>
next prev parent reply other threads:[~2017-09-13 21:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-13 9:07 [Qemu-devel] [PATCH] hw/isa/pc87312: Mark the device with user_creatable = false Thomas Huth
2017-09-13 21:08 ` Hervé Poussineau [this message]
2017-09-24 21:09 ` Michael Tokarev
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=67cd5928-8afa-ede8-039b-a0204e504df7@reactos.org \
--to=hpoussin@reactos.org \
--cc=david@gibson.dropbear.id.au \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=qemu-trivial@nongnu.org \
--cc=thuth@redhat.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).