From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751629AbbKNKh0 (ORCPT ); Sat, 14 Nov 2015 05:37:26 -0500 Received: from mail.skyhub.de ([78.46.96.112]:60444 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751273AbbKNKhX (ORCPT ); Sat, 14 Nov 2015 05:37:23 -0500 From: Borislav Petkov To: LKML Cc: Paolo Bonzini , X86 ML , KVM Subject: [RFC PATCH 0/3] x86, kvm: Unify CPUID computation and fix MSR accessing Date: Sat, 14 Nov 2015 11:37:13 +0100 Message-Id: <1447497436-26424-1-git-send-email-bp@alien8.de> X-Mailer: git-send-email 2.3.5 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Borislav Petkov Hi all, so this is something which should help fixing the MSR access to IC_CFG on AMD. The usefulness should come, however, from the unification and the additional family, model, stepping helpers in kvm in case one wants to know those of the guest CPU. Who knows, might be much more useful in the future. Quick testing shows it works, I'll hammer on it more after rc1 is out. Thanks. Borislav Petkov (3): x86/cpu: Unify CPU family, model, stepping calculation kvm: Add accessors for guest CPU's family, model, stepping x86/cpu/amd, kvm: Satisfy guest kernel reads of IC_CFG MSR arch/x86/include/asm/cpu.h | 3 +++ arch/x86/include/asm/microcode.h | 31 +++---------------------------- arch/x86/include/asm/msr-index.h | 1 + arch/x86/kernel/cpu/amd.c | 4 ++-- arch/x86/kernel/cpu/common.c | 11 +++-------- arch/x86/kernel/cpu/microcode/core.c | 6 +++--- arch/x86/kernel/cpu/microcode/intel.c | 16 ++++++---------- arch/x86/kvm/cpuid.h | 34 ++++++++++++++++++++++++++++++++++ arch/x86/kvm/svm.c | 17 +++++++++++++++++ arch/x86/lib/Makefile | 2 +- arch/x86/lib/cpu.c | 35 +++++++++++++++++++++++++++++++++++ 11 files changed, 108 insertions(+), 52 deletions(-) create mode 100644 arch/x86/lib/cpu.c -- 2.3.5