Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp5932526yba; Wed, 1 May 2019 02:50:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqxSlz/Ao3u6Ug4PPbf/OTGxNLHVj0ZbwJZkDpzy1k7otoqNAuzwJXSMVqi0dD7mXmncEshg X-Received: by 2002:a62:480d:: with SMTP id v13mr78853469pfa.125.1556704215549; Wed, 01 May 2019 02:50:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556704215; cv=none; d=google.com; s=arc-20160816; b=lLDXCvkViOE39+HxOx5AroJq14tiI3g5fdX5CnnyLMLlIRkE58/77WkWEYLyfnfewN 8Mhvgb9D0NrKc6ACK9HSdj65mVxEM6jYg0ITTJE4XFwK+xfCMUDIqVz3kb9p5kJ5Lc6K Zy/Rm803glJh+6uWRLtK6oDE6COxXD5vny4XqnYmafijvQvafTSLEQHQuy4BmnVGoqcb DaB0E+geGvuVRe/lQyuj+HNN0DMvkml6tZjdLJEHkXrVP+uIgGevY+/wBAURjnUOSk3J QaHA/hViyMcfKWDSACxpQkWEeq8jmRIJA+v+m4hAJ1Oasn7YNwMmMaqyjDZRW/FDxuA/ deGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=zZohNyUTzfAnh9+0YvsHz1iKqa3wepZKZ6TaApWhgjk=; b=XjgQkC9NY3PRLX/oT15oKI/F4KQcRhORLno6dqgy+6X3hh1q04oowE/8nKIWKOLt+t XGvT7sQRBLeRlJD3rYa+bgotNUzNpn88BVvFce5uFym8E/dQZxoMQVdVHP9+4oIXfnpv wMmJDPck2xaf4FbvO6sL60Ck5NjDCLZvaI79WDNfw0LJOr0orkGeeewczkzKLVriPRTZ 0PiddDsYa4grqc3sS7PwW+OnPwAJIwQYuWpwYG3ODnPH2MKPJ/SO642MBTDqE47wp6kw 4ZAEPAyFncdr5wfiN12uYlO2RT8KyTh/qMnoAoE9nxocE5KWQ2831U5jzd/Baub4NAMH ERkg== 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 k11si39708904pga.257.2019.05.01.02.50.00; Wed, 01 May 2019 02:50:15 -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 S1726327AbfEAJsV (ORCPT + 99 others); Wed, 1 May 2019 05:48:21 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:55024 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726145AbfEAJsS (ORCPT ); Wed, 1 May 2019 05:48:18 -0400 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id BC752D90602CEF28528A; Wed, 1 May 2019 17:48:14 +0800 (CST) Received: from HGHY2Y004646261.china.huawei.com (10.184.12.158) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.439.0; Wed, 1 May 2019 17:48:06 +0800 From: Zenghui Yu To: , , , CC: , , , , , , , , , , Zenghui Yu Subject: [RFC PATCH 0/5] KVM: arm64: Add support for contiguous PTE/PMD hugepages at stage2 Date: Wed, 1 May 2019 09:44:22 +0000 Message-ID: <1556703867-22396-1-git-send-email-yuzenghui@huawei.com> X-Mailer: git-send-email 2.6.4.windows.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.184.12.158] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Currently, we support the following page sizes at stage2: PTE PMD PUD ----- ----- ----- 4K granule: 4K 2M 1G 16K granule: 16K 32M 64K granule: 64K 512M And we have Contiguous bit[52] in stage2 VMSAv8-64 block and page descriptors. As ARM ARM said, when the value of the Contiguous bit is 1, it indicates that the entry is one of a number of adjacent translation table entries that point to a contiguous output address range. This series add support for contiguous PTE/PMD hugepages at stage2 and then we can create huge mappings with following additional sizes: CONT PTE CONT PMD -------- -------- 4K granule: 64K 32M 16K granule: 2M 1G 64K granule: 2M 16G These patches are based on v5.1.0-rc7 and have been tested on Taishan 2280 server (D05) with 4K and 64K granule. Any comments will be appreciated, thanks! Zenghui Yu (5): KVM: arm/arm64: Introduce helpers for page table enties with contiguous bit KVM: arm/arm64: Re-factor building the stage2 page table entries KVM: arm/arm64: Support dirty page tracking for contiguous hugepages KVM: arm/arm64: Add support for creating PTE contiguous hugepages at stage2 KVM: arm/arm64: Add support for creating PMD contiguous hugepages at stage2 arch/arm/include/asm/kvm_mmu.h | 22 +++ arch/arm/include/asm/pgtable-hwdef.h | 8 + arch/arm64/include/asm/kvm_mmu.h | 20 +++ virt/kvm/arm/mmu.c | 299 ++++++++++++++++++++++++++++++----- 4 files changed, 312 insertions(+), 37 deletions(-) -- 1.8.3.1