aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kvm
diff options
context:
space:
mode:
authorDavid Hildenbrand <dahi@linux.vnet.ibm.com>2014-12-01 06:02:44 -0500
committerChristian Borntraeger <borntraeger@de.ibm.com>2014-12-04 10:38:38 -0500
commit467fc29892b8d563592d17d7128296495b6cf335 (patch)
tree517e68738ed97804177c77659b402ec381005fe3 /arch/s390/kvm
parentbe06b6bece19be5b167d863fd6c5271e4ec8f1fa (diff)
KVM: s390: some ext irqs have to clear the ext cpu addr
The cpu address of a source cpu (responsible for an external irq) is only to be stored if bit 6 of the ext irq code is set. If bit 6 is not set, it is to be zeroed out. The special external irq code used for virtio and pfault uses the cpu addr as a parameter field. As bit 6 is set, this implementation is correct. Reviewed-by: Thomas Huth <thuth@linux.vnet.ibm.com> Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Diffstat (limited to 'arch/s390/kvm')
-rw-r--r--arch/s390/kvm/interrupt.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/s390/kvm/interrupt.c b/arch/s390/kvm/interrupt.c
index b3d4409fcf3f..6c0d14b5fec5 100644
--- a/arch/s390/kvm/interrupt.c
+++ b/arch/s390/kvm/interrupt.c
@@ -281,6 +281,7 @@ static int __must_check __deliver_cpu_timer(struct kvm_vcpu *vcpu)
281 281
282 rc = put_guest_lc(vcpu, EXT_IRQ_CPU_TIMER, 282 rc = put_guest_lc(vcpu, EXT_IRQ_CPU_TIMER,
283 (u16 *)__LC_EXT_INT_CODE); 283 (u16 *)__LC_EXT_INT_CODE);
284 rc |= put_guest_lc(vcpu, 0, (u16 *)__LC_EXT_CPU_ADDR);
284 rc |= write_guest_lc(vcpu, __LC_EXT_OLD_PSW, 285 rc |= write_guest_lc(vcpu, __LC_EXT_OLD_PSW,
285 &vcpu->arch.sie_block->gpsw, sizeof(psw_t)); 286 &vcpu->arch.sie_block->gpsw, sizeof(psw_t));
286 rc |= read_guest_lc(vcpu, __LC_EXT_NEW_PSW, 287 rc |= read_guest_lc(vcpu, __LC_EXT_NEW_PSW,
@@ -299,6 +300,7 @@ static int __must_check __deliver_ckc(struct kvm_vcpu *vcpu)
299 300
300 rc = put_guest_lc(vcpu, EXT_IRQ_CLK_COMP, 301 rc = put_guest_lc(vcpu, EXT_IRQ_CLK_COMP,
301 (u16 __user *)__LC_EXT_INT_CODE); 302 (u16 __user *)__LC_EXT_INT_CODE);
303 rc |= put_guest_lc(vcpu, 0, (u16 *)__LC_EXT_CPU_ADDR);
302 rc |= write_guest_lc(vcpu, __LC_EXT_OLD_PSW, 304 rc |= write_guest_lc(vcpu, __LC_EXT_OLD_PSW,
303 &vcpu->arch.sie_block->gpsw, sizeof(psw_t)); 305 &vcpu->arch.sie_block->gpsw, sizeof(psw_t));
304 rc |= read_guest_lc(vcpu, __LC_EXT_NEW_PSW, 306 rc |= read_guest_lc(vcpu, __LC_EXT_NEW_PSW,
@@ -585,6 +587,7 @@ static int __must_check __deliver_service(struct kvm_vcpu *vcpu,
585 inti->ext.ext_params, 0); 587 inti->ext.ext_params, 0);
586 588
587 rc = put_guest_lc(vcpu, EXT_IRQ_SERVICE_SIG, (u16 *)__LC_EXT_INT_CODE); 589 rc = put_guest_lc(vcpu, EXT_IRQ_SERVICE_SIG, (u16 *)__LC_EXT_INT_CODE);
590 rc |= put_guest_lc(vcpu, 0, (u16 *)__LC_EXT_CPU_ADDR);
588 rc |= write_guest_lc(vcpu, __LC_EXT_OLD_PSW, 591 rc |= write_guest_lc(vcpu, __LC_EXT_OLD_PSW,
589 &vcpu->arch.sie_block->gpsw, sizeof(psw_t)); 592 &vcpu->arch.sie_block->gpsw, sizeof(psw_t));
590 rc |= read_guest_lc(vcpu, __LC_EXT_NEW_PSW, 593 rc |= read_guest_lc(vcpu, __LC_EXT_NEW_PSW,