KVM: s390: Fixups for kvm/next (3.19)
Here we have two fixups of the latest interrupt rework and one architectural fixup. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (GNU/Linux) iQIcBAABAgAGBQJUgIO9AAoJEBF7vIC1phx8U5YQALKPvkoyVaGOexDCQQJrz04+ 9W5ZQuvg020jj1EmRPlv9yekhtYBTYA/OVT+FsDG3eq+xCS4Y04vlvUfk2Lq0YAB Bk+cU7plNP8f1Ml/kRTC/yfWcPe8iCVI1WA7zqA2wwEbaEZCz+9+i76wyriDWtJM FJEKXqVmLZH/H+GAw4GQG0YrO4uZ70Sk5F5YVtceGN5mDlqCATXa2xADm4ciAiIW L6w+G3KjIuv/Opds6DFMfJgYQeAF+0MFFWpD2rUfVLwIvdtBTtnxVwQZfpoXH7rF SeNU6n7CILS0csW/ZMcuTE8UrYgW1kkj1iVgc6fT7nkTWWZ5+iGRbAKQG5WPKibn 84f9cn7kJ22ZobayaLskNfe041o1a+zMUCswHdFYTgF29WefeqkikoPx0B80g4p6 O1jZqSZXKiTtlmIqiISikJhDVx0/kC+ftlu4MJLKq7O8RgcaYmAJp7gSGz50sMPB AybcfNkoYsg5J85sinT16TA/Vmcd3ZBWRqaokiRFD/uuqh5cKnyZOTpPwph8Welq QxBtqpG36cBLRJRMzlSJNXg1LKvb8WAxWYxGjiSL/8y/V3intnSFYdLjhNpx3yj8 WCxaG3m2Gf68RQOVSdqlvgH//xBeSz0l9grX+BzJNvBY7aZMmTbXHwIt/lSCiBZd radGCMmVN4YEq4OoTgyr =ZZSq -----END PGP SIGNATURE----- Merge tag 'kvm-s390-next-20141204' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into HEAD KVM: s390: Fixups for kvm/next (3.19) Here we have two fixups of the latest interrupt rework and one architectural fixup.
This commit is contained in:
commit
28145be0a7
|
@ -281,12 +281,13 @@ static int __must_check __deliver_cpu_timer(struct kvm_vcpu *vcpu)
|
|||
|
||||
rc = put_guest_lc(vcpu, EXT_IRQ_CPU_TIMER,
|
||||
(u16 *)__LC_EXT_INT_CODE);
|
||||
rc |= put_guest_lc(vcpu, 0, (u16 *)__LC_EXT_CPU_ADDR);
|
||||
rc |= write_guest_lc(vcpu, __LC_EXT_OLD_PSW,
|
||||
&vcpu->arch.sie_block->gpsw, sizeof(psw_t));
|
||||
rc |= read_guest_lc(vcpu, __LC_EXT_NEW_PSW,
|
||||
&vcpu->arch.sie_block->gpsw, sizeof(psw_t));
|
||||
clear_bit(IRQ_PEND_EXT_CPU_TIMER, &li->pending_irqs);
|
||||
return rc;
|
||||
return rc ? -EFAULT : 0;
|
||||
}
|
||||
|
||||
static int __must_check __deliver_ckc(struct kvm_vcpu *vcpu)
|
||||
|
@ -299,12 +300,13 @@ static int __must_check __deliver_ckc(struct kvm_vcpu *vcpu)
|
|||
|
||||
rc = put_guest_lc(vcpu, EXT_IRQ_CLK_COMP,
|
||||
(u16 __user *)__LC_EXT_INT_CODE);
|
||||
rc |= put_guest_lc(vcpu, 0, (u16 *)__LC_EXT_CPU_ADDR);
|
||||
rc |= write_guest_lc(vcpu, __LC_EXT_OLD_PSW,
|
||||
&vcpu->arch.sie_block->gpsw, sizeof(psw_t));
|
||||
rc |= read_guest_lc(vcpu, __LC_EXT_NEW_PSW,
|
||||
&vcpu->arch.sie_block->gpsw, sizeof(psw_t));
|
||||
clear_bit(IRQ_PEND_EXT_CLOCK_COMP, &li->pending_irqs);
|
||||
return rc;
|
||||
return rc ? -EFAULT : 0;
|
||||
}
|
||||
|
||||
static int __must_check __deliver_pfault_init(struct kvm_vcpu *vcpu)
|
||||
|
@ -332,7 +334,7 @@ static int __must_check __deliver_pfault_init(struct kvm_vcpu *vcpu)
|
|||
rc |= read_guest_lc(vcpu, __LC_EXT_NEW_PSW,
|
||||
&vcpu->arch.sie_block->gpsw, sizeof(psw_t));
|
||||
rc |= put_guest_lc(vcpu, ext.ext_params2, (u64 *) __LC_EXT_PARAMS2);
|
||||
return rc;
|
||||
return rc ? -EFAULT : 0;
|
||||
}
|
||||
|
||||
static int __must_check __deliver_machine_check(struct kvm_vcpu *vcpu)
|
||||
|
@ -369,7 +371,7 @@ static int __must_check __deliver_machine_check(struct kvm_vcpu *vcpu)
|
|||
&vcpu->arch.sie_block->gpsw, sizeof(psw_t));
|
||||
rc |= read_guest_lc(vcpu, __LC_MCK_NEW_PSW,
|
||||
&vcpu->arch.sie_block->gpsw, sizeof(psw_t));
|
||||
return rc;
|
||||
return rc ? -EFAULT : 0;
|
||||
}
|
||||
|
||||
static int __must_check __deliver_restart(struct kvm_vcpu *vcpu)
|
||||
|
@ -387,7 +389,7 @@ static int __must_check __deliver_restart(struct kvm_vcpu *vcpu)
|
|||
rc |= read_guest_lc(vcpu, offsetof(struct _lowcore, restart_psw),
|
||||
&vcpu->arch.sie_block->gpsw, sizeof(psw_t));
|
||||
clear_bit(IRQ_PEND_RESTART, &li->pending_irqs);
|
||||
return rc;
|
||||
return rc ? -EFAULT : 0;
|
||||
}
|
||||
|
||||
static int __must_check __deliver_stop(struct kvm_vcpu *vcpu)
|
||||
|
@ -448,7 +450,7 @@ static int __must_check __deliver_emergency_signal(struct kvm_vcpu *vcpu)
|
|||
&vcpu->arch.sie_block->gpsw, sizeof(psw_t));
|
||||
rc |= read_guest_lc(vcpu, __LC_EXT_NEW_PSW,
|
||||
&vcpu->arch.sie_block->gpsw, sizeof(psw_t));
|
||||
return rc;
|
||||
return rc ? -EFAULT : 0;
|
||||
}
|
||||
|
||||
static int __must_check __deliver_external_call(struct kvm_vcpu *vcpu)
|
||||
|
@ -476,7 +478,7 @@ static int __must_check __deliver_external_call(struct kvm_vcpu *vcpu)
|
|||
&vcpu->arch.sie_block->gpsw, sizeof(psw_t));
|
||||
rc |= read_guest_lc(vcpu, __LC_EXT_NEW_PSW, &vcpu->arch.sie_block->gpsw,
|
||||
sizeof(psw_t));
|
||||
return rc;
|
||||
return rc ? -EFAULT : 0;
|
||||
}
|
||||
|
||||
static int __must_check __deliver_prog(struct kvm_vcpu *vcpu)
|
||||
|
@ -570,7 +572,7 @@ static int __must_check __deliver_prog(struct kvm_vcpu *vcpu)
|
|||
&vcpu->arch.sie_block->gpsw, sizeof(psw_t));
|
||||
rc |= read_guest_lc(vcpu, __LC_PGM_NEW_PSW,
|
||||
&vcpu->arch.sie_block->gpsw, sizeof(psw_t));
|
||||
return rc;
|
||||
return rc ? -EFAULT : 0;
|
||||
}
|
||||
|
||||
static int __must_check __deliver_service(struct kvm_vcpu *vcpu,
|
||||
|
@ -585,13 +587,14 @@ static int __must_check __deliver_service(struct kvm_vcpu *vcpu,
|
|||
inti->ext.ext_params, 0);
|
||||
|
||||
rc = put_guest_lc(vcpu, EXT_IRQ_SERVICE_SIG, (u16 *)__LC_EXT_INT_CODE);
|
||||
rc |= put_guest_lc(vcpu, 0, (u16 *)__LC_EXT_CPU_ADDR);
|
||||
rc |= write_guest_lc(vcpu, __LC_EXT_OLD_PSW,
|
||||
&vcpu->arch.sie_block->gpsw, sizeof(psw_t));
|
||||
rc |= read_guest_lc(vcpu, __LC_EXT_NEW_PSW,
|
||||
&vcpu->arch.sie_block->gpsw, sizeof(psw_t));
|
||||
rc |= put_guest_lc(vcpu, inti->ext.ext_params,
|
||||
(u32 *)__LC_EXT_PARAMS);
|
||||
return rc;
|
||||
return rc ? -EFAULT : 0;
|
||||
}
|
||||
|
||||
static int __must_check __deliver_pfault_done(struct kvm_vcpu *vcpu,
|
||||
|
@ -611,7 +614,7 @@ static int __must_check __deliver_pfault_done(struct kvm_vcpu *vcpu,
|
|||
&vcpu->arch.sie_block->gpsw, sizeof(psw_t));
|
||||
rc |= put_guest_lc(vcpu, inti->ext.ext_params2,
|
||||
(u64 *)__LC_EXT_PARAMS2);
|
||||
return rc;
|
||||
return rc ? -EFAULT : 0;
|
||||
}
|
||||
|
||||
static int __must_check __deliver_virtio(struct kvm_vcpu *vcpu,
|
||||
|
@ -636,7 +639,7 @@ static int __must_check __deliver_virtio(struct kvm_vcpu *vcpu,
|
|||
(u32 *)__LC_EXT_PARAMS);
|
||||
rc |= put_guest_lc(vcpu, inti->ext.ext_params2,
|
||||
(u64 *)__LC_EXT_PARAMS2);
|
||||
return rc;
|
||||
return rc ? -EFAULT : 0;
|
||||
}
|
||||
|
||||
static int __must_check __deliver_io(struct kvm_vcpu *vcpu,
|
||||
|
@ -664,7 +667,7 @@ static int __must_check __deliver_io(struct kvm_vcpu *vcpu,
|
|||
&vcpu->arch.sie_block->gpsw, sizeof(psw_t));
|
||||
rc |= read_guest_lc(vcpu, __LC_IO_NEW_PSW,
|
||||
&vcpu->arch.sie_block->gpsw, sizeof(psw_t));
|
||||
return rc;
|
||||
return rc ? -EFAULT : 0;
|
||||
}
|
||||
|
||||
static int __must_check __deliver_mchk_floating(struct kvm_vcpu *vcpu,
|
||||
|
@ -689,7 +692,7 @@ static int __must_check __deliver_mchk_floating(struct kvm_vcpu *vcpu,
|
|||
&vcpu->arch.sie_block->gpsw, sizeof(psw_t));
|
||||
rc |= read_guest_lc(vcpu, __LC_MCK_NEW_PSW,
|
||||
&vcpu->arch.sie_block->gpsw, sizeof(psw_t));
|
||||
return rc;
|
||||
return rc ? -EFAULT : 0;
|
||||
}
|
||||
|
||||
typedef int (*deliver_irq_t)(struct kvm_vcpu *vcpu);
|
||||
|
@ -926,7 +929,7 @@ static int __inject_prog(struct kvm_vcpu *vcpu, struct kvm_s390_irq *irq)
|
|||
struct kvm_s390_local_interrupt *li = &vcpu->arch.local_int;
|
||||
|
||||
li->irq.pgm = irq->u.pgm;
|
||||
__set_bit(IRQ_PEND_PROG, &li->pending_irqs);
|
||||
set_bit(IRQ_PEND_PROG, &li->pending_irqs);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -992,7 +995,7 @@ int __inject_extcall(struct kvm_vcpu *vcpu, struct kvm_s390_irq *irq)
|
|||
irq->u.extcall.code, 0, 2);
|
||||
|
||||
*extcall = irq->u.extcall;
|
||||
__set_bit(IRQ_PEND_EXT_EXTERNAL, &li->pending_irqs);
|
||||
set_bit(IRQ_PEND_EXT_EXTERNAL, &li->pending_irqs);
|
||||
atomic_set_mask(CPUSTAT_EXT_INT, li->cpuflags);
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue