From: Alistair Francis <alistair.francis@xilinx.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Thomas Huth <thuth@redhat.com>,
"qemu-devel@nongnu.org Developers" <qemu-devel@nongnu.org>,
Laurent Vivier <laurent@vivier.eu>,
Alistair Francis <alistair.francis@xilinx.com>
Subject: Re: [Qemu-devel] [PATCH] hw/core/generic-loader: Fix crash when running without CPU
Date: Tue, 28 Feb 2017 11:42:01 +1000 [thread overview]
Message-ID: <CAKmqyKPO6MfnwmsyeLLZ5XW0UgovOrWYdgESUT_gGUnBXjmjSA@mail.gmail.com> (raw)
In-Reply-To: <CAFEAcA8O7QEcXQU0iMguSAfT-qsQgmYC_gOCjGmV5ph2w5EVmw@mail.gmail.com>
On Fri, Jan 27, 2017 at 9:06 AM, Peter Maydell <peter.maydell@linaro.org> wrote:
> On 26 January 2017 at 05:50, Thomas Huth <thuth@redhat.com> wrote:
>> I think there is no real use case yet. But this fix is 1) simpler than
>> doing an error_report() + exit() here, and 2) maybe the vision of
>> constructing machines on the fly with QEMU will eventually come true one
>> day in the distant future, so with that patch here, the code would
>> already be prepared for the case when QEMU gets started without CPUs and
>> the CPUs are then later added via QOM...
>
> For the latter to work you'd need to do something more anyway,
> because you still need to be able to say "load this image
> into this CPU's address space", even if the CPUs are getting
> added later via QOM. You'd need to say "delay the image
> load until we actually have a CPU to load it for" or
> something... Passing a NULL address space to load_elf_as()
> etc is saying "I am definitely a board which has
> system_address_space as its one and only address space",
> which is OK if you're a board model but a bit more dubious
> if you're a generic device like this one.
Doesn't this not just crashing at least move us a step closer in the
right direction (even if it isn't the correct address space)? The
other option of just printing an error and exit doesn't seem super
useful.
Either is better then a segfault though, so we need to do something here.
Thanks,
Alistair
>
> thanks
> -- PMM
>
next prev parent reply other threads:[~2017-02-28 1:42 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-25 20:45 [Qemu-devel] [PATCH] hw/core/generic-loader: Fix crash when running without CPU Thomas Huth
2017-01-25 20:52 ` Laurent Vivier
2017-01-25 23:26 ` Alistair Francis
2017-01-26 5:50 ` Thomas Huth
2017-01-26 8:38 ` Laurent Vivier
2017-01-26 22:24 ` Alistair Francis
2017-01-26 23:06 ` Peter Maydell
2017-02-28 1:42 ` Alistair Francis [this message]
2017-02-27 19:36 ` Thomas Huth
2017-04-23 17:34 ` 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=CAKmqyKPO6MfnwmsyeLLZ5XW0UgovOrWYdgESUT_gGUnBXjmjSA@mail.gmail.com \
--to=alistair.francis@xilinx.com \
--cc=laurent@vivier.eu \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@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).