Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp1636006imj; Thu, 14 Feb 2019 09:30:45 -0800 (PST) X-Google-Smtp-Source: AHgI3IbGuKb4y0guNJAtN42czYqfGntZxyjdH4pNkJqbb9vs0k62qSKPMb4L2ci9oDgBptjPzLuB X-Received: by 2002:a17:902:e307:: with SMTP id cg7mr5331173plb.255.1550165445634; Thu, 14 Feb 2019 09:30:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550165445; cv=none; d=google.com; s=arc-20160816; b=UAMrXNBWk68lrdqhJNwYq/t6j7Tbip+qj/51WHu1jtC9Bnd9QrUHFuP1wjdTJgxDz/ Kt+OMY9ZaPHajg/KdDhV3evRK0kEIeq/4HjsbkYCSq6IZyW3cBpcFj+Af1XvNskaHIJ4 7TnuJKlvBehxiC57L+Jt2oIi4q/Ue3Bn3DK0PJn+oAgTARr4Xmu7GPLDEcp4ttQvT8j1 tc1mL1Sc57zf8JL5sC8n7UEA85v7dNisjr0Z5XIdBBq5W6Md+18MeGcXt95Ur5TXXQqI YfvEg+LHlApOdsRGVqb5mxamYWr6XpURu/xxxD4HOORSvYecepdtiaCo4Xp9CvmPUxlT i88w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=2YGyvD/v9gfWrxfEyceqXd2aZ1wIjCFm4pwiXG+EqsM=; b=Phas62zoj6lQnhXA4BAuo7pNax8oWQvxzZXkxp3tbE/2rOseUPXte7j7TsUY8xcsQT QGhov9gL0Y53EnwwMtfLgx6OEScn0qg0ewrMv+AcZV9U7zLykBzIw4i0Fqgb1vLQYlsr kE6HTK2rYZ2ii1WL6Zchx3pQR2KC1y2K1GSIeBifPYMNwJWF6PUzjCBBAWg173paeBnv 3BJ3dQTWWZn3069u5vtUAhbOHPwC3xav+X89HJzkPEI0TMRfCfBCa50oDE3qUMZdM9M3 LYar0MxJi3gqrWVI/D8LjMW2CWiNUJgfYzwsMiNOxCnksao64V4TXGToMTm66V9zo2Na rBPw== 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 b1si2813975plx.425.2019.02.14.09.30.29; Thu, 14 Feb 2019 09:30:45 -0800 (PST) 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 S2437986AbfBNJnN (ORCPT + 99 others); Thu, 14 Feb 2019 04:43:13 -0500 Received: from mga09.intel.com ([134.134.136.24]:32226 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2437973AbfBNJnL (ORCPT ); Thu, 14 Feb 2019 04:43:11 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Feb 2019 01:43:10 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,368,1544515200"; d="scan'208";a="124411819" Received: from devel-ww.sh.intel.com ([10.239.48.128]) by fmsmga008.fm.intel.com with ESMTP; 14 Feb 2019 01:43:08 -0800 From: Wei Wang To: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, pbonzini@redhat.com, ak@linux.intel.com, peterz@infradead.org Cc: kan.liang@intel.com, mingo@redhat.com, rkrcmar@redhat.com, like.xu@intel.com, wei.w.wang@intel.com, jannh@google.com, arei.gonglei@huawei.com, jmattson@google.com Subject: [PATCH v5 11/12] KVM/x86: remove the common handling of the debugctl msr Date: Thu, 14 Feb 2019 17:06:13 +0800 Message-Id: <1550135174-5423-12-git-send-email-wei.w.wang@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1550135174-5423-1-git-send-email-wei.w.wang@intel.com> References: <1550135174-5423-1-git-send-email-wei.w.wang@intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 separatedly 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 Cc: Paolo Bonzini Cc: Andi Kleen Cc: Peter Zijlstra --- 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 8e663c1..729da4e 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -2463,18 +2463,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: @@ -2716,7 +2704,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.7.4