From: Paolo Bonzini <pbonzini@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: "Thomas Huth" <thuth@redhat.com>,
"Michael Clark" <mjc@sifive.com>,
"QEMU Developers" <qemu-devel@nongnu.org>,
"Bastian Koppelmann" <kbastian@mail.uni-paderborn.de>,
"Palmer Dabbelt" <palmer@sifive.com>,
"Sagar Karandikar" <sagark@eecs.berkeley.edu>,
"Marc-André Lureau" <marcandre.lureau@redhat.com>
Subject: Re: [Qemu-devel] [PATCH for-2.12] hw/riscv: Fix crashes with "-nodefaults"
Date: Fri, 23 Mar 2018 15:13:30 +0100 [thread overview]
Message-ID: <ebf41b29-24e1-2f51-e382-22b34260cb34@redhat.com> (raw)
In-Reply-To: <CAFEAcA_HaC6yjX7wW0MscxfiEafFT2uhMiWeN644NTYADhdEnQ@mail.gmail.com>
On 23/03/2018 15:04, Peter Maydell wrote:
>> However, if the machine is emulating a real-world board with a fixed SoC
>> and fixed hardware in the SoC, it makes more sense to create a null backend.
>
> That's a lot of duplicate code to say "oh, this is NULL, create the
> null backend" in lots of different boards :-(
Note it's a null "backend", not necessarily a null "character device".
Your proposal, namely ensuring that be->chr == NULL is handled properly
in qemu_chr_fe_init, would be just fine.
The main point was that the choice of whether to create the device is up
to the board, and there isn't a single answer valid for all boards.
Paolo
next prev parent reply other threads:[~2018-03-23 14:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-23 8:36 [Qemu-devel] [PATCH for-2.12] hw/riscv: Fix crashes with "-nodefaults" Thomas Huth
2018-03-23 8:58 ` Bastian Koppelmann
2018-03-23 9:56 ` Peter Maydell
2018-03-23 12:31 ` Thomas Huth
2018-03-23 13:12 ` Peter Maydell
2018-03-23 14:02 ` Paolo Bonzini
2018-03-23 14:04 ` Peter Maydell
2018-03-23 14:13 ` Paolo Bonzini [this message]
2018-03-23 14:28 ` Peter Maydell
2018-03-23 15:03 ` Paolo Bonzini
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=ebf41b29-24e1-2f51-e382-22b34260cb34@redhat.com \
--to=pbonzini@redhat.com \
--cc=kbastian@mail.uni-paderborn.de \
--cc=marcandre.lureau@redhat.com \
--cc=mjc@sifive.com \
--cc=palmer@sifive.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=sagark@eecs.berkeley.edu \
--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).