Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 215694
b: refs/heads/master
c: d1290b1
h: refs/heads/master
v: v3
  • Loading branch information
Alexander Graf authored and Avi Kivity committed Oct 24, 2010
1 parent 5d7bd4b commit cc5da3a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d1293c927568f5b5b8dd3fa263a98683cf8556dc
refs/heads/master: d1290b15e7f139e24150cc6e6d8e904214359e8a
12 changes: 12 additions & 0 deletions trunk/arch/powerpc/kernel/kvm.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@
#define KVM_INST_MTSPR_DAR 0x7c1303a6
#define KVM_INST_MTSPR_DSISR 0x7c1203a6

#define KVM_INST_TLBSYNC 0x7c00046c

static bool kvm_patching_worked = true;

static inline void kvm_patch_ins(u32 *inst, u32 new_inst)
Expand Down Expand Up @@ -98,6 +100,11 @@ static void kvm_patch_ins_stw(u32 *inst, long addr, u32 rt)
kvm_patch_ins(inst, KVM_INST_STW | rt | (addr & 0x0000fffc));
}

static void kvm_patch_ins_nop(u32 *inst)
{
kvm_patch_ins(inst, KVM_INST_NOP);
}

static void kvm_map_magic_page(void *data)
{
kvm_hypercall2(KVM_HC_PPC_MAP_MAGIC_PAGE,
Expand Down Expand Up @@ -166,6 +173,11 @@ static void kvm_check_ins(u32 *inst)
case KVM_INST_MTSPR_DSISR:
kvm_patch_ins_stw(inst, magic_var(dsisr), inst_rt);
break;

/* Nops */
case KVM_INST_TLBSYNC:
kvm_patch_ins_nop(inst);
break;
}

switch (_inst) {
Expand Down

0 comments on commit cc5da3a

Please sign in to comment.