From: Cornelia Huck <cohuck@redhat.com>
To: David Hildenbrand <david@redhat.com>
Cc: Thomas Huth <thuth@redhat.com>,
qemu-s390x@nongnu.org, Alexander Graf <agraf@suse.de>,
qemu-devel@nongnu.org,
Christian Borntraeger <borntraeger@de.ibm.com>,
Richard Henderson <rth@twiddle.net>
Subject: Re: [Qemu-devel] [qemu-s390x] [PATCH v3 5/9] s390x/tcg: properly implement the TOD
Date: Tue, 26 Jun 2018 14:29:46 +0200 [thread overview]
Message-ID: <20180626142946.40d212be.cohuck@redhat.com> (raw)
In-Reply-To: <437da9a4-6f38-b51e-a26a-b183609ba081@redhat.com>
On Tue, 26 Jun 2018 14:28:18 +0200
David Hildenbrand <david@redhat.com> wrote:
> On 26.06.2018 14:27, Cornelia Huck wrote:
> > On Tue, 26 Jun 2018 14:06:00 +0200
> > David Hildenbrand <david@redhat.com> wrote:
> >>>> /* Set Clock Comparator */
> >>>> void HELPER(sckc)(CPUS390XState *env, uint64_t time)
> >>>> {
> >>>> + S390TODState *td = s390_get_todstate();
> >>>> + S390TODClass *tdc = S390_TOD_GET_CLASS(td);
> >>>> + S390TOD tod_base;
> >>>> +
> >>>> if (time == -1ULL) {
> >>>> return;
> >>>> }
> >>>>
> >>>> env->ckc = time;
> >>>>
> >>>> + tdc->get(td, &tod_base, &error_abort);
> >>>> + tod_base.low -= time2tod(qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL));
> >>>
> >>> So the tdc->get first adds the time2tod, and then you subtract it here
> >>> again? Can't you simply use td->base.low directly instead?
> >>
> >> That might be a good idea, previously I had tdc->get_base(), but dropped
> >> it because it cannot be implemented for KVM.
> >>
> >> Simply accessing the member here should be fine. Thanks!
> >
> > So, we're guaranteed to have td->base.low at the correct value? (Sorry,
> > having a bit of a hard time following around here.)
> >
>
> Yes, just verified, changed and tested. We will have the value at that
> place.
>
> I'll give some more time to review the other parts, then I can resend.
Ok, thx.
next prev parent reply other threads:[~2018-06-26 12:29 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-25 11:53 [Qemu-devel] [PATCH v3 0/9] s390x: TOD refactoring + TCG CPU hotplug support David Hildenbrand
2018-06-25 11:53 ` [Qemu-devel] [PATCH v3 1/9] s390x/tcg: avoid overflows in time2tod/tod2time David Hildenbrand
2018-06-26 10:04 ` Thomas Huth
2018-06-25 11:53 ` [Qemu-devel] [PATCH v3 2/9] s390x/kvm: pass values instead of pointers to kvm_s390_set_clock_*() David Hildenbrand
2018-06-25 15:50 ` Cornelia Huck
2018-06-25 15:54 ` David Hildenbrand
2018-06-25 16:03 ` Cornelia Huck
2018-06-26 9:54 ` [Qemu-devel] [qemu-s390x] " David Hildenbrand
2018-06-26 9:57 ` Cornelia Huck
2018-06-25 11:53 ` [Qemu-devel] [PATCH v3 3/9] s390x/tod: factor out TOD into separate device David Hildenbrand
2018-06-25 11:53 ` [Qemu-devel] [PATCH v3 4/9] s390x/tcg: drop tod_basetime David Hildenbrand
2018-06-25 11:53 ` [Qemu-devel] [PATCH v3 5/9] s390x/tcg: properly implement the TOD David Hildenbrand
2018-06-26 10:34 ` [Qemu-devel] [qemu-s390x] " Thomas Huth
2018-06-26 12:06 ` David Hildenbrand
2018-06-26 12:27 ` Cornelia Huck
2018-06-26 12:28 ` David Hildenbrand
2018-06-26 12:29 ` Cornelia Huck [this message]
2018-06-25 11:53 ` [Qemu-devel] [PATCH v3 6/9] s390x/tcg: SET CLOCK COMPARATOR can clear CKC interrupts David Hildenbrand
2018-06-26 12:30 ` Cornelia Huck
2018-06-27 11:15 ` [Qemu-devel] [qemu-s390x] " Thomas Huth
2018-06-25 11:53 ` [Qemu-devel] [PATCH v3 7/9] s390x/tcg: implement SET CLOCK David Hildenbrand
2018-06-27 11:17 ` [Qemu-devel] [qemu-s390x] " Thomas Huth
2018-06-25 11:53 ` [Qemu-devel] [PATCH v3 8/9] s390x/tcg: rearm the CKC timer during migration David Hildenbrand
2018-06-25 11:53 ` [Qemu-devel] [PATCH v3 9/9] s390x/tcg: fix CPU hotplug with single-threaded TCG David Hildenbrand
2018-06-26 12:33 ` Cornelia Huck
2018-06-27 11:19 ` [Qemu-devel] [qemu-s390x] " Thomas Huth
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=20180626142946.40d212be.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=qemu-s390x@nongnu.org \
--cc=rth@twiddle.net \
--cc=thuth@redhat.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.