Re: [PATCH 16/35] KVM: s390: protvirt: Add SCLP interrupt handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 11.02.20 13:00, Thomas Huth wrote:
[...]
>> +
>> +static int write_sclp(struct kvm_vcpu *vcpu, u32 parm)
>> +{
>> +	int rc;
>> +
>> +	if (kvm_s390_pv_handle_cpu(vcpu)) {
>> +		vcpu->arch.sie_block->iictl = IICTL_CODE_EXT;
>> +		vcpu->arch.sie_block->eic = EXT_IRQ_SERVICE_SIG;
>> +		vcpu->arch.sie_block->eiparams = parm;
>> +		return 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, parm,
>> +			   (u32 *)__LC_EXT_PARAMS);
>> +	return rc;
> 
> I think it would be nicer to move the "return rc ? -EFAULT : 0;" here
> instead of using it in the __deliver_service* functions...

ack. That would also allow to get rid of rc in the deliver functions.




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux