Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 297068
b: refs/heads/master
c: 0164c0f
h: refs/heads/master
v: v3
  • Loading branch information
Scott Wood authored and Avi Kivity committed Mar 5, 2012
1 parent d88b6f2 commit 6fb92cb
Show file tree
Hide file tree
Showing 5 changed files with 214 additions and 97 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 90b92a6f51af9adf8c44e8ab3f435b336e5ba6ff
refs/heads/master: 0164c0f0c404017fb04defb0ceb23fd1c3c3a53e
24 changes: 23 additions & 1 deletion trunk/arch/powerpc/include/asm/kvm_e500.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,21 @@ struct tlbe{
#define E500_TLB_VALID 1
#define E500_TLB_DIRTY 2

struct tlbe_priv {
struct tlbe_ref {
pfn_t pfn;
unsigned int flags; /* E500_TLB_* */
};

struct tlbe_priv {
struct tlbe_ref ref; /* TLB0 only -- TLB1 uses tlb_refs */
};

struct vcpu_id_table;

struct kvmppc_e500_tlb_params {
int entries, ways, sets;
};

struct kvmppc_vcpu_e500 {
/* Unmodified copy of the guest's TLB. */
struct tlbe *gtlb_arch[E500_TLB_NUM];
Expand All @@ -49,6 +57,20 @@ struct kvmppc_vcpu_e500 {
unsigned int gtlb_size[E500_TLB_NUM];
unsigned int gtlb_nv[E500_TLB_NUM];

/*
* information associated with each host TLB entry --
* TLB1 only for now. If/when guest TLB1 entries can be
* mapped with host TLB0, this will be used for that too.
*
* We don't want to use this for guest TLB0 because then we'd
* have the overhead of doing the translation again even if
* the entry is still in the guest TLB (e.g. we swapped out
* and back, and our host TLB entries got evicted).
*/
struct tlbe_ref *tlb_refs[E500_TLB_NUM];

unsigned int host_tlb1_nv;

u32 host_pid[E500_PID_NUM];
u32 pid[E500_PID_NUM];
u32 svr;
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/powerpc/include/asm/mmu-book3e.h
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@
#define TLBnCFG_MAXSIZE 0x000f0000 /* Maximum Page Size (v1.0) */
#define TLBnCFG_MAXSIZE_SHIFT 16
#define TLBnCFG_ASSOC 0xff000000 /* Associativity */
#define TLBnCFG_ASSOC_SHIFT 24

/* TLBnPS encoding */
#define TLBnPS_4K 0x00000004
Expand Down
Loading

0 comments on commit 6fb92cb

Please sign in to comment.