QEMU-Devel Archive on lore.kernel.org
 help / color / Atom feed
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
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 --]

      parent reply index

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-27  9:43 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

QEMU-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/qemu-devel/0 qemu-devel/git/0.git
	git clone --mirror https://lore.kernel.org/qemu-devel/1 qemu-devel/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 qemu-devel qemu-devel/ https://lore.kernel.org/qemu-devel \
		qemu-devel@nongnu.org
	public-inbox-index qemu-devel

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.nongnu.qemu-devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git