From 0aaa7f7ce9428dd9c2e5771d752ca550f3670fc6 Mon Sep 17 00:00:00 2001 From: Tao Xu Date: Sun, 11 Nov 2018 08:09:45 -0500 Subject: [PATCH] i386: Add PKU on Skylake-Server CPU model 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 PKU is supported in Skylake Server (Only Server) and later, and on Intel(R) Xeon(R) Processor Scalable Family. So PKU is supposed to be in Skylake-Server CPU model. And PKU's CPUID has been exposed to QEMU. But PKU can't be find in Skylake-Server CPU model in the code. So this patch will fix this issue in Skylake-Server CPU model. Backports commit 09b9ee643f90ef95e30e594df2a3c83ccaf75b1f from qemu --- qemu/target/i386/cpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qemu/target/i386/cpu.c b/qemu/target/i386/cpu.c index e2f95d25..8dfa239b 100644 --- a/qemu/target/i386/cpu.c +++ b/qemu/target/i386/cpu.c @@ -2910,7 +2910,7 @@ static X86CPUDefinition builtin_x86_defs[] = { CPUID_7_0_EBX_AVX512BW | CPUID_7_0_EBX_AVX512CD | CPUID_7_0_EBX_AVX512VL, // FEAT_7_0_ECX - 0, + CPUID_7_0_ECX_PKU, // FEAT_7_0_EDX 0, // FEAT_8000_0001_EDX @@ -2979,7 +2979,7 @@ static X86CPUDefinition builtin_x86_defs[] = { CPUID_7_0_EBX_AVX512BW | CPUID_7_0_EBX_AVX512CD | CPUID_7_0_EBX_AVX512VL, // FEAT_7_0_ECX - 0, + CPUID_7_0_ECX_PKU, // FEAT_7_0_EDX CPUID_7_0_EDX_SPEC_CTRL, // FEAT_8000_0001_EDX