Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753111AbbGQCbV (ORCPT ); Thu, 16 Jul 2015 22:31:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50766 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751976AbbGQCbT (ORCPT ); Thu, 16 Jul 2015 22:31:19 -0400 Subject: Re: [PATCH 2/4] KVM: SVM: use NPT page attributes To: Andy Lutomirski , linux-kernel@vger.kernel.org, kvm@vger.kernel.org References: <1436276739-50326-1-git-send-email-pbonzini@redhat.com> <1436276739-50326-3-git-send-email-pbonzini@redhat.com> <55A84DD0.9040008@kernel.org> Cc: guangrong.xiao@linux.intel.com, jroedel@suse.de, alex.williamson@redhat.com, ogerlitz@mellanox.com, amirv@mellanox.com From: Paolo Bonzini X-Enigmail-Draft-Status: N1110 Message-ID: <55A868F2.4040304@redhat.com> Date: Fri, 17 Jul 2015 04:31:14 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.0.1 MIME-Version: 1.0 In-Reply-To: <55A84DD0.9040008@kernel.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1155 Lines: 29 On 17/07/2015 02:35, Andy Lutomirski wrote: > >> Right now, NPT page attributes are not used, and the final page >> attribute depends solely on gPAT (which however is not synced >> correctly), the guest MTRRs and the guest page attributes. >> >> However, we can do better by mimicking what is done for VMX. >> In the absence of PCI passthrough, the guest PAT can be ignored >> and the page attributes can be just WB. If passthrough is being >> used, instead, keep respecting the guest PAT, and emulate the guest >> MTRRs through the PAT field of the nested page tables. >> >> The only snag is that WP memory cannot be emulated correctly, >> because Linux's default PAT setting only includes the other types. >> > > As of quite recently, Linux understands that the PAT has eight slots, > and we can probably give you WP. Do you want it? It doesn't really matter, it's mostly used in the firmware. Paolo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/