From patchwork Thu Mar 21 12:21:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Cooper X-Patchwork-Id: 10863415 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4B25F18EC for ; Thu, 21 Mar 2019 12:23:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 321DC29AE8 for ; Thu, 21 Mar 2019 12:23:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 26A502A11A; Thu, 21 Mar 2019 12:23:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D6CA929AF2 for ; Thu, 21 Mar 2019 12:23:08 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1h6wh7-0001ca-Ra; Thu, 21 Mar 2019 12:21:13 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1h6wh6-0001cQ-Bk for xen-devel@lists.xen.org; Thu, 21 Mar 2019 12:21:12 +0000 X-Inumbo-ID: cef37978-4bd3-11e9-92ec-e3e9981acc59 Received: from SMTP03.CITRIX.COM (unknown [162.221.156.55]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id cef37978-4bd3-11e9-92ec-e3e9981acc59; Thu, 21 Mar 2019 12:21:10 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.60,252,1549929600"; d="scan'208";a="81228257" From: Andrew Cooper To: Xen-devel Date: Thu, 21 Mar 2019 12:21:02 +0000 Message-ID: <1553170866-23812-1-git-send-email-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.1.4 MIME-Version: 1.0 Subject: [Xen-devel] [PATCH 0/4] x86/cpuid: Handling of synthetic cpuid_policy fields X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Andrew Cooper , Sergey Dyasli , Wei Liu , Jan Beulich , =?utf-8?q?Roger_Pau_Monn=C3=A9?= Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP This is the next piece of CPUID work, and associated cleanup for the existing logic. Andrew Cooper (4): libx86: Introduce x86_cpuid_lookup_vendor() x86/cpuid: Drop get_cpu_vendor() completely tools/libxc: Use x86_cpuid_lookup_vendor() rather than opencoding the logic libx86: Recalculate synthesised cpuid_policy fields when appropriate tools/libxc/xc_cpuid_x86.c | 28 ++++++-------------- tools/tests/cpu-policy/test-cpu-policy.c | 37 ++++++++++++++++++++++++++ xen/arch/x86/cpu/amd.c | 1 - xen/arch/x86/cpu/centaur.c | 1 - xen/arch/x86/cpu/common.c | 45 +++++++++----------------------- xen/arch/x86/cpu/cpu.h | 1 - xen/arch/x86/cpu/intel.c | 1 - xen/arch/x86/cpu/shanghai.c | 1 - xen/arch/x86/cpuid.c | 7 ++--- xen/include/asm-x86/processor.h | 7 ----- xen/include/asm-x86/x86-vendors.h | 21 +++++++++++++++ xen/include/xen/lib/x86/cpuid.h | 14 +++++++--- xen/lib/x86/cpuid.c | 43 ++++++++++++++++++++++++++++++ xen/lib/x86/private.h | 1 + 14 files changed, 138 insertions(+), 70 deletions(-)