From: Paolo Bonzini Subject: Re: [RFC PATCH 08/19] kvm: Add the introspection subsystem Date: Wed, 21 Jun 2017 13:54:25 +0200 Message-ID: References: <20170616134348.17725-1-alazar@bitdefender.com> <20170616134348.17725-9-alazar@bitdefender.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , mdontu@bitdefender.com To: Adalbert Lazar , kvm@vger.kernel.org Return-path: Received: from mx1.redhat.com ([209.132.183.28]:35748 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750859AbdFULy3 (ORCPT ); Wed, 21 Jun 2017 07:54:29 -0400 In-Reply-To: <20170616134348.17725-9-alazar@bitdefender.com> Content-Language: en-US Sender: kvm-owner@vger.kernel.org List-ID: On 16/06/2017 15:43, Adalbert Lazar wrote: > + while (!list_empty(&kvm->access_list)) { > + struct kvmi_mem_access *m = > + list_first_entry(&kvm->access_list, struct kvmi_mem_access, > + link); > + > + list_del(&m->link); > + INIT_LIST_HEAD(&m->link); > + > + kvmi_apply_mem_access(vcpu, m->gfn, m->access); > + } How does this work when multiple VCPUs are running with different MMU roles? One VCPU is emptying the access_list for all, but kvm_mmu_set_spte is using for_each_shadow_entry per-VCPU. I'm really afraid of introducing subtle bugs, with possible security effects. I'm not really able to provide a suggestion yet, since I haven't grasped the protocol entirely. Paolo