Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp6813995ybl; Wed, 15 Jan 2020 10:35:09 -0800 (PST) X-Google-Smtp-Source: APXvYqxsV/kA/3k5wpNNox6xBJX6rSHszW45qFCXPArkQe5FBSLr2e7teTvfzspPXR4N+3ghZ2VU X-Received: by 2002:aca:55cc:: with SMTP id j195mr1007419oib.22.1579113309240; Wed, 15 Jan 2020 10:35:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579113309; cv=none; d=google.com; s=arc-20160816; b=nGa9DXic8SaSaoEl8b4Ew35/6sPt0cbW6WKyehTEwsZjG7a2CbAmDfFkQPXQJBINPL 5bn8CXkcokn/1M/be+SUh8lPFm488/kk3OC1x+9Dlx1a3glsdsso1PdMyfhPlZ8WgSck l4lcnDLIpxi7BjmfnHJiYja81fijpemPrHLuJlMXoyQ52PyS+Kizhea6Fz70kMZLjZtA 8SWVhpkSwYHk3leBSSGQXspQCTbu8+PzqensWgxWNoCgIQs6+8kPFaL55gjd6x/9A+qr RYd9N8mDQYKADyeq+vUz+7i+rgPi8LI7T2nkToiBlUxQ7DFWsUVmZ+DTk5/ICksjcQ67 uovQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=va5ZZWbJX4SIzlOtIXmCKn6cD0Cw7eHyuV0gMLwZJ6Y=; b=tB6CCp5l3FaquEH/OUGb8F6GTMF3L9FjMJtRt9yyp1em7SnRhjMZs0GUVvXiVKSt2d Gm+63XGnnB3NAaCspcQxgONoAE3yvubB8QVkdmyrVKogJIeUCUzj9yoDsRo4MiXWp5oJ ZXz/ETmcgO3wFRWmJ3LlmGHd+JWn6BJSPT3An0bJn7SYcYyclU5TWKvRwKHGNDtHFdJt vHfh1ZxSKEm3PJ+8h+yRyFeZFno+iMDmXe72xoRxnO6vBkB+MbWGB8qod3bcaqbQaFiX 5dGeln/DVUIczAs9PMLBJkJFAqMxx1Zf+5HjRC0rSvb/p5TIm8FXd/vSE8ChpnOULCqC xR6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=QJ4OWQ2L; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w5si11599239otq.238.2020.01.15.10.34.56; Wed, 15 Jan 2020 10:35:09 -0800 (PST) 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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=QJ4OWQ2L; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729157AbgAOSdy (ORCPT + 99 others); Wed, 15 Jan 2020 13:33:54 -0500 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:29485 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729037AbgAOSdy (ORCPT ); Wed, 15 Jan 2020 13:33:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1579113233; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=va5ZZWbJX4SIzlOtIXmCKn6cD0Cw7eHyuV0gMLwZJ6Y=; b=QJ4OWQ2L/O8Y01kVtY7+VUP9UB86TUNlqpX/BgofzPtboIf8UCOYmx9cnqLZgVuukclZkB vHVVSSVYJO16vHFePrIasWcLESuzqXf22NOhFxT7/ugfULiQ2hyUIJ6lIWY896aBHmF7t6 zttaP5F8glf8p62DEKwljHOb1gi+VEs= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-329-OEUrftdnMPqyLrFi_g95wQ-1; Wed, 15 Jan 2020 13:33:52 -0500 X-MC-Unique: OEUrftdnMPqyLrFi_g95wQ-1 Received: by mail-wr1-f69.google.com with SMTP id z10so8242454wrt.21 for ; Wed, 15 Jan 2020 10:33:52 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=va5ZZWbJX4SIzlOtIXmCKn6cD0Cw7eHyuV0gMLwZJ6Y=; b=JOJPU16dpbjVm3/LzcpzXGPBfd+WaK7SD6hwmpd9K47rwo2TV1H9IRJgIaYmfrCz4e jJQfQ0jxbZp1/h3DzyTVCrB4MYS+In2DDuaXPz/BoQK/lOc1aVPS345xVY4/E1/cd8Wg RaFuCgaRk1DBYwLdHchxPLDcZx2a8uTBwMItOQYDd2DNO8Y7G4vV6lXSFvTqBf4lYKfB 1I7heLBQyNjGaV6v4gp0Y7a070EuoKKjgm0zsSLEIOcXiOi0aIX3nFEXjkdsObYUDyTU b3BouZNLDT7eJQdZdFy/NFKh6qxalsiuGmmLA4oYohLMvkT0QN+fkL+OfwcbZ7FxB4X0 pHWw== X-Gm-Message-State: APjAAAWX4XY8PeQTcLUqbpkrxPPbM+zidxmmjPTMfAVsDfhPeQLlqMW/ uXmebUf4b9j4tBqlqHAQjZhXjf+29vIh+6KcWg0PfQYRNYHq0iENHg6+QCIiwYRX4W2NUai3k93 e+bIDdeL22FJp/vbYt0kY4nB0 X-Received: by 2002:a05:600c:2503:: with SMTP id d3mr1330106wma.84.1579113231225; Wed, 15 Jan 2020 10:33:51 -0800 (PST) X-Received: by 2002:a05:600c:2503:: with SMTP id d3mr1330076wma.84.1579113231023; Wed, 15 Jan 2020 10:33:51 -0800 (PST) Received: from ?IPv6:2001:b07:6468:f312:436:e17d:1fd9:d92a? ([2001:b07:6468:f312:436:e17d:1fd9:d92a]) by smtp.gmail.com with ESMTPSA id c17sm25545608wrr.87.2020.01.15.10.33.50 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 15 Jan 2020 10:33:50 -0800 (PST) Subject: Re: [PATCH v5 1/2] mm: make dev_pagemap_mapping_shift() externally visible To: Barret Rhoden , Sean Christopherson Cc: Dan Williams , David Hildenbrand , Dave Jiang , Alexander Duyck , linux-nvdimm@lists.01.org, x86@kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, jason.zeng@intel.com References: <20191212182238.46535-1-brho@google.com> <20191212182238.46535-2-brho@google.com> <20191213174702.GB31552@linux.intel.com> From: Paolo Bonzini Message-ID: <207bd03c-df82-f27b-bdb8-1aef33429dd7@redhat.com> Date: Wed, 15 Jan 2020 19:33:49 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 16/12/19 18:59, Barret Rhoden wrote: > Does KVM-x86 need its own names for the levels?  If not, I could convert > the PT_PAGE_TABLE_* stuff to PG_LEVEL_* stuff. Yes, please do. For the 2M/4M case, it's only incorrect to use 2M here: if (PTTYPE == 32 && walker->level == PT_DIRECTORY_LEVEL && is_cpuid_PSE36()) gfn += pse36_gfn_delta(pte); And for that you can even use "> PG_LEVEL_4K" if you think it's nicer. Paolo