Merge tag 'kvm-s390-20140317' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into HEAD
Two patches: - one regression fix for reducing the amount of ucontrol userspace exits - get rid of BUG_ONs in hot inner loops
This commit is contained in:
@ -114,14 +114,12 @@ static int __interrupt_is_deliverable(struct kvm_vcpu *vcpu,
|
|||||||
|
|
||||||
static void __set_cpu_idle(struct kvm_vcpu *vcpu)
|
static void __set_cpu_idle(struct kvm_vcpu *vcpu)
|
||||||
{
|
{
|
||||||
BUG_ON(vcpu->vcpu_id > KVM_MAX_VCPUS - 1);
|
|
||||||
atomic_set_mask(CPUSTAT_WAIT, &vcpu->arch.sie_block->cpuflags);
|
atomic_set_mask(CPUSTAT_WAIT, &vcpu->arch.sie_block->cpuflags);
|
||||||
set_bit(vcpu->vcpu_id, vcpu->arch.local_int.float_int->idle_mask);
|
set_bit(vcpu->vcpu_id, vcpu->arch.local_int.float_int->idle_mask);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void __unset_cpu_idle(struct kvm_vcpu *vcpu)
|
static void __unset_cpu_idle(struct kvm_vcpu *vcpu)
|
||||||
{
|
{
|
||||||
BUG_ON(vcpu->vcpu_id > KVM_MAX_VCPUS - 1);
|
|
||||||
atomic_clear_mask(CPUSTAT_WAIT, &vcpu->arch.sie_block->cpuflags);
|
atomic_clear_mask(CPUSTAT_WAIT, &vcpu->arch.sie_block->cpuflags);
|
||||||
clear_bit(vcpu->vcpu_id, vcpu->arch.local_int.float_int->idle_mask);
|
clear_bit(vcpu->vcpu_id, vcpu->arch.local_int.float_int->idle_mask);
|
||||||
}
|
}
|
||||||
|
@ -896,7 +896,8 @@ static int vcpu_post_run(struct kvm_vcpu *vcpu, int exit_reason)
|
|||||||
|
|
||||||
if (rc == 0) {
|
if (rc == 0) {
|
||||||
if (kvm_is_ucontrol(vcpu->kvm))
|
if (kvm_is_ucontrol(vcpu->kvm))
|
||||||
rc = -EOPNOTSUPP;
|
/* Don't exit for host interrupts. */
|
||||||
|
rc = vcpu->arch.sie_block->icptcode ? -EOPNOTSUPP : 0;
|
||||||
else
|
else
|
||||||
rc = kvm_handle_sie_intercept(vcpu);
|
rc = kvm_handle_sie_intercept(vcpu);
|
||||||
}
|
}
|
||||||
@ -949,8 +950,6 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)
|
|||||||
|
|
||||||
atomic_clear_mask(CPUSTAT_STOPPED, &vcpu->arch.sie_block->cpuflags);
|
atomic_clear_mask(CPUSTAT_STOPPED, &vcpu->arch.sie_block->cpuflags);
|
||||||
|
|
||||||
BUG_ON(kvm_get_vcpu(vcpu->kvm, vcpu->vcpu_id) == NULL);
|
|
||||||
|
|
||||||
switch (kvm_run->exit_reason) {
|
switch (kvm_run->exit_reason) {
|
||||||
case KVM_EXIT_S390_SIEIC:
|
case KVM_EXIT_S390_SIEIC:
|
||||||
case KVM_EXIT_UNKNOWN:
|
case KVM_EXIT_UNKNOWN:
|
||||||
|
Reference in New Issue
Block a user