From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH kvm-unit-tests 2/2] vmx: fix expected results of new EPT tests Date: Thu, 11 May 2017 13:30:26 -0400 (EDT) Message-ID: <95409579.6813190.1494523826371.JavaMail.zimbra@redhat.com> References: <1494501821-11897-1-git-send-email-pbonzini@redhat.com> <1494501821-11897-3-git-send-email-pbonzini@redhat.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]:48696 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932433AbdEKRa2 (ORCPT ); Thu, 11 May 2017 13:30:28 -0400 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: ----- Original Message ----- > From: "Peter Feiner" > To: "Paolo Bonzini" > Cc: kvm@vger.kernel.org, "David Matlack" > Sent: Thursday, May 11, 2017 5:58:49 PM > Subject: Re: [PATCH kvm-unit-tests 2/2] vmx: fix expected results of new EPT tests > > On Thu, May 11, 2017 at 4:23 AM, Paolo Bonzini wrote: > > Remove RD/EX exchange hack which we can fix in KVM; mark page table > > accesses as read/write when EPT A/D is enabled, and expect them to > > be handled as read/write even with disabled EPT A/D bits (even though > > the exit qualification says otherwise). > > I assume this is a stopgap change. I mean, you're asserting for the > wrong behavior just so the tests pass. Correct? No, I've tried the tests on upstream Linux with eptad=0 (so that EPT A/D is not used by KVM on the host) and they also hang with an infinite stream of EPT violations. See the KVM patch I sent which also explains the hang in the comments ("[PATCH 2/2] KVM: nVMX: fix nEPT handling of guest page table accesses"). So it seems to me that this is the expected behavior of the processor even when A/D bits are disabled. I haven't tested on a processor with EPT but without A/D bits though. Paolo