Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp5708622ybg; Tue, 22 Oct 2019 07:17:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqzzbAnMP22uvhV4awviHP2/O4mU5MIaLibdOHZWE0ShW3zucILHEw/ubhuyZGQegyD6Tc9o X-Received: by 2002:a17:906:5388:: with SMTP id g8mr27449382ejo.278.1571753840420; Tue, 22 Oct 2019 07:17:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571753840; cv=none; d=google.com; s=arc-20160816; b=XqaokbqU8Tmw6WTtyhSNCFTeiP41DvPkNQp1DOAfAGaBQGGxH2S1I733Vxla5QgyxY d58CpTccdbxcwa7Jcqq06Fe/zL+e1mFVSD2Gl4xHCr7i7cwXkl0Dr+Bzsyeg5k30X5hM jTkocRob3bZty3y+9N1ODW8d8RL+dpuIc5RFjdnhJqeA8KCILAVCZ3BJGLskcQDTSbdE xGfhBFd2+LlD3zJuB8k4JgOuUCBfZ8OaMUZhRe7PwazGN+p1H8BYCZ4sgXMsPIq/pUT5 0xvzxvQJz+FUEVHHjh5J+fKNyDVVJHUwMm4ZDh4xU3Qbl0QSL8zm/IA/UtWXxyPiU+y8 giKw== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:openpgp:from:references:cc:to:subject:dkim-signature; bh=uSxGqEuW52lrWz/8potOYyUverZyGRXQnr3ONuzw9lw=; b=yWQvHt9GXc1sKoYeAP0YClqSswaire7cHoWDZBACcbftSXXsLx7wdVSYTVnHYOOWun 7qJ741VEorNpGmirA2YvfgmTTK2ZWEeWBpJ7dycavvp63bi5/L3p4m42tbSLVnX3gVyw HSi5mFFaD/QQgfR6ZctWrJUV0Y5q1tGDfrgFY4a8FG7h7+U6k4w3U+9Vjb9ZGUIv4Ae6 /HD+cQcRs69Jr4TTBDMvg1g+NvYPU7b2E+f+VGJA9UwZC1TIdSa0KSZJ7DsvaeuaREcf yTWQVuUuHkCEKcyd9irqsR+sdMHmv5X6Cqb1hzvTdcV/tPk7/zqvulxaxT+CCJVB4bsA OpDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=WXRtanUd; 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=pass (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 e58si3343575eda.7.2019.10.22.07.16.52; Tue, 22 Oct 2019 07:17:20 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=WXRtanUd; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731791AbfJVOJI (ORCPT + 99 others); Tue, 22 Oct 2019 10:09:08 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:59504 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727582AbfJVOJI (ORCPT ); Tue, 22 Oct 2019 10:09:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1571753347; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:openpgp:openpgp; bh=uSxGqEuW52lrWz/8potOYyUverZyGRXQnr3ONuzw9lw=; b=WXRtanUd45HLLJffFxnO2L8OIwb636oOtefPsq/Ag/F7bDeFeEZk/u3ezydCAxnapi6wW3 EaVbpaz/hcejDPkf7dpPr864xU9Gxjl84ymDZB6Vzp8J4nSG6LDUOaj674e4KK2yBodBay 6OG+9DGFK1JQTcazgEn9tQnOPdDIizE= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-379-NnB6b5-iOEOm0i45E50IwQ-1; Tue, 22 Oct 2019 10:09:04 -0400 Received: by mail-wr1-f72.google.com with SMTP id 4so5072970wrf.19 for ; Tue, 22 Oct 2019 07:09:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:openpgp:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=makMNuKu1ppWLAvCA/QyEUL2D+FfE16R1xUwog6fpcY=; b=Bdw6DYU6/aMDymbbqNeiA7bnnxv0leq0SIpZIWO9Pv2tqWOxhqdmXSETfSsqADbpMH U++alYvFVRtEvk1s7ntQK7knlElJPUYFvMfyKJnUmnSLxtnyudkJDXMtYZkH4N9xINUe Sql6MsLGZjGBgVdKgLAQx4lZj1Cm2qh3KsyFkQlA16reIxcNND9HVKqHs6ChIOXxOGja XM3AInnoKFCRJUE3b4vi0/PPVrTIppbZgMPs/nc31HTIznQUHEH4Wnlo1o2GZQE3FFZT JT08cXDvi8QpIqE5BnJLBcPXJ0dqj9mVjxtX7jDU+zeoqqU1aXqwuEr5BVEbiGmXOw7E BUUg== X-Gm-Message-State: APjAAAU68uIET1HENOWcuUduFs+17YRI1ZRREe5IWvOjdMqPP/dfitS1 uRqCAVuqMFoEBenmWJkpXoRlotmvhO2Ziit60H3WKID+XXIjMgDpzbeVt1+MJzP8735r4HwppaV qm864xmQIjvzHgs3Db1aWs2C2 X-Received: by 2002:a1c:64d4:: with SMTP id y203mr3274025wmb.27.1571753343663; Tue, 22 Oct 2019 07:09:03 -0700 (PDT) X-Received: by 2002:a1c:64d4:: with SMTP id y203mr3273996wmb.27.1571753343407; Tue, 22 Oct 2019 07:09:03 -0700 (PDT) Received: from ?IPv6:2001:b07:6468:f312:c0e4:dcf4:b543:ce19? ([2001:b07:6468:f312:c0e4:dcf4:b543:ce19]) by smtp.gmail.com with ESMTPSA id z125sm25633535wme.37.2019.10.22.07.09.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 22 Oct 2019 07:09:02 -0700 (PDT) Subject: Re: [PATCH v3 6/6] KVM: x86/vPMU: Add lazy mechanism to release perf_event per vPMC To: Like Xu , kvm@vger.kernel.org Cc: peterz@infradead.org, like.xu@intel.com, linux-kernel@vger.kernel.org, jmattson@google.com, sean.j.christopherson@intel.com, wei.w.wang@intel.com, kan.liang@intel.com References: <20191021160651.49508-1-like.xu@linux.intel.com> <20191021160651.49508-7-like.xu@linux.intel.com> <7d46a902-43eb-4693-f481-1c2efd397fbd@linux.intel.com> From: Paolo Bonzini Openpgp: preference=signencrypt Message-ID: Date: Tue, 22 Oct 2019 16:09:02 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <7d46a902-43eb-4693-f481-1c2efd397fbd@linux.intel.com> Content-Language: en-US X-MC-Unique: NnB6b5-iOEOm0i45E50IwQ-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 22/10/19 14:00, Like Xu wrote: >=20 > Second, the structure of pmu->pmc_in_use is in the following format: >=20 > =C2=A0 Intel: [0 .. INTEL_PMC_MAX_GENERIC-1] <=3D> gp counters > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 [INTEL= _PMC_IDX_FIXED .. INTEL_PMC_IDX_FIXED + 2] <=3D> fixed > =C2=A0 AMD:=C2=A0=C2=A0 [0 .. AMD64_NUM_COUNTERS-1] <=3D> gp counters Sorry---I confused INTEL_PMC_MAX_FIXED and INTEL_PMC_IDX_FIXED. The patches look good, I'll give them another look since I obviously wasn't very much awake when reviewing them. Paolo