From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752737AbdJaIMN (ORCPT ); Tue, 31 Oct 2017 04:12:13 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:44107 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751378AbdJaIMJ (ORCPT ); Tue, 31 Oct 2017 04:12:09 -0400 X-Google-Smtp-Source: ABhQp+T5Mt5WJ/ghkt92lr/ZvmsSv011ehn/X5hghe3iPKzYjs4qF3ua0Q6zVSx2Qhsp6e+tA2xLPw== Subject: Re: [PATCH 0/3] 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, Xiao Guangrong , Dan Williams , ivan.d.cuevas.escareno@intel.com, karthik.kumar@intel.com, Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Borislav Petkov , Mikulas Patocka , Tom Lendacky References: <20171027022524.22589-1-haozhong.zhang@intel.com> From: Xiao Guangrong Message-ID: <6828fd44-f883-3f90-3e7c-1246300f4c41@gmail.com> Date: Tue, 31 Oct 2017 16:12:29 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <20171027022524.22589-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 10/27/2017 10:25 AM, Haozhong Zhang wrote: > [I just copy the commit message from patch 3] > > By default, KVM treats a reserved page as for MMIO purpose, and maps > it to guest with UC memory type. However, some reserved pages are not > for MMIO, such as pages of DAX device (e.g., /dev/daxX.Y). Mapping > them with UC memory type will harm the performance. In order to > exclude those cases, we check the host cache mode in addition and only > treat UC/UC- pages as MMIO. > I am afraid that is not only a performance issue but also a architecture bug - it could trigger MCE as there is alias memory mapping (a page mapped as both WB and UC). It may hurt mdev device as well as the device memory may be both mapped at host and VM.