Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 May 2017 20:27:25 +0300
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Jonathan Anderson <jonathan@FreeBSD.org>
Cc:        Poul-Henning Kamp <phk@phk.freebsd.dk>, Edward Tomasz Napiera??a <trasz@FreeBSD.org>, Manuel St?hn <freebsdnewbie@freenet.de>, freebsd-current@freebsd.org
Subject:   Re: regression suspend/resume on Lenovo T420
Message-ID:  <20170515172725.GE1622@kib.kiev.ua>
In-Reply-To: <A03DC1D2-3E87-4936-8C28-70B9553DFE64@FreeBSD.org>
References:  <5746a37cd73e062c963512df1a6d24c6@email.freenet.de> <e1405329-412a-2c12-c599-dfe6a8870aaf@freenet.de> <20170506090341.GA12163@freebsd-t420.fritz.box> <20170514193006.GA1298@brick> <1190.1494792172@critter.freebsd.dk> <20170515095647.GA1622@kib.kiev.ua> <A03DC1D2-3E87-4936-8C28-70B9553DFE64@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, May 15, 2017 at 02:37:16PM -0230, Jonathan Anderson wrote:
> On 15 May 2017, at 7:26, Konstantin Belousov wrote:
> >
> > Try this.  If it works, I will write a proper patch.
> >
> > diff --git a/sys/amd64/amd64/cpu_switch.S 
> > b/sys/amd64/amd64/cpu_switch.S
> > index 33437ad16e6..9c0cd05ebea 100644
> > --- a/sys/amd64/amd64/cpu_switch.S
> > +++ b/sys/amd64/amd64/cpu_switch.S
> > @@ -369,6 +369,11 @@ END(savectx)
> >   * Resuming processor state from pcb.
> >   */
> >  ENTRY(resumectx)
> > +	movl	$MSR_EFER,%ecx
> > +	rdmsr
> > +	orl	$EFER_NXE,%eax
> > +	wrmsr
> > +
> >  	/* Switch to KPML4phys. */
> >  	movq	KPML4phys,%rax
> >  	movq	%rax,%cr3
> 
> Running drm-next (which has -CURRENT last merged somewhere around 
> r317651), this patch fixes one of the two problems I've been 
> experiencing with suspend/resume. Definite progress. :)

Could you, please, clarify.  Does the resume work after this  ?  If not,
how did you diagnosed that 'one of two problems' is solved with the change ?



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170515172725.GE1622>