From patchwork Tue Sep 10 08:24:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiaoyao Li X-Patchwork-Id: 11138937 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AA105912 for ; Tue, 10 Sep 2019 08:39:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9113C208E4 for ; Tue, 10 Sep 2019 08:39:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727667AbfIJIjZ (ORCPT ); Tue, 10 Sep 2019 04:39:25 -0400 Received: from mga04.intel.com ([192.55.52.120]:55164 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726099AbfIJIjZ (ORCPT ); Tue, 10 Sep 2019 04:39:25 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Sep 2019 01:39:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,489,1559545200"; d="scan'208";a="196468176" Received: from lxy-clx-4s.sh.intel.com ([10.239.43.44]) by orsmga002.jf.intel.com with ESMTP; 10 Sep 2019 01:39:22 -0700 From: Xiaoyao Li To: Paolo Bonzini , =?utf-8?b?UmFkaW0gS3LEjW3DocWZ?= Cc: Xiaoyao Li , Sean Christopherson , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , kvm@vger.kernel.org Subject: [PATCH 0/2] KVM: CPUID: CPUID emulation flow adjustment and one minor refinement when updating maxphyaddr Date: Tue, 10 Sep 2019 16:24:40 +0800 Message-Id: <20190910082442.142702-1-xiaoyao.li@intel.com> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Patch 1 adjusts the execution flow of CPUID instruction emulation, which checks the leaf number first per CPUID specification. Patch 2 moves physical address width updating to where we check the virtual address width in function kvm_update_cpuid() since they two use the same cpuid leaf, which makes it more reasonable and no functional change. Xiaoyao Li (2): KVM: CPUID: Check limit first when emulating CPUID instruction KVM: CPUID: Put maxphyaddr updating together with virtual address width checking arch/x86/kvm/cpuid.c | 56 +++++++++++++++++++++++++------------------- 1 file changed, 32 insertions(+), 24 deletions(-)