Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 343472
b: refs/heads/master
c: 7c973a2
h: refs/heads/master
v: v3
  • Loading branch information
Alexander Graf committed Oct 5, 2012
1 parent 31f9aaf commit 222797f
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 6 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: 7ee788556bf395a8ef413bea33494df29a3409e0
refs/heads/master: 7c973a2ebb8fb9c8ee2ae9647f9ad7b0ad58a3e6
2 changes: 1 addition & 1 deletion trunk/arch/powerpc/include/asm/kvm_ppc.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ extern int kvmppc_core_emulate_mtspr(struct kvm_vcpu *vcpu, int sprn,
ulong val);
extern int kvmppc_core_emulate_mfspr(struct kvm_vcpu *vcpu, int sprn,
ulong *val);
extern void kvmppc_core_check_requests(struct kvm_vcpu *vcpu);
extern int kvmppc_core_check_requests(struct kvm_vcpu *vcpu);

extern int kvmppc_booke_init(void);
extern void kvmppc_booke_exit(void);
Expand Down
6 changes: 5 additions & 1 deletion trunk/arch/powerpc/kvm/book3s_pr.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,16 @@ void kvmppc_core_vcpu_put(struct kvm_vcpu *vcpu)
kvmppc_giveup_ext(vcpu, MSR_VSX);
}

void kvmppc_core_check_requests(struct kvm_vcpu *vcpu)
int kvmppc_core_check_requests(struct kvm_vcpu *vcpu)
{
int r = 1; /* Indicate we want to get back into the guest */

/* We misuse TLB_FLUSH to indicate that we want to clear
all shadow cache entries */
if (kvm_check_request(KVM_REQ_TLB_FLUSH, vcpu))
kvmppc_mmu_pte_flush(vcpu, 0, 0);

return r;
}

/************* MMU Notifiers *************/
Expand Down
6 changes: 5 additions & 1 deletion trunk/arch/powerpc/kvm/booke.c
Original file line number Diff line number Diff line change
Expand Up @@ -455,14 +455,18 @@ int kvmppc_core_prepare_to_enter(struct kvm_vcpu *vcpu)
return r;
}

void kvmppc_core_check_requests(struct kvm_vcpu *vcpu)
int kvmppc_core_check_requests(struct kvm_vcpu *vcpu)
{
int r = 1; /* Indicate we want to get back into the guest */

if (kvm_check_request(KVM_REQ_PENDING_TIMER, vcpu))
update_timer_ints(vcpu);
#if defined(CONFIG_KVM_E500V2) || defined(CONFIG_KVM_E500MC)
if (kvm_check_request(KVM_REQ_TLB_FLUSH, vcpu))
kvmppc_core_flush_tlb(vcpu);
#endif

return r;
}

int kvmppc_vcpu_run(struct kvm_run *kvm_run, struct kvm_vcpu *vcpu)
Expand Down
6 changes: 4 additions & 2 deletions trunk/arch/powerpc/kvm/powerpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,11 @@ int kvmppc_prepare_to_enter(struct kvm_vcpu *vcpu)
/* Make sure we process requests preemptable */
local_irq_enable();
trace_kvm_check_requests(vcpu);
kvmppc_core_check_requests(vcpu);
r = kvmppc_core_check_requests(vcpu);
local_irq_disable();
continue;
if (r > 0)
continue;
break;
}

if (kvmppc_core_prepare_to_enter(vcpu)) {
Expand Down

0 comments on commit 222797f

Please sign in to comment.