s390x/pv: Retry ioctls on -EINTR
PATCH v2 1/1 s390x/pv: Retry ioctls on -EINTR
PV_ENABLE (and maybe others) might return -EINTR when a signal is pending. See the Linux kernel patch "s390/gmap: return proper error code on ksm unsharing" for details. Let us retry the ioctl in that case.
Fixes 4d226deafc44 ("s390x: protvirt: Support unpack facility")
Reported-by Marc Hartmayer <[email protected]>
Acked-by Janosch Frank <[email protected]>
Tested-by Marc Hartmayer <[email protected]>
Signed-off-by Christian Borntraeger <[email protected]>
--- hw/s390x/pv.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
hw/s390x/pv.c +5 -1
@@ -23,7 +23,11 @@ static int __s390_pv_cmd(uint32_t cmd, const char *cmdname, void *data) .cmd = cmd, .data = (uint64_t)data, }; -int rc =kvm_vm_ioctl (kvm_state,KVM_S390_PV_COMMAND , &pv_cmd); +int rc; + +do { + rc =kvm_vm_ioctl (kvm_state,KVM_S390_PV_COMMAND , &pv_cmd); + }while (rc == -EINTR );if (rc) { error_report("KVM PV command %d (%s) failed: header rc %x rrc %x "
Signature · 1 line
2.25.1
Quoted 5 lines · On Fri, 27 Mar 2020 08:46:16 -0400 Christian Borntraeger…
PV_ENABLE(and maybe others) might return-EINTRwhen a signal is pending. See the Linux kernel patch "s390/gmap: return proper error code on ksm unsharing" for details. Let us retry the ioctl in that case.Fixes 4d226deafc44 ("s390x: protvirt: Support unpack facility")
I'll update that when the commit ids are stable.
Quoted 7 lines
Reported-by Marc Hartmayer <[email protected]>Acked-by Janosch Frank <[email protected]>Tested-by Marc Hartmayer <[email protected]>Signed-off-by Christian Borntraeger <[email protected]>--- hw/s390x/pv.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
Thanks, queued to s390-next.