mirror of
https://github.com/torvalds/linux.git
synced 2026-05-31 10:33:41 +02:00
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: 48a3e950f4 ("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>
This commit is contained in:
parent
2623c96f11
commit
1653545abc
|
|
@ -714,12 +714,13 @@ int kvm_s390_handle_lpsw(struct kvm_vcpu *vcpu)
|
|||
{
|
||||
psw_t *gpsw = &vcpu->arch.sie_block->gpsw;
|
||||
psw32_t new_psw;
|
||||
u64 addr;
|
||||
u64 addr, iaddr;
|
||||
int rc;
|
||||
u8 ar;
|
||||
|
||||
vcpu->stat.instruction_lpsw++;
|
||||
|
||||
iaddr = gpsw->addr - kvm_s390_get_ilen(vcpu);
|
||||
if (gpsw->mask & PSW_MASK_PSTATE)
|
||||
return kvm_s390_inject_program_int(vcpu, PGM_PRIVILEGED_OP);
|
||||
|
||||
|
|
@ -737,18 +738,20 @@ int kvm_s390_handle_lpsw(struct kvm_vcpu *vcpu)
|
|||
gpsw->addr = new_psw.addr & ~PSW32_ADDR_AMODE;
|
||||
if (!is_valid_psw(gpsw))
|
||||
return kvm_s390_inject_program_int(vcpu, PGM_SPECIFICATION);
|
||||
vcpu->arch.sie_block->gbea = iaddr;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int handle_lpswe(struct kvm_vcpu *vcpu)
|
||||
{
|
||||
psw_t new_psw;
|
||||
u64 addr;
|
||||
u64 addr, iaddr;
|
||||
int rc;
|
||||
u8 ar;
|
||||
|
||||
vcpu->stat.instruction_lpswe++;
|
||||
|
||||
iaddr = vcpu->arch.sie_block->gpsw.addr - kvm_s390_get_ilen(vcpu);
|
||||
if (vcpu->arch.sie_block->gpsw.mask & PSW_MASK_PSTATE)
|
||||
return kvm_s390_inject_program_int(vcpu, PGM_PRIVILEGED_OP);
|
||||
|
||||
|
|
@ -761,6 +764,7 @@ static int handle_lpswe(struct kvm_vcpu *vcpu)
|
|||
vcpu->arch.sie_block->gpsw = new_psw;
|
||||
if (!is_valid_psw(&vcpu->arch.sie_block->gpsw))
|
||||
return kvm_s390_inject_program_int(vcpu, PGM_SPECIFICATION);
|
||||
vcpu->arch.sie_block->gbea = iaddr;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user