From: Stefan Hajnoczi <stefanha@gmail.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Michael Olbrich <m.olbrich@pengutronix.de>,
Paolo Bonzini <pbonzini@redhat.com>,
qemu-arm <qemu-arm@nongnu.org>,
QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] hw/arm/boot: allow using a command line specified dtb without a kernel
Date: Fri, 7 Oct 2016 15:09:59 +0100 [thread overview]
Message-ID: <20161007140959.GA1831@stefanha-x1.localdomain> (raw)
In-Reply-To: <CAFEAcA-MCsLWEFWcFFQqgOxUb-su+k=tw57X2-z85k1u7+n1FA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2635 bytes --]
On Thu, Sep 29, 2016 at 06:58:37PM -0700, Peter Maydell wrote:
> On 22 September 2016 at 23:33, Michael Olbrich <m.olbrich@pengutronix.de> wrote:
> > On Thu, Sep 22, 2016 at 05:23:17PM +0100, Peter Maydell wrote:
> >> On 10 September 2016 at 16:07, Michael Olbrich <m.olbrich@pengutronix.de> wrote:
> >> > diff --git a/vl.c b/vl.c
> >> > index ee557a1d3f8a..bbea51e0ce7d 100644
> >> > --- a/vl.c
> >> > +++ b/vl.c
> >> > @@ -4335,11 +4335,6 @@ int main(int argc, char **argv, char **envp)
> >> > exit(1);
> >> > }
> >> >
> >> > - if (!linux_boot && qemu_opt_get(machine_opts, "dtb")) {
> >> > - error_report("-dtb only allowed with -kernel option");
> >> > - exit(1);
> >> > - }
> >> > -
> >>
> >> I can see why you want this change, but what worries me a little
> >> is that this is changing the behaviour of -dtb for all QEMU
> >> target architectures, not just ARM (they no longer get a helpful
> >> message on user error). I'm not sure how to address that, though.
> >
> > Would a 'if !arm' be possible or useful here?
>
> It's not quite that simple :-)
>
> I think we have two choices:
> (1) just go ahead and remove the error-check, on the basis that:
> * for some boards -dtb is useful even without -kernel
> * -dtb might be ignored even with -kernel if the specified
> kernel isn't a DTB-aware kernel, but we ignore that
> * -dtb is ignored even with -kernel for target archs/boards
> which don't support or use DTB, and we don't warn about that
> * we don't warn about -kernel being useless for target boards
> that don't pay any attention to it
> (2) add some kind of field to MachineClass indicating whether
> the machine can handle dtb files with/without a kernel
> (and perhaps also whether the machine supports -kernel at all),
> use that to gate the warning messages, and update all the
> machines to correctly indicate what they can or can't handle.
> This would let us give warning messages when the user asks
> for something we're going to ignore (including letting us
> fix up some of the cases we don't currently deal with as
> enumerated above), but it would be a fair chunk of effort
> for a fairly small user-friendliness gain
>
> Thinking about it more, I'm inclining towards the simpler
> option (1). Paolo, do you have an opinion here ?
The error check doesn't seem worth the effort. It's a convenience
message to notify users that their configuration is broken but we can't
detect all the cases where it's broken. It doesn't seem like a good
business to be in :).
Stefan
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]
next prev parent reply other threads:[~2016-10-07 14:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-10 15:07 [Qemu-devel] [PATCH] hw/arm/boot: allow using a command line specified dtb without a kernel Michael Olbrich
2016-09-22 16:23 ` Peter Maydell
2016-09-23 6:33 ` Michael Olbrich
2016-09-30 1:58 ` Peter Maydell
2016-10-07 14:09 ` Stefan Hajnoczi [this message]
2016-10-07 14:33 ` Peter Maydell
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=20161007140959.GA1831@stefanha-x1.localdomain \
--to=stefanha@gmail.com \
--cc=m.olbrich@pengutronix.de \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@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).