From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH 4/4] x86: kvm: mmu: use ept a/d in vmcs02 iff used in vmcs12 Date: Sat, 1 Jul 2017 01:29:32 -0400 (EDT) Message-ID: <1103545766.13264371.1498886972980.JavaMail.zimbra@redhat.com> References: <5bdf824538481ee2308354165e8ebe7b59b7b8a1.1498868316.git.pfeiner@google.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, David Matlack To: Peter Feiner Return-path: Received: from mx1.redhat.com ([209.132.183.28]:38924 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751442AbdGAF3f (ORCPT ); Sat, 1 Jul 2017 01:29:35 -0400 In-Reply-To: <5bdf824538481ee2308354165e8ebe7b59b7b8a1.1498868316.git.pfeiner@google.com> Sender: kvm-owner@vger.kernel.org List-ID: > @@ -8358,7 +8349,7 @@ static int vmx_handle_exit(struct kvm_vcpu *vcpu) > * mode as if vcpus is in root mode, the PML buffer must has been > * flushed already. > */ > - if (enable_pml) > + if (enable_pml && !is_guest_mode(vcpu)) > vmx_flush_pml_buffer(vcpu); > > /* If guest state is invalid, start emulating */ I don't understand this. You need to flush the PML buffer if L2 is running with EPT A/D bits enabled, don't you? Apart from this it seems sane, I only have to look at patch 3 more carefully. Thanks, Paolo