Received: from eggs.gnu.org ([2001:4830:134:3::10]:59989) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gFxTc-0000gN-M3 for qemu-devel@nongnu.org; Fri, 26 Oct 2018 04:28:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gFxNp-0007el-Ra for qemu-devel@nongnu.org; Fri, 26 Oct 2018 04:22:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51772) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gFxNp-0007Uk-Je for qemu-devel@nongnu.org; Fri, 26 Oct 2018 04:22:17 -0400 Date: Fri, 26 Oct 2018 05:22:13 -0300 From: Eduardo Habkost Message-ID: <20181026082213.GJ4096@habkost.net> References: <20181017093053.8811-1-tao3.xu@intel.com> <20181017093053.8811-2-tao3.xu@intel.com> <6b494abe-93ae-71fc-01f3-e149df5e24b5@redhat.com> <20181025132831.GG4096@habkost.net> <128b40da-f34e-9a45-e798-25e33855a51f@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <128b40da-f34e-9a45-e798-25e33855a51f@intel.com> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 1/1] i386: Add PKU/OSPKE on Skylake-Server CPU model List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Tao Xu Cc: Paolo Bonzini , rth@twiddle.net, jingqi.liu@intel.com, robert.hu@intel.com, qemu-devel@nongnu.org On Fri, Oct 26, 2018 at 01:53:10PM +0800, Tao Xu wrote: > On 10/25/18 9:28 PM, Eduardo Habkost wrote: > > On Wed, Oct 17, 2018 at 12:48:58PM +0200, Paolo Bonzini wrote: > > > On 17/10/2018 11:30, Tao Xu wrote: > > > > As the release document ref below link (page 13): > > > > https://software.intel.com/sites/default/files/managed/c5/15/\ > > > > architecture-instruction-set-extensions-programming-reference.pdf > > > >=20 > > > > PKU is supported in Skylake Server (Only Server) and later, and > > > > on Intel(R) Xeon(R) Processor Scalable Family. OSPKE is to reads > > > > the value of PKRU (Instruction of PKU) into EAX and clears EDX. > > > > So PKU/OSPKE are supposed to be in Skylake-Server CPU model. > > > > And PKU/OSPKE 's CPUID has been exposed to QEMU. But PKU/OSPKE > > > > can't be find in Skylake-Server CPU model in the code. > > > > So this patch will fix PKU/OSPKE this issue in Skylake-Server > > > > CPU model. > > > OSPKE is not needed, since it is added automatically based on CR4 (= and > > > is not set on boot). > > Correct. > >=20 > > > Also, the guru of CPU model compatibility is Eduardo, so I'll wait = for > > > him to chime in anyway. > > Sorry for taking so long to reply. This can be safely done only > > if every host that is able to run Skylake-Server today is > > guaranteed to support PKU. Is that the case? > >=20 > > You'll also need Skylake-Server-*-cpu.pku=3Doff entries on > > PC_COMPAT_3_0 to keep PKU disabled on pc-*-3.0 and older. > >=20 > Thank you Eduardo, >=20 >=20 > But I can't find PC_COMPAT_3_0 in=A0 include/hw/i386/pc.h. Will it exis= t on >=20 > QEMU 3.1 and will I add "pku=3Doff" after QEMU 3.1=A0 release? PC_COMPAT_3_0 was added to qemu.git master a few weeks ago, by commit 9b4cf107b09d18ac30f46fd1c4de8585ccba030c. --=20 Eduardo