From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44344) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fPo75-0000xf-AC for qemu-devel@nongnu.org; Mon, 04 Jun 2018 07:57:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fPo71-0006l4-Dq for qemu-devel@nongnu.org; Mon, 04 Jun 2018 07:57:27 -0400 Date: Mon, 4 Jun 2018 13:57:18 +0200 From: Cornelia Huck Message-ID: <20180604135718.559ac812.cohuck@redhat.com> In-Reply-To: <20180525113708.29856-4-david@redhat.com> References: <20180525113708.29856-1-david@redhat.com> <20180525113708.29856-4-david@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v1 3/7] s390x/tcg: properly implement the TOD List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: David Hildenbrand Cc: qemu-s390x@nongnu.org, qemu-devel@nongnu.org, Richard Henderson , Alexander Graf , Christian Borntraeger , Thomas Huth , "Jason J . Herne" , "Collin L . Walling" On Fri, 25 May 2018 13:37:04 +0200 David Hildenbrand wrote: > Right now, each CPU has its own TOD. Especially, the TOD will differ > based on creation time of a CPU - e.g. when hotplugging a CPU the times > will differ quite a lot, resulting in stall warnings in the guest. > > Let's use a single TOD by implementing our new TOD device. Prepare it > for TOD-clock epoch extension. > > Most importantly, whenever we set the TOD, we have to update the CKC > timer. > > Signed-off-by: David Hildenbrand > --- > hw/s390x/tod-qemu.c | 45 ++++++++++++++++++++++++++++++++++---- > hw/s390x/tod.c | 11 ++++++++++ > include/hw/s390x/tod.h | 19 ++++++++++++++++ > target/s390x/cpu.c | 8 +------ > target/s390x/cpu.h | 6 ++++- > target/s390x/internal.h | 15 ------------- > target/s390x/misc_helper.c | 32 ++++++++++++++++++++++----- > 7 files changed, 103 insertions(+), 33 deletions(-) > diff --git a/include/hw/s390x/tod.h b/include/hw/s390x/tod.h > index 43ed71600f..5491245b86 100644 > --- a/include/hw/s390x/tod.h > +++ b/include/hw/s390x/tod.h > @@ -30,6 +30,9 @@ typedef struct S390TOD { > typedef struct S390TODState { > /* private */ > DeviceState parent_obj; > + > + /* unused by KVM implementation */ > + S390TOD base; Does this need some kind of migration handling? > } S390TODState; > > typedef struct S390TODClass {