From owner-freebsd-current@freebsd.org Mon May 15 17:07:18 2017 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 490EAD6E9F7 for ; Mon, 15 May 2017 17:07:18 +0000 (UTC) (envelope-from jonathan@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1E8D5AD1; Mon, 15 May 2017 17:07:18 +0000 (UTC) (envelope-from jonathan@FreeBSD.org) Received: from [134.153.0.231] (unknown [127.0.1.132]) by freefall.freebsd.org (Postfix) with ESMTP id D99EB4CE9; Mon, 15 May 2017 17:07:16 +0000 (UTC) (envelope-from jonathan@FreeBSD.org) From: "Jonathan Anderson" To: "Konstantin Belousov" Cc: "Poul-Henning Kamp" , "Edward Tomasz Napiera??a" , "Manuel St?hn" , freebsd-current@freebsd.org Subject: Re: regression suspend/resume on Lenovo T420 Date: Mon, 15 May 2017 14:37:16 -0230 Message-ID: In-Reply-To: <20170515095647.GA1622@kib.kiev.ua> References: <5746a37cd73e062c963512df1a6d24c6@email.freenet.de> <20170506090341.GA12163@freebsd-t420.fritz.box> <20170514193006.GA1298@brick> <1190.1494792172@critter.freebsd.dk> <20170515095647.GA1622@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; format=flowed X-Mailer: MailMate (1.9.6r5347) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 May 2017 17:07:18 -0000 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. :) Thanks! Jon -- Jonathan Anderson jonathan@FreeBSD.org