From: christoffer.dall@linaro.org (Christoffer Dall)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH 2/2] arm64: KVM: Fix build errors after 32-bit THP support
Date: Mon, 17 Jun 2013 19:17:41 -0700 [thread overview]
Message-ID: <1371521861-372-2-git-send-email-christoffer.dall@linaro.org> (raw)
In-Reply-To: <1371521861-372-1-git-send-email-christoffer.dall@linaro.org>
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 <christoffer.dall@linaro.org>
---
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();
--
1.8.1.2
next prev parent reply other threads:[~2013-06-18 2:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-18 2:17 [RFC PATCH 1/2] KVM: ARM: Transparent huge pages and hugetlbfs support Christoffer Dall
2013-06-18 2:17 ` Christoffer Dall [this message]
2013-06-18 10:31 ` [RFC PATCH 2/2] arm64: KVM: Fix build errors after 32-bit THP support Catalin Marinas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1371521861-372-2-git-send-email-christoffer.dall@linaro.org \
--to=christoffer.dall@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).