Skip to content

Commit

Permalink
KVM: arm: implements the kvm_arch_vcpu_in_kernel()
Browse files Browse the repository at this point in the history
This implements the kvm_arch_vcpu_in_kernel() for ARM, and adjusts
the calls to kvm_vcpu_on_spin().

Signed-off-by: Longpeng(Mike) <longpeng2@huawei.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
  • Loading branch information
Longpeng(Mike) authored and Paolo Bonzini committed Aug 8, 2017
1 parent 0546c63 commit f01fbd2
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion arch/arm/kvm/handle_exit.c
Original file line number Diff line number Diff line change
@@ -67,7 +67,7 @@ static int kvm_handle_wfx(struct kvm_vcpu *vcpu, struct kvm_run *run)
if (kvm_vcpu_get_hsr(vcpu) & HSR_WFI_IS_WFE) {
trace_kvm_wfx(*vcpu_pc(vcpu), true);
vcpu->stat.wfe_exit_stat++;
kvm_vcpu_on_spin(vcpu, false);
kvm_vcpu_on_spin(vcpu, vcpu_mode_priv(vcpu));
} else {
trace_kvm_wfx(*vcpu_pc(vcpu), false);
vcpu->stat.wfi_exit_stat++;
2 changes: 1 addition & 1 deletion arch/arm64/kvm/handle_exit.c
Original file line number Diff line number Diff line change
@@ -84,7 +84,7 @@ static int kvm_handle_wfx(struct kvm_vcpu *vcpu, struct kvm_run *run)
if (kvm_vcpu_get_hsr(vcpu) & ESR_ELx_WFx_ISS_WFE) {
trace_kvm_wfx_arm64(*vcpu_pc(vcpu), true);
vcpu->stat.wfe_exit_stat++;
kvm_vcpu_on_spin(vcpu, false);
kvm_vcpu_on_spin(vcpu, vcpu_mode_priv(vcpu));
} else {
trace_kvm_wfx_arm64(*vcpu_pc(vcpu), false);
vcpu->stat.wfi_exit_stat++;
2 changes: 1 addition & 1 deletion virt/kvm/arm/arm.c
Original file line number Diff line number Diff line change
@@ -418,7 +418,7 @@ int kvm_arch_vcpu_runnable(struct kvm_vcpu *v)

bool kvm_arch_vcpu_in_kernel(struct kvm_vcpu *vcpu)
{
return false;
return vcpu_mode_priv(vcpu);
}

/* Just ensure a guest exit from a particular CPU */

0 comments on commit f01fbd2

Please sign in to comment.