qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Kevin O'Connor <kevin@koconnor.net>
Cc: Peter Maydell <peter.maydell@linaro.org>,
	Eduardo Habkost <ehabkost@redhat.com>,
	Shannon Zhao <zhaoshenglong@huawei.com>,
	qemu-devel@nongnu.org, Michael Walle <michael@walle.cc>,
	qemu-arm@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>,
	Igor Mammedov <imammedo@redhat.com>,
	Richard Henderson <rth@twiddle.net>
Subject: Re: [Qemu-devel] [PATCH RFC] fw-cfg: support writeable blobs
Date: Mon, 22 Feb 2016 21:15:13 +0200	[thread overview]
Message-ID: <20160222211352-mutt-send-email-mst@redhat.com> (raw)
In-Reply-To: <20160222144749.GA6977@morn.lan>

On Mon, Feb 22, 2016 at 09:47:49AM -0500, Kevin O'Connor wrote:
> On Mon, Feb 22, 2016 at 02:41:38PM +0200, Michael S. Tsirkin wrote:
> > Useful to send guest data back to QEMU.
> > The write interface is restricted to DMA.
> > 
> > Suggested-by: Kevin O'Connor <kevin@koconnor.net>
> > Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
> > ---
> > 
> >  hw/lm32/lm32_hwsetup.h    |  2 +-
> >  include/hw/loader.h       |  4 ++--
> >  include/hw/nvram/fw_cfg.h |  3 ++-
> >  hw/arm/virt-acpi-build.c  |  2 +-
> >  hw/core/loader.c          | 19 ++++++++++++-------
> >  hw/i386/acpi-build.c      |  4 ++--
> >  hw/nvram/fw_cfg.c         | 36 ++++++++++++++++++++++++++++--------
> >  7 files changed, 48 insertions(+), 22 deletions(-)
> > 
> > diff --git a/hw/lm32/lm32_hwsetup.h b/hw/lm32/lm32_hwsetup.h
> > index 838754d..805b445 100644
> > --- a/hw/lm32/lm32_hwsetup.h
> > +++ b/hw/lm32/lm32_hwsetup.h
> > @@ -74,7 +74,7 @@ static inline void hwsetup_create_rom(HWSetup *hw,
> >          hwaddr base)
> >  {
> >      rom_add_blob("hwsetup", hw->data, TARGET_PAGE_SIZE,
> > -                 TARGET_PAGE_SIZE, base, NULL, NULL, NULL);
> > +                 TARGET_PAGE_SIZE, base, NULL, NULL, NULL, true);
> >  }
> 
> Instead of supporting "writable blobs", I wonder if it would be
> simpler for both firmware and qemu to implement an "ioctl" like
> interface.  That is, just directly invoke a new fw_cfg callback from
> fw_cfg_dma_transfer() with the data obtained via dma_memory_read().  I
> think that may be more flexible because then the QEMU code doesn't
> have to check for changes to a blob - it would instead be immediately
> invoked upon a change.
> 
> -Kevin

So far, I didn't see any need to invoke callbacks.
All users seem happy with simply using data
written by guest.

OTOH if there's no blob to write, users need to add code
to migrate it manually, blobs are migrated automatically.

-- 
MST

      reply	other threads:[~2016-02-22 19:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-22 12:41 [Qemu-devel] [PATCH RFC] fw-cfg: support writeable blobs Michael S. Tsirkin
2016-02-22 14:26 ` Gerd Hoffmann
2016-02-22 20:12   ` Michael S. Tsirkin
2016-02-23  7:07     ` Gerd Hoffmann
2016-02-23  9:09       ` Michael S. Tsirkin
2016-02-22 14:47 ` Kevin O'Connor
2016-02-22 19:15   ` Michael S. Tsirkin [this message]

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=20160222211352-mutt-send-email-mst@redhat.com \
    --to=mst@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=kevin@koconnor.net \
    --cc=michael@walle.cc \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    --cc=zhaoshenglong@huawei.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).