Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760655AbdLSKmh (ORCPT ); Tue, 19 Dec 2017 05:42:37 -0500 Received: from mx1.redhat.com ([209.132.183.28]:44972 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758658AbdLSKm3 (ORCPT ); Tue, 19 Dec 2017 05:42:29 -0500 Subject: Re: [PATCH v5 1/2] x86/mm: add a function to check if a pfn is UC/UC- To: kvm@vger.kernel.org, x86@kernel.org, linux-kernel@vger.kernel.org, rkrcmar@redhat.com, Xiao Guangrong , Dan Williams , ivan.d.cuevas.escareno@intel.com, karthik.kumar@intel.com, Konrad Rzeszutek Wilk , Olif Chapman , Mikulas Patocka , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Borislav Petkov , Tom Lendacky References: <20171108075630.16991-1-haozhong.zhang@intel.com> <20171108075630.16991-2-haozhong.zhang@intel.com> <2da7d38c-8135-a722-8d93-f3d1a618b12e@redhat.com> <20171219024053.b5ckuwevnm2ydzef@hz-desktop> From: Paolo Bonzini Message-ID: <6541e56d-a5d8-641e-99e8-cbc7bce6da3a@redhat.com> Date: Tue, 19 Dec 2017 11:42:20 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <20171219024053.b5ckuwevnm2ydzef@hz-desktop> 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.30]); Tue, 19 Dec 2017 10:42:29 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 534 Lines: 13 On 19/12/2017 03:40, Haozhong Zhang wrote: >> As discussed in the reply to v2, this should include WC too. The >> function name could become something like pat_pfn_downgraded_by_uc_mtrr. > > Or shall we just expose lookup_memtype(), and keep all other logic in > KVM? The function name still looks strange somehow, and the check of > memory type makes more sense and would be easier to understand in the > context of KVM. I agree that it's a bit strange, but I don't want to go against the suggestions of the x86 maintainer. Paolo