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 <mhart...@linux.ibm.com>
> Tested-by: Marc Hartmayer <mhart...@linux.ibm.com>
> Signed-off-by: Christian Borntraeger <borntrae...@de.ibm.com>

Acked-by: Janosch Frank <fran...@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: signature.asc
Description: OpenPGP digital signature

Reply via email to