From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751571AbdKHJTR (ORCPT ); Wed, 8 Nov 2017 04:19:17 -0500 Received: from mail-pl0-f68.google.com ([209.85.160.68]:52016 "EHLO mail-pl0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751104AbdKHJTL (ORCPT ); Wed, 8 Nov 2017 04:19:11 -0500 X-Google-Smtp-Source: ABhQp+QTM0Uiavz3n+tFwHdBTLOFsJ8vGKgFQD42NrlY7cPDvv30haSkyd3FCGvxvXCLu/P0zKOQNQ== Subject: Re: [PATCH v5 0/2] KVM: MMU: fix kvm_is_mmio_pfn() To: Haozhong Zhang , kvm@vger.kernel.org, x86@kernel.org Cc: linux-kernel@vger.kernel.org, Paolo Bonzini , rkrcmar@redhat.com, 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> From: Xiao Guangrong Message-ID: Date: Wed, 8 Nov 2017 17:19:26 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20171108075630.16991-1-haozhong.zhang@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/08/2017 03:56 PM, Haozhong Zhang wrote: > Some reserved pages, such as those from NVDIMM DAX devices, are not > for MMIO, and can be mapped with cached memory type for better > performance. However, the above check misconceives those pages as > MMIO. Because KVM maps MMIO pages with UC memory type, the > performance of guest accesses to those pages would be harmed. > Therefore, we check the host memory type in addition and only treat > UC/UC- pages as MMIO. > Reviewed-by: Xiao Guangrong