Re: [PATCH v2] KVM: x86: PMU Event Filter

From: Paolo Bonzini
Date: Thu Jul 11 2019 - 13:12:24 EST


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 <pbonzini@xxxxxxxxxx> 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