All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eduardo Habkost <ehabkost@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Alistair Francis <alistair.francis@xilinx.com>,
	Thomas Huth <thuth@redhat.com>,
	Laurent Vivier <laurent@vivier.eu>,
	"qemu-devel@nongnu.org Developers" <qemu-devel@nongnu.org>,
	Markus Armbruster <armbru@redhat.com>,
	Max Filippov <jcmvbkbc@gmail.com>,
	Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] hw/core/null-machine: Add the possibility to instantiate a CPU, RAM and kernel
Date: Mon, 16 Jan 2017 17:44:53 -0200	[thread overview]
Message-ID: <20170116194453.GD3491@thinpad.lan.raisama.net> (raw)
In-Reply-To: <CAFEAcA9GdZoM0JPX0bf6gnVbnQ-yP7UvbWoj7QLdtd5OomN2zQ@mail.gmail.com>

On Mon, Jan 16, 2017 at 07:27:21PM +0000, Peter Maydell wrote:
> On 16 January 2017 at 19:25, Eduardo Habkost <ehabkost@redhat.com> wrote:
> > On Mon, Jan 16, 2017 at 10:53:07AM -0800, Alistair Francis wrote:
> >> On Sun, Jan 15, 2017 at 11:59 PM, Thomas Huth <thuth@redhat.com> wrote:
> >> > But I think the users also expect the "-kernel" parameter to be working,
> >> > so I think we should add the loader code in null-machine.c anyway.
> >>
> >> I agree that uses probably expect the '-kernel' option to work as well.
> >
> > So, is it possible to write a generic load_kernel() function that
> > simply reuses the generic-loader code?
> 
> No, because users expect -kernel to actually load a Linux kernel
> (meaning with the calling conventions etc the kernel requires),
> whereas generic-loader is just "load a binary blob and start there".

I don't mean a generic function that works for all machines and
architectures, but a generic function that is good enough for
"-machine none". Isn't "load a binary blob and start there"
exactly what machine_none_load_kernel() in this patch does?

> (-kernel is arch-specific and messy and doesn't behave the same
> way on all targets either :-()

I assume this means the kernel loading code used by "-machine
none" will eventually need to call a arch-specific hook, then.
But while we don't have arch-specific hooks implemented, isn't an
implementation based on generic-loader good enough for some
cases?

-- 
Eduardo

  reply	other threads:[~2017-01-16 19:45 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-14  6:51 [Qemu-devel] [PATCH] hw/core/null-machine: Add the possibility to instantiate a CPU, RAM and kernel Thomas Huth
2017-01-14 11:03 ` Laurent Vivier
2017-01-16  7:59   ` Thomas Huth
2017-01-16 18:53     ` Alistair Francis
2017-01-16 19:25       ` Eduardo Habkost
2017-01-16 19:27         ` Peter Maydell
2017-01-16 19:44           ` Eduardo Habkost [this message]
2017-01-17  9:29             ` Peter Maydell
2017-01-17 12:36               ` Eduardo Habkost
2017-01-17 13:02                 ` Thomas Huth
2017-01-16 17:25 ` Eduardo Habkost
2017-01-16 19:52   ` Thomas Huth
2017-01-16 20:07     ` Eduardo Habkost

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=20170116194453.GD3491@thinpad.lan.raisama.net \
    --to=ehabkost@redhat.com \
    --cc=alistair.francis@xilinx.com \
    --cc=armbru@redhat.com \
    --cc=jcmvbkbc@gmail.com \
    --cc=laurent@vivier.eu \
    --cc=pbonzini@redhat.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.