All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cornelia Huck <cohuck@redhat.com>
To: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: qemu-devel <qemu-devel@nongnu.org>,
	Alexander Graf <agraf@suse.de>, Thomas Huth <thuth@redhat.com>,
	David Hildenbrand <david@redhat.com>,
	Richard Henderson <rth@twiddle.net>,
	"Collin L. Walling" <walling@linux.vnet.ibm.com>
Subject: Re: [Qemu-devel] [PATCH 2/2] s390/kvm: Support for get/set of extended TOD-Clock for guest
Date: Mon, 25 Sep 2017 15:08:05 +0200	[thread overview]
Message-ID: <20170925150805.3143397d.cohuck@redhat.com> (raw)
In-Reply-To: <20170925102302.60587-3-borntraeger@de.ibm.com>

On Mon, 25 Sep 2017 12:23:02 +0200
Christian Borntraeger <borntraeger@de.ibm.com> wrote:

> From: "Collin L. Walling" <walling@linux.vnet.ibm.com>
> 
> Provides an interface for getting and setting the guest's extended
> TOD-Clock via a single ioctl to kvm. If the ioctl fails because it
> is not support by kvm, then we fall back to the old style of
> retrieving the clock via two ioctls.
> 
> If kvm fails to set a nonzero epoch index, then we ultimately fail
> the migration altogether and the guest will resume normally on the
> original host machine.

I'd prefer to have that part split off, as it is a change in behaviour
and I don't think we should mix it with adding support for an improved
interface.

> 
> Signed-off-by: Collin L. Walling <walling@linux.vnet.ibm.com>
> Reviewed-by: Eric Farman <farman@linux.vnet.ibm.com>
> Reviewed-by: Claudio Imbrenda <imbrenda@linux.vnet.ibm.com>
> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
> ---
>  hw/s390x/s390-virtio-ccw.c |  8 +++-----
>  target/s390x/cpu.c         | 26 +++++++++++++++++++-------
>  target/s390x/kvm-stub.c    | 10 ++++++++++
>  target/s390x/kvm.c         | 35 +++++++++++++++++++++++++++++++++++
>  target/s390x/kvm_s390x.h   |  2 ++
>  5 files changed, 69 insertions(+), 12 deletions(-)
> 
> diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
> index fafbc6d..bad09f5 100644
> --- a/hw/s390x/s390-virtio-ccw.c
> +++ b/hw/s390x/s390-virtio-ccw.c
> @@ -213,13 +213,11 @@ static int gtod_load(QEMUFile *f, void *opaque, int version_id)
>  
>      r = s390_set_clock(&tod_high, &tod_low);
>      if (r) {
> -        warn_report("Unable to set guest clock for migration: %s",
> -                    strerror(-r));
> -        error_printf("Guest clock will not be restored "
> -                     "which could cause the guest to hang.");
> +        error_report("Unable to set guest clock value. "
> +                     "s390_get_clock returned error %d.\n", r);

Please keep to a single phrase in error_report(). Also, I find
strerror() often more useful.

>      }
>  
> -    return 0;
> +    return r;
>  }
>  
>  static SaveVMHandlers savevm_gtod = {

Otherwise looks good.

  reply	other threads:[~2017-09-25 13:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-25 10:23 [Qemu-devel] [PATCH 0/2] s390/z14: extended TOD-clock support Christian Borntraeger
2017-09-25 10:23 ` [Qemu-devel] [PATCH 1/2] linux-headers: Update linux headers for extended TOD-Clock Christian Borntraeger
2017-09-25 10:23 ` [Qemu-devel] [PATCH 2/2] s390/kvm: Support for get/set of extended TOD-Clock for guest Christian Borntraeger
2017-09-25 13:08   ` Cornelia Huck [this message]
2017-09-26 13:52   ` David Hildenbrand
2017-09-25 10:49 ` [Qemu-devel] [PATCH 0/2] s390/z14: extended TOD-clock support no-reply

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=20170925150805.3143397d.cohuck@redhat.com \
    --to=cohuck@redhat.com \
    --cc=agraf@suse.de \
    --cc=borntraeger@de.ibm.com \
    --cc=david@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    --cc=thuth@redhat.com \
    --cc=walling@linux.vnet.ibm.com \
    /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 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.