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