Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751946AbdHCMrL (ORCPT ); Thu, 3 Aug 2017 08:47:11 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40138 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751200AbdHCMrK (ORCPT ); Thu, 3 Aug 2017 08:47:10 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 24DB861472 Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=david@redhat.com Subject: Re: [PATCH 3/3] KVM: nVMX: Emulate EPTP switching for the L1 hypervisor To: Paolo Bonzini , Bandan Das , kvm@vger.kernel.org Cc: rkrcmar@redhat.com, jmattson@google.com, linux-kernel@vger.kernel.org References: <20170801232433.31749-1-bsd@redhat.com> <20170801232433.31749-4-bsd@redhat.com> <56d21524-1a08-8281-fb01-950fb7c10b2f@redhat.com> <179e5832-0dca-0b5f-b303-d5de18353f5e@redhat.com> From: David Hildenbrand Organization: Red Hat GmbH Message-ID: Date: Thu, 3 Aug 2017 14:47:02 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <179e5832-0dca-0b5f-b303-d5de18353f5e@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Thu, 03 Aug 2017 12:47:10 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 494 Lines: 28 >> Minor nit: Can't you directly do >> >> kunmap(page); >> nested_release_page_clean(page); >> >> at this point? >> >> We can fix this up later. > > You actually can do simply kvm_vcpu_read_guest_page(vcpu, > vmcs12->eptp_list_address >> PAGE_SHIFT, &address, index * 8, 8). > Fascinating how nested is able to confuse me every time :) . Sure, this is just a G1 address, not a G2 address ... (maybe we should rename nested_get_page to guest_get_page ...) > Paolo > -- Thanks, David