From patchwork Tue Jun 18 02:17:41 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoffer Dall X-Patchwork-Id: 17958 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qe0-f70.google.com (mail-qe0-f70.google.com [209.85.128.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D9D722100B for ; Tue, 18 Jun 2013 02:15:53 +0000 (UTC) Received: by mail-qe0-f70.google.com with SMTP id 2sf4945250qea.5 for ; Mon, 17 Jun 2013 19:15:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-beenthere:x-forwarded-to:x-forwarded-for :delivered-to:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe; bh=dda3OGZrbYHOTFLEjF8ucRLDI+Qx//zO86es5qHeCPc=; b=FnypVt9XeWdLwW9rIU/TsneKLKk8CV6H8wG4KCQ+PM+GCHF74+R5HD1NnsZy5faPaO MahT3wXA5UYKGEVHIgnYNSkjijiEMAYX+px/gN51cYW4/DMp+QHcALo63E2XOJhnl6vQ lW0jPUiTKVLN8JOrKT4mtNj5eD+1p7yzXExMa6C1jTytzEDf9K0MtzeeofnybSPNLgm1 UzUUIB8OLHCA2W+aSQ8t5ZuQL/9FIvU6JRyDF+qFLZ2D6ksgyVMcUFtWUQIGRhcUVWDi Iyvu+SR57Ymjdt6OJ2kXRkdaCnOBODlA455axoP9mHlaPI+jdiCKCmoBUlLJ/hYuNJPN NTug== X-Received: by 10.236.74.132 with SMTP id x4mr10631557yhd.34.1371521753535; Mon, 17 Jun 2013 19:15:53 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.108.7 with SMTP id hg7ls689886qeb.95.gmail; Mon, 17 Jun 2013 19:15:53 -0700 (PDT) X-Received: by 10.58.237.105 with SMTP id vb9mr5190544vec.2.1371521753370; Mon, 17 Jun 2013 19:15:53 -0700 (PDT) Received: from mail-vb0-x22b.google.com (mail-vb0-x22b.google.com [2607:f8b0:400c:c02::22b]) by mx.google.com with ESMTPS id p8si4715712vdv.148.2013.06.17.19.15.53 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 17 Jun 2013 19:15:53 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c02::22b is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c02::22b; Received: by mail-vb0-f43.google.com with SMTP id e12so2500001vbg.2 for ; Mon, 17 Jun 2013 19:15:53 -0700 (PDT) X-Received: by 10.58.168.208 with SMTP id zy16mr5441881veb.3.1371521753286; Mon, 17 Jun 2013 19:15:53 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.58.165.8 with SMTP id yu8csp55844veb; Mon, 17 Jun 2013 19:15:52 -0700 (PDT) X-Received: by 10.66.232.9 with SMTP id tk9mr217408pac.20.1371521752484; Mon, 17 Jun 2013 19:15:52 -0700 (PDT) Received: from mail-pb0-x229.google.com (mail-pb0-x229.google.com [2607:f8b0:400e:c01::229]) by mx.google.com with ESMTPS id ch5si7366740pad.220.2013.06.17.19.15.52 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 17 Jun 2013 19:15:52 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400e:c01::229 is neither permitted nor denied by best guess record for domain of christoffer.dall@linaro.org) client-ip=2607:f8b0:400e:c01::229; Received: by mail-pb0-f41.google.com with SMTP id rp16so3412640pbb.28 for ; Mon, 17 Jun 2013 19:15:52 -0700 (PDT) X-Received: by 10.68.211.73 with SMTP id na9mr15322552pbc.90.1371521752114; Mon, 17 Jun 2013 19:15:52 -0700 (PDT) Received: from localhost.localdomain (c-67-169-183-77.hsd1.ca.comcast.net. [67.169.183.77]) by mx.google.com with ESMTPSA id eq5sm15998366pbc.15.2013.06.17.19.15.51 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 17 Jun 2013 19:15:51 -0700 (PDT) From: Christoffer Dall To: linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu Cc: linaro-kernel@lists.linaro.org, patches@linaro.org, Christoffer Dall Subject: [RFC PATCH 2/2] arm64: KVM: Fix build errors after 32-bit THP support Date: Mon, 17 Jun 2013 19:17:41 -0700 Message-Id: <1371521861-372-2-git-send-email-christoffer.dall@linaro.org> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1371521861-372-1-git-send-email-christoffer.dall@linaro.org> References: <1371521861-372-1-git-send-email-christoffer.dall@linaro.org> X-Gm-Message-State: ALoCoQkK4h4IbqtPojR4WdRvzjt/Py44v6VJUf8zFBLOWyDItCpROcwAUtb5J7H5OVoUMyV7KLxl X-Original-Sender: christoffer.dall@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c02::22b is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , When KVM 32-bit adds THP support the build of KVM/arm64 will break because we rename some definition to be more sane and change the interface to coherent_icache_guest_page. Huge pages are not supported on arm64 and the pgtable predicates will always return false, so this shouldn't change any functionality on the 64-bit side. Signed-off-by: Christoffer Dall --- arch/arm64/include/asm/kvm_host.h | 4 ++-- arch/arm64/include/asm/kvm_mmu.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/arm64/include/asm/kvm_host.h b/arch/arm64/include/asm/kvm_host.h index 644d739..f5d73dc 100644 --- a/arch/arm64/include/asm/kvm_host.h +++ b/arch/arm64/include/asm/kvm_host.h @@ -38,8 +38,8 @@ /* We don't currently support large pages. */ #define KVM_HPAGE_GFN_SHIFT(x) 0 -#define KVM_NR_PAGE_SIZES 1 -#define KVM_PAGES_PER_HPAGE(x) (1UL<<31) +#define KVM_HPAGE_SIZE 1 +#define KVM_PAGES_PER_HPAGE (1UL<<31) struct kvm_vcpu; int kvm_target_cpu(void); diff --git a/arch/arm64/include/asm/kvm_mmu.h b/arch/arm64/include/asm/kvm_mmu.h index efe609c..c86749e 100644 --- a/arch/arm64/include/asm/kvm_mmu.h +++ b/arch/arm64/include/asm/kvm_mmu.h @@ -118,11 +118,11 @@ static inline void kvm_set_s2pte_writable(pte_t *pte) struct kvm; -static inline void coherent_icache_guest_page(struct kvm *kvm, gfn_t gfn) +static inline void coherent_icache_guest_page(struct kvm *kvm, hva_t hva, + size_t size) { if (!icache_is_aliasing()) { /* PIPT */ - unsigned long hva = gfn_to_hva(kvm, gfn); - flush_icache_range(hva, hva + PAGE_SIZE); + flush_icache_range(hva, hva + size); } else if (!icache_is_aivivt()) { /* non ASID-tagged VIVT */ /* any kind of VIPT cache */ __flush_icache_all();