Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

KVM: s390: Fix lpsw/e breaking event handling

LPSW and LPSWE need to set the gbea on completion but currently don't.
Time to fix this up.

LPSWEY was designed to not set the bear.

Fixes: 48a3e950f4cee ("KVM: s390: Add support for machine checks.")
Reported-by: Christian Borntraeger <borntraeger@linux.ibm.com>
Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Reviewed-by: Christian Borntraeger <borntraeger@linux.ibm.com>
Signed-off-by: Janosch Frank <frankja@linux.ibm.com>

+6 -2
+6 -2
arch/s390/kvm/priv.c
··· 714 714 { 715 715 psw_t *gpsw = &vcpu->arch.sie_block->gpsw; 716 716 psw32_t new_psw; 717 - u64 addr; 717 + u64 addr, iaddr; 718 718 int rc; 719 719 u8 ar; 720 720 721 721 vcpu->stat.instruction_lpsw++; 722 722 723 + iaddr = gpsw->addr - kvm_s390_get_ilen(vcpu); 723 724 if (gpsw->mask & PSW_MASK_PSTATE) 724 725 return kvm_s390_inject_program_int(vcpu, PGM_PRIVILEGED_OP); 725 726 ··· 738 737 gpsw->addr = new_psw.addr & ~PSW32_ADDR_AMODE; 739 738 if (!is_valid_psw(gpsw)) 740 739 return kvm_s390_inject_program_int(vcpu, PGM_SPECIFICATION); 740 + vcpu->arch.sie_block->gbea = iaddr; 741 741 return 0; 742 742 } 743 743 744 744 static int handle_lpswe(struct kvm_vcpu *vcpu) 745 745 { 746 746 psw_t new_psw; 747 - u64 addr; 747 + u64 addr, iaddr; 748 748 int rc; 749 749 u8 ar; 750 750 751 751 vcpu->stat.instruction_lpswe++; 752 752 753 + iaddr = vcpu->arch.sie_block->gpsw.addr - kvm_s390_get_ilen(vcpu); 753 754 if (vcpu->arch.sie_block->gpsw.mask & PSW_MASK_PSTATE) 754 755 return kvm_s390_inject_program_int(vcpu, PGM_PRIVILEGED_OP); 755 756 ··· 764 761 vcpu->arch.sie_block->gpsw = new_psw; 765 762 if (!is_valid_psw(&vcpu->arch.sie_block->gpsw)) 766 763 return kvm_s390_inject_program_int(vcpu, PGM_SPECIFICATION); 764 + vcpu->arch.sie_block->gbea = iaddr; 767 765 return 0; 768 766 } 769 767