Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 297091
b: refs/heads/master
c: befdc0a
h: refs/heads/master
i:
  297089: bef8af4
  297087: 5cf3a84
v: v3
  • Loading branch information
Liu Yu-B13201 authored and Avi Kivity committed Mar 5, 2012
1 parent 2e4e54e commit 98f93a5
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 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: 570135243a33174a5d74641de693b6c0233d1181
refs/heads/master: befdc0a65afd17181392eff3d43c63407f266a9f
11 changes: 10 additions & 1 deletion trunk/arch/powerpc/kernel/kvm.c
Original file line number Diff line number Diff line change
Expand Up @@ -665,6 +665,9 @@ static void kvm_check_ins(u32 *inst, u32 features)
}
}

extern u32 kvm_template_start[];
extern u32 kvm_template_end[];

static void kvm_use_magic_page(void)
{
u32 *p;
Expand Down Expand Up @@ -692,8 +695,14 @@ static void kvm_use_magic_page(void)
*/
local_irq_disable();

for (p = start; p < end; p++)
for (p = start; p < end; p++) {
/* Avoid patching the template code */
if (p >= kvm_template_start && p < kvm_template_end) {
p = kvm_template_end - 1;
continue;
}
kvm_check_ins(p, features);
}

local_irq_enable();

Expand Down
6 changes: 6 additions & 0 deletions trunk/arch/powerpc/kernel/kvm_emul.S
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ kvm_hypercall_start:
shared->critical == r1 and r2 is always != r1 */ \
STL64(r2, KVM_MAGIC_PAGE + KVM_MAGIC_CRITICAL, 0);

.global kvm_template_start
kvm_template_start:

.global kvm_emulate_mtmsrd
kvm_emulate_mtmsrd:

Expand Down Expand Up @@ -350,3 +353,6 @@ kvm_emulate_mtsrin_orig_ins_offs:
.global kvm_emulate_mtsrin_len
kvm_emulate_mtsrin_len:
.long (kvm_emulate_mtsrin_end - kvm_emulate_mtsrin) / 4

.global kvm_template_end
kvm_template_end:

0 comments on commit 98f93a5

Please sign in to comment.