From: Hu Tao <hutao@cn.fujitsu.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v20 4/7] pvpanic: pass configurable ioport to seabios
Date: Thu, 25 Apr 2013 10:33:48 +0800 [thread overview]
Message-ID: <20130425023348.GG10084@localhost.localdomain> (raw)
In-Reply-To: <87vc7b99bl.fsf@blackfin.pond.sub.org>
On Wed, Apr 24, 2013 at 06:34:22PM +0200, Markus Armbruster wrote:
> Hu Tao <hutao@cn.fujitsu.com> writes:
>
> > This lets seabios patch the corresponding SSDT entry.
> >
> > Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
> > ---
> > hw/misc/pvpanic.c | 14 ++++++++++++++
> > hw/nvram/fw_cfg.c | 8 +++++++-
> > include/hw/nvram/fw_cfg.h | 2 ++
> > 3 files changed, 23 insertions(+), 1 deletion(-)
> >
> > diff --git a/hw/misc/pvpanic.c b/hw/misc/pvpanic.c
> > index 01cfe0b..a80fae5 100644
> > --- a/hw/misc/pvpanic.c
> > +++ b/hw/misc/pvpanic.c
> > @@ -18,6 +18,8 @@
> > #include "sysemu/sysemu.h"
> > #include "qemu/log.h"
> >
> > +#include "hw/nvram/fw_cfg.h"
> > +
> > /* The bit of supported pv event */
> > #define PVPANIC_F_PANICKED 0
> >
> > @@ -86,10 +88,22 @@ static const MemoryRegionOps pvpanic_ops = {
> > static int pvpanic_isa_initfn(ISADevice *dev)
> > {
> > PVPanicState *s = ISA_PVPANIC_DEVICE(dev);
> > + static bool port_configured;
> > + void *fw_cfg;
> >
> > memory_region_init_io(&s->io, &pvpanic_ops, s, "pvpanic", 1);
> > isa_register_ioport(dev, &s->io, s->ioport);
> >
> > + if (!port_configured) {
> > + fw_cfg = object_resolve_path("/machine/fw_cfg", NULL);
> > + if (fw_cfg) {
> > + fw_cfg_add_file(fw_cfg, "etc/pvpanic-port",
> > + g_memdup(&s->ioport, sizeof(s->ioport)),
> > + sizeof(s->ioport));
> > + port_configured = true;
> > + }
> > + }
> > +
> > return 0;
> > }
> >
> > diff --git a/hw/nvram/fw_cfg.c b/hw/nvram/fw_cfg.c
> > index 97bba87..1a7e49c 100644
> > --- a/hw/nvram/fw_cfg.c
> > +++ b/hw/nvram/fw_cfg.c
> > @@ -489,11 +489,17 @@ FWCfgState *fw_cfg_init(uint32_t ctl_port, uint32_t data_port,
> > dev = qdev_create(NULL, "fw_cfg");
> > qdev_prop_set_uint32(dev, "ctl_iobase", ctl_port);
> > qdev_prop_set_uint32(dev, "data_iobase", data_port);
> > - qdev_init_nofail(dev);
> > d = SYS_BUS_DEVICE(dev);
> >
> > s = DO_UPCAST(FWCfgState, busdev.qdev, dev);
> >
> > + if (!object_resolve_path("/machine/fw_cfg", NULL)) {
> > + object_property_add_child(qdev_get_machine(), "fw_cfg", OBJECT(s),
> > + NULL);
> > + }
> > +
> > + qdev_init_nofail(dev);
> > +
> > if (ctl_addr) {
> > sysbus_mmio_map(d, 0, ctl_addr);
> > }
> > diff --git a/include/hw/nvram/fw_cfg.h b/include/hw/nvram/fw_cfg.h
> > index 05c8df1..07cc941 100644
> > --- a/include/hw/nvram/fw_cfg.h
> > +++ b/include/hw/nvram/fw_cfg.h
> > @@ -1,6 +1,8 @@
> > #ifndef FW_CFG_H
> > #define FW_CFG_H
> >
> > +#include "exec/hwaddr.h"
> > +
> > #define FW_CFG_SIGNATURE 0x00
> > #define FW_CFG_ID 0x01
> > #define FW_CFG_UUID 0x02
>
> Since you have to respin anyway, to correct suppression of the new
> device for pc-0.13 and older, please consider splitting off this last
> patch hunk into its own bug-fix patch.
OK.
next prev parent reply other threads:[~2013-04-25 2:34 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-19 7:06 [Qemu-devel] [PATCH v20 0/7] Add pvpanic device to deal with guest panic event Hu Tao
2013-04-19 7:06 ` [Qemu-devel] [PATCH v20 1/7] add a new runstate: RUN_STATE_GUEST_PANICKED Hu Tao
2013-04-19 7:06 ` [Qemu-devel] [PATCH v20 2/7] add a new qevent: QEVENT_GUEST_PANICKED Hu Tao
2013-04-19 7:06 ` [Qemu-devel] [PATCH v20 3/7] introduce a new qom device to deal with panicked event Hu Tao
2013-04-19 7:06 ` [Qemu-devel] [PATCH v20 4/7] pvpanic: pass configurable ioport to seabios Hu Tao
2013-04-24 16:34 ` Markus Armbruster
2013-04-25 2:33 ` Hu Tao [this message]
2013-04-24 16:35 ` Markus Armbruster
2013-04-25 5:43 ` Hu Tao
2013-04-25 12:59 ` Markus Armbruster
2013-04-19 7:06 ` [Qemu-devel] [PATCH v20 5/7] pvpanic: add document of pvpanic Hu Tao
2013-04-19 7:06 ` [Qemu-devel] [PATCH v20 6/7] pvpanic: create pvpanic by default for machine 1.5 Hu Tao
2013-04-24 16:33 ` Markus Armbruster
2013-04-25 2:33 ` Hu Tao
2013-04-19 7:06 ` [Qemu-devel] [PATCH v20 7/7] Wire up disabled wait a panicked event on s390 Hu Tao
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=20130425023348.GG10084@localhost.localdomain \
--to=hutao@cn.fujitsu.com \
--cc=armbru@redhat.com \
--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).