From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH V5 2/4] KVM: x86/vPMU: Create vPMU interface for VMX and SVM Date: Fri, 19 Jun 2015 13:31:54 +0200 Message-ID: <5583FDAA.7010006@redhat.com> References: <1434087296-27141-1-git-send-email-wei@redhat.com> <1434087296-27141-3-git-send-email-wei@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit To: Wei Huang , kvm@vger.kernel.org, x86@kernel.org, gleb@kernel.org, rkrcmar@redhat.com, joro@8bytes.org Return-path: Received: from mail-wi0-f182.google.com ([209.85.212.182]:38799 "EHLO mail-wi0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751154AbbFSLb5 (ORCPT ); Fri, 19 Jun 2015 07:31:57 -0400 Received: by wibdq8 with SMTP id dq8so15798195wib.1 for ; Fri, 19 Jun 2015 04:31:55 -0700 (PDT) In-Reply-To: <1434087296-27141-3-git-send-email-wei@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 12/06/2015 07:34, Wei Huang wrote: > -static void trigger_pmi(struct irq_work *irq_work) > +static void kvm_pmi_trigger_fn(struct irq_work *irq_work) > { > - struct kvm_pmu *pmu = container_of(irq_work, struct kvm_pmu, > - irq_work); > - struct kvm_vcpu *vcpu = container_of(pmu, struct kvm_vcpu, > - arch.pmu); > + struct kvm_pmu *pmu = container_of(irq_work, struct kvm_pmu, irq_work); > + struct kvm_vcpu *vcpu = pmu_to_vcpu(pmu); > > - kvm_deliver_pmi(vcpu); > + kvm_pmu_deliver_pmi(vcpu); > } > On the other hand, this patch really should have been split further. For example, just looking at this snippet you can see that the introduction of pmu_to_vcpu and the function renames should have been separate from the creation of the vPMU interface. Paolo -- To unsubscribe from this list: send the line "unsubscribe kvm" in