Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp10744722ybi; Thu, 11 Jul 2019 10:13:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqzyfXpiT6UqaA7RvNxokv2fhAzCi+WQi2LxC6H10BGfNb0pswiaIK625ML/eTJwCBXZp/sf X-Received: by 2002:a65:6081:: with SMTP id t1mr5610572pgu.9.1562865187715; Thu, 11 Jul 2019 10:13:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562865187; cv=none; d=google.com; s=arc-20160816; b=YGWDjbPlGA5rT7WatsHNLC4CeOZKFJZlmHDJMFv52EXlG1awmYPWHgFj8Mcdxa3EZY y1pWlp0eEUlgwlp39XderH5NMnnEjDkvtPzz2FMKGYbCzkpqVR8k0hdtHBC9kldNKyFT 0Q28gZ5mD84bHetG1unuFU+ZM/TeRMa5xOsXbJ/4tvivy4H83Q5fO7qjFEfy1dYo3v9c RrE10xsnTCmjL2Lg1x+MgsnJgT9a9x8u0xvaA0fLKgAknC8Oq4wUCIgpcQ0ZHkLsevnC rtiQl7Np2tzqUJ63GXTgBf/vJb+8ou2m9nxwtwzUbDLHCkvB/F+lUkQBpueyLH7nuUlf 6tsA== 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; bh=jxtBFGrLM9ebJLyUflgxgAUhrlPh7lgx6/ntfyx9XO8=; b=QXfJ3wecQD40ZGXqmcDVOdgzQND5mWCQr0Qlsf6VgnjaD/fF3mWeMPceq/1W8yb0bQ F4QHcpHm/nf1Xe2y+nhzqhi9UrtPmKMVjM0wQ8A682Q/LE3mKrmgZd/UOPl4BR9sExIC S5p7XKCzmHUsKmeqXLvBtoVJqJYursXY5HE5qXK+nazRsjlduplRSpau6YUPY26+4k0f zt/701s0RIF+6SU/IHwFmfk8yu7DRUcAft+kPxI5tSBgdyyxRBHiaHon5Z0V8cH3jgLa a5K3ejNFDIcV1SIJVcaMmi/LK6/OPyfl2s1dtSrlgk7I7uNzsKMtgNNhQHCthDrN/DDt c7jg== 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 f20si5634064pfn.166.2019.07.11.10.12.51; Thu, 11 Jul 2019 10:13:07 -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 S1728837AbfGKRMV (ORCPT + 99 others); Thu, 11 Jul 2019 13:12:21 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:46465 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728549AbfGKRMV (ORCPT ); Thu, 11 Jul 2019 13:12:21 -0400 Received: by mail-wr1-f65.google.com with SMTP id z1so7082517wru.13 for ; Thu, 11 Jul 2019 10:12:20 -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=jxtBFGrLM9ebJLyUflgxgAUhrlPh7lgx6/ntfyx9XO8=; b=NwF01X0ABkfCYizU6o9fK+wuyGOInIQ5jZONnXUhvBN+8SHjbWS6aKzKKWmlQza4Y5 //m9Jw4gCYXaF7pbbYK6NGtxDaxcmJ3To7tMdg717ip6l2Rn/FtZnfdc0o/dwDO8rGGF MNSdXQ42pRfMhcDscZv/Rx6AP/Hv97HCrDQ6gTmsCURNAkitZgxK3vX5JgwIhynuufvG fbSN5vveHTBujosC6uvvmgjvxAye6uFDO7KoElRmSjpM70w/NYDlD29g5mNT8+oLIURQ JL94XADIWDtoRs1Z1GmUDDpIYtWmQCViKAmdH6+jhSC3ODFqnBQN+RCv1y7KHDj0tBlh ZrLA== X-Gm-Message-State: APjAAAWgvGHTK0074iQ2kEeEkm7Z94S8M4WkR0Od7+TX5V/h2BK0WTg0 x9qusIZTPg26UoAAzb6ineDLqA== X-Received: by 2002:a5d:62c1:: with SMTP id o1mr6244962wrv.293.1562865139278; Thu, 11 Jul 2019 10:12:19 -0700 (PDT) Received: from ?IPv6:2001:b07:6468:f312:d066:6881:ec69:75ab? ([2001:b07:6468:f312:d066:6881:ec69:75ab]) by smtp.gmail.com with ESMTPSA id u9sm5844898wrr.30.2019.07.11.10.12.18 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Thu, 11 Jul 2019 10:12:18 -0700 (PDT) Subject: Re: [PATCH v2] KVM: x86: PMU Event Filter To: Eric Hankland Cc: Wei Wang , rkrcmar@redhat.com, linux-kernel@vger.kernel.org, Stephane Eranian , kvm@vger.kernel.org References: <21fd772c-2267-2122-c878-f80185d8ca86@redhat.com> From: Paolo Bonzini Openpgp: preference=signencrypt Message-ID: <8c0502f4-64eb-3d34-1d76-a313b8f2f37a@redhat.com> Date: Thu, 11 Jul 2019 19:12:17 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/07/19 19:04, Eric Hankland wrote: > Thanks for your help. The "type"->"action" change and constant > renaming sound good to me. Good! Another thing, synchronize_rcu is a bit slow for something that runs whenever a VM starts. KVM generally uses srcu instead (kvm->srcu for things that change really rarely, kvm->irq_srcu for things that change a bit more often). Paolo > On Thu, Jul 11, 2019 at 4:58 AM Paolo Bonzini wrote: >> >> On 11/07/19 03:25, Eric Hankland wrote: >>> - Add a VM ioctl that can control which events the guest can monitor. >> >> ... and finally: >> >> - the patch whitespace is damaged >> >> - the filter is leaked when the VM is destroyed >> >> - kmalloc(GFP_KERNEL_ACCOUNT) is preferrable to vmalloc because it >> accounts memory to the VM correctly. >> >> Since this is your first submission, I have fixed up everything. >> >> Paolo