Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 186039
b: refs/heads/master
c: da15bf4
h: refs/heads/master
i:
  186037: ba1b9d0
  186035: 8ceff74
  186031: 5e47cec
v: v3
  • Loading branch information
Liu Yu authored and Marcelo Tosatti committed Mar 1, 2010
1 parent 96bedc2 commit dd51ce9
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 19 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: a9040f274285c3c962a08b177ac5764b4a93df07
refs/heads/master: da15bf436bc9586603b47b39244157431fa38b56
2 changes: 2 additions & 0 deletions trunk/arch/powerpc/include/asm/kvm_e500.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ struct kvmppc_vcpu_e500 {
u32 l1csr1;
u32 hid0;
u32 hid1;
u32 tlb0cfg;
u32 tlb1cfg;

struct kvm_vcpu vcpu;
};
Expand Down
20 changes: 2 additions & 18 deletions trunk/arch/powerpc/kvm/e500_emulate.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,25 +164,9 @@ int kvmppc_core_emulate_mfspr(struct kvm_vcpu *vcpu, int sprn, int rt)
kvmppc_set_gpr(vcpu, rt, vcpu_e500->mas7); break;

case SPRN_TLB0CFG:
{
ulong tmp = SPRN_TLB0CFG;

tmp &= ~0xfffUL;
tmp |= vcpu_e500->guest_tlb_size[0];
kvmppc_set_gpr(vcpu, rt, tmp);
break;
}

kvmppc_set_gpr(vcpu, rt, vcpu_e500->tlb0cfg); break;
case SPRN_TLB1CFG:
{
ulong tmp = SPRN_TLB1CFG;

tmp &= ~0xfffUL;
tmp |= vcpu_e500->guest_tlb_size[1];
kvmppc_set_gpr(vcpu, rt, tmp);
break;
}

kvmppc_set_gpr(vcpu, rt, vcpu_e500->tlb1cfg); break;
case SPRN_L1CSR0:
kvmppc_set_gpr(vcpu, rt, vcpu_e500->l1csr0); break;
case SPRN_L1CSR1:
Expand Down
6 changes: 6 additions & 0 deletions trunk/arch/powerpc/kvm/e500_tlb.c
Original file line number Diff line number Diff line change
Expand Up @@ -728,6 +728,12 @@ int kvmppc_e500_tlb_init(struct kvmppc_vcpu_e500 *vcpu_e500)
if (vcpu_e500->shadow_pages[1] == NULL)
goto err_out_page0;

/* Init TLB configuration register */
vcpu_e500->tlb0cfg = mfspr(SPRN_TLB0CFG) & ~0xfffUL;
vcpu_e500->tlb0cfg |= vcpu_e500->guest_tlb_size[0];
vcpu_e500->tlb1cfg = mfspr(SPRN_TLB1CFG) & ~0xfffUL;
vcpu_e500->tlb1cfg |= vcpu_e500->guest_tlb_size[1];

return 0;

err_out_page0:
Expand Down

0 comments on commit dd51ce9

Please sign in to comment.