Received: by 2002:a25:b323:0:0:0:0:0 with SMTP id l35csp2462914ybj; Mon, 23 Sep 2019 04:22:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqzFTa6ZTVPcG7HvIQhVUwTXe3UDfe38Wm4xOF/1lddmRcyaCN2ALDhp+B9wFteT+qWIQ2QJ X-Received: by 2002:a50:a666:: with SMTP id d93mr35809176edc.217.1569237722093; Mon, 23 Sep 2019 04:22:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569237722; cv=none; d=google.com; s=arc-20160816; b=Nu4eim9E130HBEMRY2jp91RudpOs/VnH5ozZDBQUcbnvdGB/2Ee+Tk0WGaA39WfLCL zC8eDBkN3omxQXotlgpbkzPTbJLawCCCndSqKevs3FHtR+X7nzT/ZIMjiYL9MUXOXMbK LBzPSlF0i29XmoZZ9nPrMqBd6VqNNCyyGF4uFwCFWkxZH/QTuVrf6thC9nA2BskyXQkA WhBSQnbd2dXvNJTS8/NWUYIjShum9ejEJTtV4yG98ftc0GmFM57Wb3hjLJqavD1J83Ny IoOg+4xD2YUG88M9e13x676B3YW6PSlVMCIvSY8jTf1YjyUgjUtz7A10TBCiEua5NqEt xgIA== 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=gsoGluYmrX4k6+FC5N2hFn/D0+JscRgZzJzW7jiGYqE=; b=tfDtuFBKlQgZVCShxV4TArEfOaLtYFCEgCEQ9avol9zd5wF3UbNESuLW6cjdMWgW+z sz9Vry9gh+ccsFM/xHxCV7H8eBqs2aC5o4QH6CDsU2jyeZk2KkVI50ABvMWk8W0T/fjA UpD02RGVe/XN2xxz8/BIImJfrz6ReJSLeFmsOgjQOSrG+KcCDJcqNpGyrPp4OIOK/fiu V2b+dWHo1VoVJHMyVR7UXxBSu0+dA5rnKDXNgmWOpZtcxYYX9oHeMs3+H5Rc3VfPG2YQ 8IDUL1hKxeROlrPnn4e+NkiBRT5frMvBGfsPtp8gLO5gHw3S6N36QrL0EVh1pGZTr+N4 KYgg== 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t16si6481849edd.269.2019.09.23.04.21.35; Mon, 23 Sep 2019 04:22:02 -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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2394033AbfITV0T (ORCPT + 99 others); Fri, 20 Sep 2019 17:26:19 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37392 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391072AbfITVZN (ORCPT ); Fri, 20 Sep 2019 17:25:13 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 32F81308123B; Fri, 20 Sep 2019 21:25:13 +0000 (UTC) Received: from mail (ovpn-120-159.rdu2.redhat.com [10.10.120.159]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 15B945D6B2; Fri, 20 Sep 2019 21:25:13 +0000 (UTC) From: Andrea Arcangeli To: Paolo Bonzini Cc: Vitaly Kuznetsov , "Dr. David Alan Gilbert" , Marcelo Tosatti , Peter Xu , kvm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 06/17] KVM: monolithic: x86: enable the kvm_pmu_ops external functions Date: Fri, 20 Sep 2019 17:24:58 -0400 Message-Id: <20190920212509.2578-7-aarcange@redhat.com> In-Reply-To: <20190920212509.2578-1-aarcange@redhat.com> References: <20190920212509.2578-1-aarcange@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Fri, 20 Sep 2019 21:25:13 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Plug in the new external functions and their extern declarations in the respective kernel modules (kvm-intel and kvm-amd). Signed-off-by: Andrea Arcangeli --- arch/x86/kvm/pmu.h | 2 ++ arch/x86/kvm/pmu_amd.c | 2 ++ arch/x86/kvm/vmx/pmu_intel.c | 2 ++ 3 files changed, 6 insertions(+) diff --git a/arch/x86/kvm/pmu.h b/arch/x86/kvm/pmu.h index 58265f761c3b..a9c2f68a40cc 100644 --- a/arch/x86/kvm/pmu.h +++ b/arch/x86/kvm/pmu.h @@ -19,6 +19,8 @@ struct kvm_event_hw_type_mapping { unsigned event_type; }; +#include "pmu_ops.h" + struct kvm_pmu_ops { unsigned (*find_arch_event)(struct kvm_pmu *pmu, u8 event_select, u8 unit_mask); diff --git a/arch/x86/kvm/pmu_amd.c b/arch/x86/kvm/pmu_amd.c index c8388389a3b0..12d1fa3ba35a 100644 --- a/arch/x86/kvm/pmu_amd.c +++ b/arch/x86/kvm/pmu_amd.c @@ -301,6 +301,8 @@ static void amd_pmu_reset(struct kvm_vcpu *vcpu) } } +#include "pmu_amd_ops.c" + struct kvm_pmu_ops amd_pmu_ops = { .find_arch_event = amd_find_arch_event, .find_fixed_event = amd_find_fixed_event, diff --git a/arch/x86/kvm/vmx/pmu_intel.c b/arch/x86/kvm/vmx/pmu_intel.c index 4dea0e0e7e39..5ef36a75c31e 100644 --- a/arch/x86/kvm/vmx/pmu_intel.c +++ b/arch/x86/kvm/vmx/pmu_intel.c @@ -358,6 +358,8 @@ static void intel_pmu_reset(struct kvm_vcpu *vcpu) pmu->global_ovf_ctrl = 0; } +#include "pmu_intel_ops.c" + struct kvm_pmu_ops intel_pmu_ops = { .find_arch_event = intel_find_arch_event, .find_fixed_event = intel_find_fixed_event,