Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752823AbbFDIeY (ORCPT ); Thu, 4 Jun 2015 04:34:24 -0400 Received: from mail-wg0-f43.google.com ([74.125.82.43]:36533 "EHLO mail-wg0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752629AbbFDIeP (ORCPT ); Thu, 4 Jun 2015 04:34:15 -0400 Message-ID: <55700D82.6090608@redhat.com> Date: Thu, 04 Jun 2015 10:34:10 +0200 From: Paolo Bonzini User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Xiao Guangrong CC: gleb@kernel.org, mtosatti@redhat.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 14/15] KVM: MTRR: do not map huage page for non-consistent range References: <1432983566-15773-1-git-send-email-guangrong.xiao@linux.intel.com> <1432983566-15773-15-git-send-email-guangrong.xiao@linux.intel.com> <556C27A5.1040908@redhat.com> <556E6CF8.9070602@linux.intel.com> <556EB30F.8030100@redhat.com> <55700B0D.8080808@linux.intel.com> <55700BCF.1010703@linux.intel.com> In-Reply-To: <55700BCF.1010703@linux.intel.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 579 Lines: 18 On 04/06/2015 10:26, Xiao Guangrong wrote: >> >> CR0.CD is always 0 in both host and guest, i guess it's why we cleared >> CR0.CD and CR0.NW in vmx_set_cr0(). > > It reminds me that we should check guest CR0.CD before check guest MTRR > and disable guest PAT if guest CR0.CD = 1. I think it can be done separately, on top. 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/