From: Avi Kivity <avi@redhat.com>
To: kvm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 31/48] KVM: ppc: e500: Move to Book-3e MMU definitions
Date: Sun, 16 Aug 2009 12:29:51 +0300 [thread overview]
Message-ID: <1250415008-17175-32-git-send-email-avi@redhat.com> (raw)
In-Reply-To: <1250415008-17175-1-git-send-email-avi@redhat.com>
From: Liu Yu <yu.liu@freescale.com>
According to commit 70fe3af8403f85196bb74f22ce4813db7dfedc1a.
Signed-off-by: Liu Yu <yu.liu@freescale.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
---
arch/powerpc/kvm/e500_tlb.c | 10 +++++-----
arch/powerpc/kvm/e500_tlb.h | 6 +++---
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/arch/powerpc/kvm/e500_tlb.c b/arch/powerpc/kvm/e500_tlb.c
index 0e773fc..a2048ac 100644
--- a/arch/powerpc/kvm/e500_tlb.c
+++ b/arch/powerpc/kvm/e500_tlb.c
@@ -269,7 +269,7 @@ static inline void kvmppc_e500_deliver_tlb_miss(struct kvm_vcpu *vcpu,
tlbsel = (vcpu_e500->mas4 >> 28) & 0x1;
victim = (tlbsel == 0) ? tlb0_get_next_victim(vcpu_e500) : 0;
pidsel = (vcpu_e500->mas4 >> 16) & 0xf;
- tsized = (vcpu_e500->mas4 >> 8) & 0xf;
+ tsized = (vcpu_e500->mas4 >> 7) & 0x1f;
vcpu_e500->mas0 = MAS0_TLBSEL(tlbsel) | MAS0_ESEL(victim)
| MAS0_NV(vcpu_e500->guest_tlb_nv[tlbsel]);
@@ -309,7 +309,7 @@ static inline void kvmppc_e500_shadow_map(struct kvmppc_vcpu_e500 *vcpu_e500,
vcpu_e500->shadow_pages[tlbsel][esel] = new_page;
/* Force TS=1 IPROT=0 TSIZE=4KB for all guest mappings. */
- stlbe->mas1 = MAS1_TSIZE(BOOKE_PAGESZ_4K)
+ stlbe->mas1 = MAS1_TSIZE(BOOK3E_PAGESZ_4K)
| MAS1_TID(get_tlb_tid(gtlbe)) | MAS1_TS | MAS1_VALID;
stlbe->mas2 = (gvaddr & MAS2_EPN)
| e500_shadow_mas2_attrib(gtlbe->mas2,
@@ -545,7 +545,7 @@ int kvmppc_e500_emul_tlbwe(struct kvm_vcpu *vcpu)
case 0:
/* TLB0 */
gtlbe->mas1 &= ~MAS1_TSIZE(~0);
- gtlbe->mas1 |= MAS1_TSIZE(BOOKE_PAGESZ_4K);
+ gtlbe->mas1 |= MAS1_TSIZE(BOOK3E_PAGESZ_4K);
stlbsel = 0;
sesel = kvmppc_e500_stlbe_map(vcpu_e500, 0, esel);
@@ -679,14 +679,14 @@ void kvmppc_e500_tlb_setup(struct kvmppc_vcpu_e500 *vcpu_e500)
/* Insert large initial mapping for guest. */
tlbe = &vcpu_e500->guest_tlb[1][0];
- tlbe->mas1 = MAS1_VALID | MAS1_TSIZE(BOOKE_PAGESZ_256M);
+ tlbe->mas1 = MAS1_VALID | MAS1_TSIZE(BOOK3E_PAGESZ_256M);
tlbe->mas2 = 0;
tlbe->mas3 = E500_TLB_SUPER_PERM_MASK;
tlbe->mas7 = 0;
/* 4K map for serial output. Used by kernel wrapper. */
tlbe = &vcpu_e500->guest_tlb[1][1];
- tlbe->mas1 = MAS1_VALID | MAS1_TSIZE(BOOKE_PAGESZ_4K);
+ tlbe->mas1 = MAS1_VALID | MAS1_TSIZE(BOOK3E_PAGESZ_4K);
tlbe->mas2 = (0xe0004500 & 0xFFFFF000) | MAS2_I | MAS2_G;
tlbe->mas3 = (0xe0004500 & 0xFFFFF000) | E500_TLB_SUPER_PERM_MASK;
tlbe->mas7 = 0;
diff --git a/arch/powerpc/kvm/e500_tlb.h b/arch/powerpc/kvm/e500_tlb.h
index 45b064b..d28e301 100644
--- a/arch/powerpc/kvm/e500_tlb.h
+++ b/arch/powerpc/kvm/e500_tlb.h
@@ -16,7 +16,7 @@
#define __KVM_E500_TLB_H__
#include <linux/kvm_host.h>
-#include <asm/mmu-fsl-booke.h>
+#include <asm/mmu-book3e.h>
#include <asm/tlb.h>
#include <asm/kvm_e500.h>
@@ -59,7 +59,7 @@ extern void kvmppc_e500_tlb_setup(struct kvmppc_vcpu_e500 *);
/* TLB helper functions */
static inline unsigned int get_tlb_size(const struct tlbe *tlbe)
{
- return (tlbe->mas1 >> 8) & 0xf;
+ return (tlbe->mas1 >> 7) & 0x1f;
}
static inline gva_t get_tlb_eaddr(const struct tlbe *tlbe)
@@ -70,7 +70,7 @@ static inline gva_t get_tlb_eaddr(const struct tlbe *tlbe)
static inline u64 get_tlb_bytes(const struct tlbe *tlbe)
{
unsigned int pgsize = get_tlb_size(tlbe);
- return 1ULL << 10 << (pgsize << 1);
+ return 1ULL << 10 << pgsize;
}
static inline gva_t get_tlb_end(const struct tlbe *tlbe)
--
1.6.3.3
next prev parent reply other threads:[~2009-08-16 9:32 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-16 9:29 [PATCH 00/48] KVM updates for 2.6.32 merge window (1/4) Avi Kivity
2009-08-16 9:29 ` [PATCH 01/48] KVM: VMX: Properly handle software interrupt re-injection in real mode Avi Kivity
2009-08-16 9:29 ` [PATCH 02/48] KVM: Replace MSR_IA32_TIME_STAMP_COUNTER with MSR_IA32_TSC of msr-index.h Avi Kivity
2009-08-16 9:29 ` [PATCH 03/48] KVM: Add MCE support Avi Kivity
2009-08-16 9:29 ` [PATCH 04/48] KVM: Use MSR names in place of address Avi Kivity
2009-08-16 9:29 ` [PATCH 05/48] KVM: fix cpuid E2BIG handling for extended request types Avi Kivity
2009-08-16 9:29 ` [PATCH 06/48] KVM: x86 emulator: Implement zero-extended immediate decoding Avi Kivity
2009-08-16 9:29 ` [PATCH 07/48] KVM: x86 emulator: fix jmp far decoding (opcode 0xea) Avi Kivity
2009-08-16 9:29 ` [PATCH 08/48] KVM: cleanup arch/x86/kvm/Makefile Avi Kivity
2009-08-16 9:29 ` [PATCH 09/48] KVM: Drop interrupt shadow when single stepping should be done only on VMX Avi Kivity
2009-08-16 9:29 ` [PATCH 10/48] KVM: Move common KVM Kconfig items to new file virt/kvm/Kconfig Avi Kivity
2009-08-16 9:29 ` [PATCH 11/48] KVM: irqfd Avi Kivity
2009-08-16 9:29 ` [PATCH 12/48] KVM: Allow PIT emulation without speaker port Avi Kivity
2009-08-16 9:29 ` [PATCH 13/48] KVM: ia64: Correct itc_offset calculations Avi Kivity
2009-08-16 9:29 ` [PATCH 14/48] KVM: s390: infrastructure to kick vcpus out of guest state Avi Kivity
2009-08-16 9:29 ` [PATCH 15/48] KVM: s390: fix signal handling Avi Kivity
2009-08-16 9:29 ` [PATCH 16/48] KVM: s390: streamline memslot handling Avi Kivity
2009-08-16 9:29 ` [PATCH 17/48] KVM: Downsize max support MSI-X entry to 256 Avi Kivity
2009-08-16 9:29 ` [PATCH 18/48] KVM: SVM: use explicit 64bit storage for sysenter values Avi Kivity
2009-08-16 9:29 ` [PATCH 19/48] KVM: No disable_irq for MSI/MSI-X interrupt on device assignment Avi Kivity
2009-08-16 9:29 ` [PATCH 20/48] KVM: remove redundant declarations Avi Kivity
2009-08-16 9:29 ` [PATCH 21/48] KVM: SVM: Fold kvm_svm.h info svm.c Avi Kivity
2009-08-16 9:29 ` [PATCH 22/48] KVM: powerpc: fix some init/exit annotations Avi Kivity
2009-08-16 9:29 ` [PATCH 23/48] KVM: Clean up coalesced_mmio destruction Avi Kivity
2009-08-16 9:29 ` [PATCH 24/48] KVM: cleanup io_device code Avi Kivity
2009-08-16 9:29 ` [PATCH 25/48] KVM: do not register i8254 PIO regions until we are initialized Avi Kivity
2009-08-16 9:29 ` [PATCH 26/48] KVM: VMX: Avoid duplicate ept tlb flush when setting cr3 Avi Kivity
2009-08-16 9:29 ` [PATCH 27/48] KVM: VMX: Simplify pdptr and cr3 management Avi Kivity
2009-08-16 9:29 ` [PATCH 28/48] KVM: Cache pdptrs Avi Kivity
2009-08-16 9:29 ` [PATCH 29/48] KVM: VMX: Fix reporting of unhandled EPT violations Avi Kivity
2009-08-16 9:29 ` [PATCH 30/48] KVM: Calculate available entries in coalesced mmio ring Avi Kivity
2009-08-16 9:29 ` Avi Kivity [this message]
2009-08-16 9:29 ` [PATCH 32/48] KVM: ppc: e500: Directly pass pvr to guest Avi Kivity
2009-08-16 9:29 ` [PATCH 33/48] KVM: ppc: e500: Add MMUCFG and PVR emulation Avi Kivity
2009-08-16 9:29 ` [PATCH 34/48] KVM: Cleanup LAPIC interface Avi Kivity
2009-08-16 9:29 ` [PATCH 35/48] KVM: Grab pic lock in kvm_pic_clear_isr_ack Avi Kivity
2009-08-16 9:29 ` [PATCH 36/48] KVM: move coalesced_mmio locking to its own device Avi Kivity
2009-08-16 9:29 ` [PATCH 37/48] KVM: introduce irq_lock, use it to protect ioapic Avi Kivity
2009-08-16 9:29 ` [PATCH 38/48] KVM: switch irq injection/acking data structures to irq_lock Avi Kivity
2009-08-16 9:29 ` [PATCH 39/48] KVM: VMX: Support Unrestricted Guest feature Avi Kivity
2009-08-16 9:30 ` [PATCH 40/48] KVM: Reorder ioctls in kvm.h Avi Kivity
2009-08-16 9:30 ` [PATCH 41/48] KVM: VMX: Move rmode structure to vmx-specific code Avi Kivity
2009-08-16 9:30 ` [PATCH 42/48] KVM: MMU: Fix is_dirty_pte() Avi Kivity
2009-08-16 9:30 ` [PATCH 43/48] KVM: MMU: Adjust pte accessors to explicitly indicate guest or shadow pte Avi Kivity
2009-08-16 9:30 ` [PATCH 44/48] KVM: MMU: s/shadow_pte/spte/ Avi Kivity
2009-08-16 9:30 ` [PATCH 45/48] KVM: Introduce kvm_vcpu_is_bsp() function Avi Kivity
2009-08-16 9:30 ` [PATCH 46/48] KVM: Use pointer to vcpu instead of vcpu_id in timer code Avi Kivity
2009-08-16 9:30 ` [PATCH 47/48] KVM: Break dependency between vcpu index in vcpus array and vcpu_id Avi Kivity
2009-08-16 9:30 ` [PATCH 48/48] KVM: Use macro to iterate over vcpus Avi Kivity
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=1250415008-17175-32-git-send-email-avi@redhat.com \
--to=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®