From: Hongbo Zhang <hongbo.zhang@linaro.org>
To: Markus Armbruster <armbru@redhat.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
Radoslaw Biernacki <radoslaw.biernacki@linaro.org>,
Ard Biesheuvel <ard.biesheuvel@linaro.org>,
QEMU Developers <qemu-devel@nongnu.org>,
Leif Lindholm <leif.lindholm@linaro.org>,
qemu-arm <qemu-arm@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH v7 2/2] hw/arm: Add arm SBSA reference machine, devices part
Date: Sun, 2 Jun 2019 11:16:17 +0800 [thread overview]
Message-ID: <CAHmQWvDC5392euk2zdKhjYBuxHx7Bw7+pnDhTPfqsRnHk51qhw@mail.gmail.com> (raw)
In-Reply-To: <87mujxavy3.fsf@dusky.pond.sub.org>
On Wed, 8 May 2019 at 21:59, Markus Armbruster <armbru@redhat.com> wrote:
>
> Peter Maydell <peter.maydell@linaro.org> writes:
>
> > On Thu, 18 Apr 2019 at 05:05, Hongbo Zhang <hongbo.zhang@linaro.org> wrote:
> >>
> >> Following the previous patch, this patch adds peripheral devices to the
> >> newly introduced SBSA-ref machine.
> >>
> >> Signed-off-by: Hongbo Zhang <hongbo.zhang@linaro.org>
> >> ---
> >> hw/arm/sbsa-ref.c | 451 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
> >> 1 file changed, 451 insertions(+)
> >
> > Some fairly minor comments on this one.
> >
> >> +static void create_flash(const SBSAMachineState *vms,
> >> + MemoryRegion *sysmem,
> >> + MemoryRegion *secure_sysmem)
> >> +{
> >> + /*
> >> + * Create one secure and nonsecure flash devices to fill SBSA_FLASH
> >> + * space in the memmap, file passed via -bios goes in the first one.
> >> + */
> >> + hwaddr flashsize = vms->memmap[SBSA_FLASH].size / 2;
> >> + hwaddr flashbase = vms->memmap[SBSA_FLASH].base;
> >> +
> >> + create_one_flash("sbsa-ref.flash0", flashbase, flashsize,
> >> + bios_name, secure_sysmem);
> >> + create_one_flash("sbsa-ref.flash1", flashbase + flashsize, flashsize,
> >> + NULL, sysmem);
> >> +}
> >
> > I think Markus might have an opinion on the best way to create
> > flash devices on a new board model. Is "just create two flash
> > devices the way the virt board does" the right thing?
>
> Short answer: create flash devices the way the ARM virt board does now,
> after commit e0561e60f17, merged into master today. Possibly less
> backward compatibility stuff you don't need. As is, your patch creates
> them the way the ARM virt board did before commit e0561e60f17. Please
> consider updating.
>
> Longer answer:
>
> The old way to configure block backends is -drive.
>
> The newer -blockdev is more flexible. Libvirt is in the process of
> transitioning from -drive to -blockdev entirely. Other users with
> similar needs for flexibility may do the same. We hope to deprecate
> -drive eventually.
>
> The traditional way to configure onboard flash is -drive if=pflash.
> Works, but we need a way to configure with -blockdev for full
> flexibility, and to support libvirt ditching -drive entirely.
>
> I recently improved the i386 PC machine types (commit ebc29e1beab) and
> the ARM virt machine types (commit e0561e60f17) to support flash
> configuration with -blockdev.
>
> I recommend new boards support flash configuration with -blockdev from
> the start.
>
> Questions?
Sorry for the late response.
Thank you for the detailed explanation, and I'll follow the new
pattern in my next version of patch which will be sent out in a few
days.
next prev parent reply other threads:[~2019-06-02 3:32 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-18 4:04 [Qemu-devel] [PATCH v7 0/2] Add Arm SBSA Reference Machine Hongbo Zhang
2019-04-18 4:04 ` Hongbo Zhang
2019-04-18 4:04 ` [Qemu-devel] [PATCH v7 1/2] hw/arm: Add arm SBSA reference machine, skeleton part Hongbo Zhang
2019-04-18 4:04 ` Hongbo Zhang
2019-04-30 14:03 ` Peter Maydell
2019-04-30 14:03 ` Peter Maydell
2019-05-08 11:22 ` Hongbo Zhang
2019-05-09 14:27 ` Igor Mammedov
2019-05-09 14:40 ` Peter Maydell
2019-04-18 4:04 ` [Qemu-devel] [PATCH v7 2/2] hw/arm: Add arm SBSA reference machine, devices part Hongbo Zhang
2019-04-18 4:04 ` Hongbo Zhang
2019-04-30 14:16 ` Peter Maydell
2019-04-30 14:16 ` Peter Maydell
2019-05-08 11:30 ` Hongbo Zhang
2019-05-08 17:48 ` Radoslaw Biernacki
2019-05-09 8:46 ` Peter Maydell
2019-05-08 13:59 ` Markus Armbruster
2019-06-02 3:16 ` Hongbo Zhang [this message]
2019-06-03 10:54 ` Philippe Mathieu-Daudé
2019-06-16 11:41 ` Hongbo Zhang
2019-06-17 11:08 ` Philippe Mathieu-Daudé
2019-06-17 2:44 ` Hongbo Zhang
2019-04-30 14:18 ` [Qemu-devel] [PATCH v7 0/2] Add Arm SBSA Reference Machine Peter Maydell
2019-04-30 14:18 ` 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=CAHmQWvDC5392euk2zdKhjYBuxHx7Bw7+pnDhTPfqsRnHk51qhw@mail.gmail.com \
--to=hongbo.zhang@linaro.org \
--cc=ard.biesheuvel@linaro.org \
--cc=armbru@redhat.com \
--cc=leif.lindholm@linaro.org \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=radoslaw.biernacki@linaro.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).