Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp1194140ybh; Thu, 12 Mar 2020 19:20:32 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvQcKTat2qn61UxwLNbtmKhcJ5wk1YA0TzBhviRsp6pWiCvs0AUk37ZaoucuM4D3a78UZGw X-Received: by 2002:a05:6808:103:: with SMTP id b3mr5321799oie.46.1584066032226; Thu, 12 Mar 2020 19:20:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584066032; cv=none; d=google.com; s=arc-20160816; b=aAAfkwp10PvPkEBKHKaxNwsSAqhwkEO781km9x4COvtCwTEG3RydiM/azMcCTG4wK7 5li7X1al95v25Cmua+9HeG71sjJSOM0R7NR96tY/CsQwqdRvMoxKdrR0a8TgpBGdsmfN RiDTbQPocs4iMR1Bd2CQ8NUh8OJJ8luw3JwlEopUfX1DSsdi7/2FydCY+OXcRkkich+d Jqvcv0dCclicFx1Ac6f9IAQB5n6UPCGnCVvA5h7B3WwlmCEvR2+/mkI9Q/hOwyNXsd8m 7+h32GD5r+h+QLIDLS66cofs195M2RtzGUdRK451vH+mH2PRG8trfPWpfeENZW8fZfgV l7sQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=qgdMV4pzs+N2afkF1pakhgQzPgPvbV1vFYcWXGHOXyM=; b=THqekc3x8Epp3iuTW7+4UCz51YsKwv1QDKziaUcWWuuSaE5hz8h6hzLnPABNSLwqPm SLzUsNJIGD6SzGWxZGSN/oVxcpRyQUGa7zPIgq0xjCGC7TGdGnQ5i4NWx8fip50px/0+ VfNtoSmkA9trKKY0U8WZmexXOW3QaguCZECkqGzk6POKVcz2gRm6hI3cmEJDzHEtu0hv ysBjq2izBdhCKZvRsgm02GBIWqGC8BuxGrdkwesHtcImZGJk3Vhx282+jwTBX9ymoSTD JKCAiE9UVFKzWdyZjoQyNlNvMcHs4HGXL0hCNfkjKrc+vX9A5aSCjdtq3kTfE9e1IQ3b 8jQg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v127si1282378oib.25.2020.03.12.19.20.20; Thu, 12 Mar 2020 19:20:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726838AbgCMCTd (ORCPT + 99 others); Thu, 12 Mar 2020 22:19:33 -0400 Received: from mga14.intel.com ([192.55.52.115]:25868 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726613AbgCMCTb (ORCPT ); Thu, 12 Mar 2020 22:19:31 -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 fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Mar 2020 19:19:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,546,1574150400"; d="scan'208";a="261743892" Received: from sqa-gate.sh.intel.com (HELO clx-ap-likexu.tsp.org) ([10.239.48.212]) by orsmga002.jf.intel.com with ESMTP; 12 Mar 2020 19:19:27 -0700 From: Like Xu To: Paolo Bonzini , Peter Zijlstra , kvm@vger.kernel.org, Andi Kleen , Jim Mattson , Wanpeng Li Cc: Sean Christopherson , Joerg Roedel , Liran Alon , Thomas Gleixner , Ingo Molnar , Arnaldo Carvalho de Melo , Liang Kan , Wei Wang , Like Xu , linux-kernel@vger.kernel.org Subject: [PATCH v9 10/10] KVM: x86: Remove the common trap handler of the MSR_IA32_DEBUGCTLMSR Date: Fri, 13 Mar 2020 10:16:16 +0800 Message-Id: <20200313021616.112322-11-like.xu@linux.intel.com> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200313021616.112322-1-like.xu@linux.intel.com> References: <20200313021616.112322-1-like.xu@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Wei Wang The debugctl msr is not completely identical on AMD and Intel CPUs, for example, FREEZE_LBRS_ON_PMI is supported by Intel CPUs only. Now, this msr is handled separately in svm.c and intel_pmu.c. So remove the common debugctl msr handling code in kvm_get/set_msr_common. Signed-off-by: Wei Wang --- arch/x86/kvm/x86.c | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 3771d5fb2524..5ad36e71b3eb 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -2756,18 +2756,6 @@ int kvm_set_msr_common(struct kvm_vcpu *vcpu, struct msr_data *msr_info) return 1; } break; - case MSR_IA32_DEBUGCTLMSR: - if (!data) { - /* We support the non-activated case already */ - break; - } else if (data & ~(DEBUGCTLMSR_LBR | DEBUGCTLMSR_BTF)) { - /* Values other than LBR and BTF are vendor-specific, - thus reserved and should throw a #GP */ - return 1; - } - vcpu_unimpl(vcpu, "%s: MSR_IA32_DEBUGCTLMSR 0x%llx, nop\n", - __func__, data); - break; case 0x200 ... 0x2ff: return kvm_mtrr_set_msr(vcpu, msr, data); case MSR_IA32_APICBASE: @@ -3025,7 +3013,6 @@ int kvm_get_msr_common(struct kvm_vcpu *vcpu, struct msr_data *msr_info) switch (msr_info->index) { case MSR_IA32_PLATFORM_ID: case MSR_IA32_EBL_CR_POWERON: - case MSR_IA32_DEBUGCTLMSR: case MSR_IA32_LASTBRANCHFROMIP: case MSR_IA32_LASTBRANCHTOIP: case MSR_IA32_LASTINTFROMIP: -- 2.21.1