Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1798222imm; Thu, 9 Aug 2018 02:03:48 -0700 (PDT) X-Google-Smtp-Source: AA+uWPxeGP70+uOxK2tzCWE30lqEU2IwoZBseIYikiXq23M6ea7ePLtqWu/PdPKVgkzP/6eITDa5 X-Received: by 2002:a17:902:6e16:: with SMTP id u22-v6mr1257256plk.13.1533805428092; Thu, 09 Aug 2018 02:03:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533805428; cv=none; d=google.com; s=arc-20160816; b=nMA6ro6xGAfiskSaECsYxzNt/uoLc2rWzsr+jzLNoSC8LYWszoAA5OMn4bOdaKLvBr hCWQyjG94gTHg3JfF453YokA7U4bhWulEZkEOBVrDfOh2Jq4wTdMIGsqgyVSEEV8rk8H nXwT3yS3KCVrVMLuDOlMqmxZHxAFo+iFrleMIUzLyN1WMflispnrmTZ7HdNel91hRtNQ jj7mSCf1Yr4ZK2CYFtQHcgTBflSxW7xJQEZj/Nb472ImdPUUCsVO+/j6+nhTdHN8sfW+ x7Qbswedq8EB3vE/Um78ExxiochjEcgvIeruqatuZ245K90LoCmq/xhxTdOBcRcoqTEa 2ZqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=1KYZdIetVydf6TC6iluZAZ20RvrSESFQTybNLFxG+Xs=; b=l9kFzL4nvpvBMuLk01TgNaURkdE2Ui9mAFVA9YyuQxaqFkEy6DYOOE4KNnJnuFXtaN JuhcZYZJnXqldDoKutL/NATJzTRqnhbD09Wu/d/Zj1QuWEefujW7Iz4YNS/DJaFpta1k SU9OkY08oFA6K5Qt1Rm/0LcyITsH9Yc9QZdvLa3s7wyw1zA18Fl9hA/Va+lb4ad9CinD KHOSOmiXYmy2bM/5Dzqz26sGXNYCPifG8Y0C0Z3vEMtWWIEv7XRRSLXKjTu5usl557/E qkzlsj9jD7w3IZZPoulfxe+DnB45Nu4mK03H8bTf7jNeRsi60ccw++N1PZlegtjo2hNI 8dxA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 72-v6si7449056pfv.131.2018.08.09.02.03.33; Thu, 09 Aug 2018 02:03:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729869AbeHIL0D (ORCPT + 99 others); Thu, 9 Aug 2018 07:26:03 -0400 Received: from mx2.suse.de ([195.135.220.15]:36926 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727858AbeHIL0C (ORCPT ); Thu, 9 Aug 2018 07:26:02 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 2B438AEB2; Thu, 9 Aug 2018 09:02:09 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id 746771E3C98; Thu, 9 Aug 2018 11:02:08 +0200 (CEST) Date: Thu, 9 Aug 2018 11:02:08 +0200 From: Jan Kara To: Zhang Yi Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-nvdimm@lists.01.org, pbonzini@redhat.com, dan.j.williams@intel.com, jack@suse.cz, hch@lst.de, yu.c.zhang@intel.com, linux-mm@kvack.org, rkrcmar@redhat.com, yi.z.zhang@intel.com Subject: Re: [PATCH V3 0/4] Fix kvm misconceives NVDIMM pages as reserved mmio Message-ID: <20180809090208.GD5069@quack2.suse.cz> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 09-08-18 18:52:48, Zhang Yi wrote: > For device specific memory space, when we move these area of pfn to > memory zone, we will set the page reserved flag at that time, some of > these reserved for device mmio, and some of these are not, such as > NVDIMM pmem. > > Now, we map these dev_dax or fs_dax pages to kvm for DIMM/NVDIMM > backend, since these pages are reserved. the check of > kvm_is_reserved_pfn() misconceives those pages as MMIO. Therefor, we > introduce 2 page map types, MEMORY_DEVICE_FS_DAX/MEMORY_DEVICE_DEV_DAX, > to indentify these pages are from NVDIMM pmem. and let kvm treat these > as normal pages. > > Without this patch, Many operations will be missed due to this > mistreatment to pmem pages. For example, a page may not have chance to > be unpinned for KVM guest(in kvm_release_pfn_clean); not able to be > marked as dirty/accessed(in kvm_set_pfn_dirty/accessed) etc. > > V1: > https://lkml.org/lkml/2018/7/4/91 > > V2: > https://lkml.org/lkml/2018/7/10/135 > > V3: > [PATCH V3 1/4] Needs Comments. > [PATCH V3 2/4] Update the description of MEMORY_DEVICE_DEV_DAX: Jan > [PATCH V3 3/4] Acked-by: Jan in V2 Hum, but it is not the the patch... Honza -- Jan Kara SUSE Labs, CR