[Crash-utility] [PATCH] Remove struct domain::is_polling
Itsuro ODA
oda at valinux.co.jp
Mon Dec 1 22:32:10 UTC 2008
Hi,
Looks good to me.
Acked-by: Itsuro Oda <oda at valinux.co.jp>
Thanks
Itsuro Oda
On Mon, 1 Dec 2008 14:17:44 -0500 (EST)
Dave Anderson <anderson at redhat.com> wrote:
>
> Hi Bernhard,
>
> Looks fine to me, although I'd prefer to continue to print
> the "-1" in xen_hyper_dump_xen_hyper_offset_table(), the
> same way that "help -o" does for all the Linux offsets.
>
> CC'ing the xencrash maintainer Itsuro Oda to get his ACK.
>
> Thanks,
> Dave
>
>
> ----- "Bernhard Walle" <bwalle at suse.de> wrote:
>
> > According to that change set in the Xen unstable branch
> >
> > changeset: 18428:ae9b223a675d
> > user: Keir Fraser <keir.fraser at citrix.com>
> > date: Thu Sep 04 14:38:26 2008 +0100
> > files: xen/common/domain.c
> > xen/common/event_channel.c
> > xen/common/schedule.c
> > xen/include/xen/sched.h
> > description:
> > More efficient implementation of SCHEDOP_poll when polling a
> > single port.
> > Signed-off-by: Keir Fraser <keir.fraser at citrix.com>
> >
> > the member "is_polling" of struct domain will be removed in Xen 4.4.
> > This patch fixes the problem that a dump cannot be opened in
> > Hypervisor mode in
> > crash when produced by such a Xen version. That's the error message of
> > Crash:
> >
> > crash: invalid structure member offset: domain_is_polling
> > FILE: xen_hyper.c LINE: 1182 FUNCTION:
> > xen_hyper_store_domain_context()
> >
> > [./crash] error trace: 52bfc2 => 52e401 => 52ee07 => 508062
> >
> > 508062: OFFSET_verify+168
> > 52ee07: xen_hyper_store_domain_context+742
> > 52e401: xen_hyper_refresh_domain_context_space+196
> > 52bfc2: xen_hyper_domain_init+959
> >
> >
> > Signed-off-by: Bernhard Walle <bwalle at suse.de>
> >
> > ---
> > xen_hyper.c | 9 ++++++++-
> > xen_hyper_dump_tables.c | 6 ++++--
> > 2 files changed, 12 insertions(+), 3 deletions(-)
> >
> > --- a/xen_hyper.c
> > +++ b/xen_hyper.c
> > @@ -188,7 +188,13 @@ xen_hyper_domain_init(void)
> > XEN_HYPER_MEMBER_OFFSET_INIT(domain_is_hvm, "domain", "is_hvm");
> > XEN_HYPER_MEMBER_OFFSET_INIT(domain_is_privileged, "domain",
> > "is_privileged");
> > XEN_HYPER_MEMBER_OFFSET_INIT(domain_debugger_attached, "domain",
> > "debugger_attached");
> > +
> > + /*
> > + * Will be removed in Xen 4.4 (hg ae9b223a675d),
> > + * need to check that with XEN_HYPER_VALID_MEMBER() before using
> > + */
> > XEN_HYPER_MEMBER_OFFSET_INIT(domain_is_polling, "domain",
> > "is_polling");
> > +
> > XEN_HYPER_MEMBER_OFFSET_INIT(domain_is_dying, "domain",
> > "is_dying");
> > XEN_HYPER_MEMBER_OFFSET_INIT(domain_is_paused_by_controller,
> > "domain", "is_paused_by_controller");
> > XEN_HYPER_MEMBER_OFFSET_INIT(domain_is_shutting_down, "domain",
> > "is_shutting_down");
> > @@ -1179,7 +1185,8 @@ xen_hyper_store_domain_context(struct xe
> > dc->domain_flags |= XEN_HYPER_DOMS_privileged;
> > } else if (*(dp + XEN_HYPER_OFFSET(domain_debugger_attached))) {
> > dc->domain_flags |= XEN_HYPER_DOMS_debugging;
> > - } else if (*(dp + XEN_HYPER_OFFSET(domain_is_polling))) {
> > + } else if (XEN_HYPER_VALID_MEMBER(domain_is_polling) &&
> > + *(dp + XEN_HYPER_OFFSET(domain_is_polling))) {
> > dc->domain_flags |= XEN_HYPER_DOMS_polling;
> > } else if (*(dp +
> > XEN_HYPER_OFFSET(domain_is_paused_by_controller))) {
> > dc->domain_flags |= XEN_HYPER_DOMS_ctrl_pause;
> > --- a/xen_hyper_dump_tables.c
> > +++ b/xen_hyper_dump_tables.c
> > @@ -775,8 +775,10 @@ xen_hyper_dump_xen_hyper_offset_table(ch
> > (buf, "%ld\n", xen_hyper_offset_table.domain_is_privileged));
> > XEN_HYPER_PRI(fp, len, "domain_debugger_attached: ", buf, flag,
> > (buf, "%ld\n", xen_hyper_offset_table.domain_debugger_attached));
> > - XEN_HYPER_PRI(fp, len, "domain_is_polling: ", buf, flag,
> > - (buf, "%ld\n", xen_hyper_offset_table.domain_is_polling));
> > + if (XEN_HYPER_VALID_MEMBER(domain_is_polling)) {
> > + XEN_HYPER_PRI(fp, len, "domain_is_polling: ", buf, flag,
> > + (buf, "%ld\n", xen_hyper_offset_table.domain_is_polling));
> > + }
> > XEN_HYPER_PRI(fp, len, "domain_is_dying: ", buf, flag,
> > (buf, "%ld\n", xen_hyper_offset_table.domain_is_dying));
> > XEN_HYPER_PRI(fp, len, "domain_is_paused_by_controller: ", buf,
> > flag,
> >
> > --
> > Crash-utility mailing list
> > Crash-utility at redhat.com
> > https://www.redhat.com/mailman/listinfo/crash-utility
--
Itsuro ODA <oda at valinux.co.jp>
More information about the Crash-utility
mailing list