All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Campbell <Ian.Campbell@citrix.com>
To: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
	Jan Beulich <JBeulich@novell.com>
Subject: Re: [PATCH] x86: extend runstate area updates
Date: Sat, 21 Nov 2009 09:19:47 +0000	[thread overview]
Message-ID: <1258795187.11442.4.camel@localhost.localdomain> (raw)
In-Reply-To: <4B0738F7.10700@goop.org>

On Sat, 2009-11-21 at 00:48 +0000, Jeremy Fitzhardinge wrote: 
> On 11/21/09 02:57, Ian Campbell wrote:
> > On Fri, 2009-11-20 at 18:09 +0000, Ian Campbell wrote:
> >   
> >>
> >> I can't see where the guest runstate pointer is supposed to be either
> >> restored or re-setup on resume. I tried adding a setup_runstate_info
> >> to xen_timer_resume (to match the call in xen_timer_setup) but that
> >> seems like it is already too late -- I still see the warnings trigger.
> >> I'm not sure how this is possible since I thought we were in a
> >> stop_machine section at this point.
> >>     
> > The xen_sched_clock calls are as a result of the various printks, e.g.
> > in xen_vcpu_setup, in order to add the timestamp to the output.
> > Therefore we need to ensure we reset the runstate info before any
> > printks.
> >   
> 
> Thanks for investigating this.  Does this mean there was a
> longer-standing bug where the runstate was just completely invalid after
> a save/restore?

I think so, yes.

> > diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
> > index f09e8c3..219fb3f 100644
> > --- a/arch/x86/xen/enlighten.c
> > +++ b/arch/x86/xen/enlighten.c
> > @@ -145,6 +158,8 @@ void xen_vcpu_restore(void)
> >  			    HYPERVISOR_vcpu_op(VCPUOP_down, cpu, NULL))
> >  				BUG();
> >  
> > +			xen_setup_runstate_info(cpu);
> > +
> >  			xen_vcpu_setup(cpu);
> >   
> 
> This is only run when have_vcpu_info_placement is set.  I checked in a
> followup patch to rearrange the loop so that it runs unconditionally,
> but then only does xen_vcpu_setup() when have_vcpu_info_placement.

Make sense, thanks.

I think this is stable material back as far as they are still
maintaining them. The patch which exposed the issue was backported to
3.4.2.

Ian.

  reply	other threads:[~2009-11-21  9:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-18 12:48 [PATCH] x86: extend runstate area updates Jan Beulich
2009-08-18 20:28 ` Jeremy Fitzhardinge
2009-10-02 23:53 ` Jeremy Fitzhardinge
2009-11-20 18:09 ` Ian Campbell
2009-11-20 18:57   ` Ian Campbell
2009-11-21  0:48     ` Jeremy Fitzhardinge
2009-11-21  9:19       ` Ian Campbell [this message]
2009-11-24 15:11       ` Ian Campbell
2009-11-23  8:19     ` Jan Beulich

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=1258795187.11442.4.camel@localhost.localdomain \
    --to=ian.campbell@citrix.com \
    --cc=JBeulich@novell.com \
    --cc=jeremy@goop.org \
    --cc=xen-devel@lists.xensource.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.