From: Janosch Frank <frankja@linux.ibm.com>
To: Christian Borntraeger <borntraeger@de.ibm.com>,
qemu-devel <qemu-devel@nongnu.org>,
Cornelia Huck <cohuck@redhat.com>
Cc: Halil Pasic <pasic@linux.ibm.com>,
qemu-s390x <qemu-s390x@nongnu.org>,
Richard Henderson <rth@twiddle.net>,
Marc Hartmayer <mhartmay@linux.ibm.com>,
David Hildenbrand <david@redhat.com>
Subject: Re: [PATCH] s390x/pv: Retry ioctls on -EINTR
Date: Fri, 27 Mar 2020 10:49:36 +0100 [thread overview]
Message-ID: <97085a84-9e61-8b3d-41fd-a2db438ff710@linux.ibm.com> (raw)
In-Reply-To: <20200327094339.26111-1-borntraeger@de.ibm.com>
[-- Attachment #1.1: Type: text/plain, Size: 1215 bytes --]
On 3/27/20 10:43 AM, Christian Borntraeger wrote:
> PV_ENABLE (and maybe others) might return -EINTR when a signal is
> pending. Let us retry the ioctl in that case.
>
> Fixes: 4d226deafc44 ("s390x: protvirt: Support unpack facility")
> Reported-by: Marc Hartmayer <mhartmay@linux.ibm.com>
> Tested-by: Marc Hartmayer <mhartmay@linux.ibm.com>
> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Acked-by: Janosch Frank <frankja@linux.vnet.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..2758b02c96 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);
Double whitespace after rc.
> + } while (rc == -EINTR);
>
> if (rc) {
> error_report("KVM PV command %d (%s) failed: header rc %x rrc %x "
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2020-03-27 9:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-27 9:43 [PATCH] s390x/pv: Retry ioctls on -EINTR Christian Borntraeger
2020-03-27 9:49 ` David Hildenbrand
2020-03-27 9:54 ` Christian Borntraeger
2020-03-27 9:56 ` David Hildenbrand
2020-03-27 9:58 ` Christian Borntraeger
2020-03-27 10:01 ` David Hildenbrand
2020-03-27 9:49 ` Janosch Frank [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=97085a84-9e61-8b3d-41fd-a2db438ff710@linux.ibm.com \
--to=frankja@linux.ibm.com \
--cc=borntraeger@de.ibm.com \
--cc=cohuck@redhat.com \
--cc=david@redhat.com \
--cc=mhartmay@linux.ibm.com \
--cc=pasic@linux.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=rth@twiddle.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).