* [PATCH v2] s390x/pv: Retry ioctls on -EINTR
@ 2020-03-27 12:46 Christian Borntraeger
2020-04-03 15:22 ` Cornelia Huck
0 siblings, 1 reply; 2+ messages in thread
From: Christian Borntraeger @ 2020-03-27 12:46 UTC (permalink / raw)
To: qemu-devel, Cornelia Huck
Cc: Janosch Frank, Janosch Frank, David Hildenbrand, Halil Pasic,
Christian Borntraeger, qemu-s390x, Marc Hartmayer,
Richard Henderson
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 <mhartmay@linux.ibm.com>
Acked-by: Janosch Frank <frankja@linux.vnet.ibm.com>
Tested-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
---
hw/s390x/pv.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/hw/s390x/pv.c b/hw/s390x/pv.c
index 8cf5cd2c9b..d3333d6e13 100644
--- a/hw/s390x/pv.c
+++ b/hw/s390x/pv.c
@@ -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 "
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] s390x/pv: Retry ioctls on -EINTR
2020-03-27 12:46 [PATCH v2] s390x/pv: Retry ioctls on -EINTR Christian Borntraeger
@ 2020-04-03 15:22 ` Cornelia Huck
0 siblings, 0 replies; 2+ messages in thread
From: Cornelia Huck @ 2020-04-03 15:22 UTC (permalink / raw)
To: Christian Borntraeger
Cc: Janosch Frank, Janosch Frank, David Hildenbrand, qemu-devel,
Halil Pasic, qemu-s390x, Marc Hartmayer, Richard Henderson
On Fri, 27 Mar 2020 08:46:16 -0400
Christian Borntraeger <borntraeger@de.ibm.com> wrote:
> 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")
I'll update that when the commit ids are stable.
> Reported-by: Marc Hartmayer <mhartmay@linux.ibm.com>
> Acked-by: Janosch Frank <frankja@linux.vnet.ibm.com>
> Tested-by: Marc Hartmayer <mhartmay@linux.ibm.com>
> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
> ---
> hw/s390x/pv.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
Thanks, queued to s390-next.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-04-03 15:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-27 12:46 [PATCH v2] s390x/pv: Retry ioctls on -EINTR Christian Borntraeger
2020-04-03 15:22 ` Cornelia Huck
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.