Merge branch 'kvm-ppc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc into kvm-master
This commit is contained in:
Коммит
5b6a7175bf
|
@ -829,12 +829,15 @@ int kvmppc_h_logical_ci_load(struct kvm_vcpu *vcpu)
|
|||
unsigned long size = kvmppc_get_gpr(vcpu, 4);
|
||||
unsigned long addr = kvmppc_get_gpr(vcpu, 5);
|
||||
u64 buf;
|
||||
int srcu_idx;
|
||||
int ret;
|
||||
|
||||
if (!is_power_of_2(size) || (size > sizeof(buf)))
|
||||
return H_TOO_HARD;
|
||||
|
||||
srcu_idx = srcu_read_lock(&vcpu->kvm->srcu);
|
||||
ret = kvm_io_bus_read(vcpu, KVM_MMIO_BUS, addr, size, &buf);
|
||||
srcu_read_unlock(&vcpu->kvm->srcu, srcu_idx);
|
||||
if (ret != 0)
|
||||
return H_TOO_HARD;
|
||||
|
||||
|
@ -869,6 +872,7 @@ int kvmppc_h_logical_ci_store(struct kvm_vcpu *vcpu)
|
|||
unsigned long addr = kvmppc_get_gpr(vcpu, 5);
|
||||
unsigned long val = kvmppc_get_gpr(vcpu, 6);
|
||||
u64 buf;
|
||||
int srcu_idx;
|
||||
int ret;
|
||||
|
||||
switch (size) {
|
||||
|
@ -892,7 +896,9 @@ int kvmppc_h_logical_ci_store(struct kvm_vcpu *vcpu)
|
|||
return H_TOO_HARD;
|
||||
}
|
||||
|
||||
srcu_idx = srcu_read_lock(&vcpu->kvm->srcu);
|
||||
ret = kvm_io_bus_write(vcpu, KVM_MMIO_BUS, addr, size, &buf);
|
||||
srcu_read_unlock(&vcpu->kvm->srcu, srcu_idx);
|
||||
if (ret != 0)
|
||||
return H_TOO_HARD;
|
||||
|
||||
|
|
|
@ -2692,9 +2692,13 @@ static int kvmppc_run_vcpu(struct kvm_run *kvm_run, struct kvm_vcpu *vcpu)
|
|||
|
||||
while (vcpu->arch.state == KVMPPC_VCPU_RUNNABLE &&
|
||||
(vc->vcore_state == VCORE_RUNNING ||
|
||||
vc->vcore_state == VCORE_EXITING))
|
||||
vc->vcore_state == VCORE_EXITING ||
|
||||
vc->vcore_state == VCORE_PIGGYBACK))
|
||||
kvmppc_wait_for_exec(vc, vcpu, TASK_UNINTERRUPTIBLE);
|
||||
|
||||
if (vc->vcore_state == VCORE_PREEMPT && vc->runner == NULL)
|
||||
kvmppc_vcore_end_preempt(vc);
|
||||
|
||||
if (vcpu->arch.state == KVMPPC_VCPU_RUNNABLE) {
|
||||
kvmppc_remove_runnable(vc, vcpu);
|
||||
vcpu->stat.signal_exits++;
|
||||
|
|
|
@ -1257,6 +1257,7 @@ mc_cont:
|
|||
bl kvmhv_accumulate_time
|
||||
#endif
|
||||
|
||||
mr r3, r12
|
||||
/* Increment exit count, poke other threads to exit */
|
||||
bl kvmhv_commence_exit
|
||||
nop
|
||||
|
|
Загрузка…
Ссылка в новой задаче