From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH 1/1] kvm-s390: Provide guest TOD Clock Get/Set Controls Date: Thu, 06 Nov 2014 10:57:19 +0100 Message-ID: <545B45FF.4050900@redhat.com> References: <1414424654-21946-1-git-send-email-jjherne@linux.vnet.ibm.com> <1414424654-21946-2-git-send-email-jjherne@linux.vnet.ibm.com> <5459F6E0.8080400@suse.de> <545A17EF.4090004@de.ibm.com> <545A2209.9010603@redhat.com> <545A54FA.5040802@de.ibm.com> <545A604C.3010202@suse.de> <545A64DB.6000100@de.ibm.com> <545A7E67.5020507@redhat.com> <545B34B7.2070401@de.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit To: kvm@vger.kernel.org Return-path: Received: from plane.gmane.org ([80.91.229.3]:51206 "EHLO plane.gmane.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752278AbaKFJ5e (ORCPT ); Thu, 6 Nov 2014 04:57:34 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1XmJoo-00047v-8A for kvm@vger.kernel.org; Thu, 06 Nov 2014 10:57:30 +0100 Received: from net-37-117-142-149.cust.vodafonedsl.it ([37.117.142.149]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 06 Nov 2014 10:57:30 +0100 Received: from pbonzini by net-37-117-142-149.cust.vodafonedsl.it with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 06 Nov 2014 10:57:30 +0100 In-Reply-To: <545B34B7.2070401@de.ibm.com> Sender: kvm-owner@vger.kernel.org List-ID: On 06/11/2014 09:43, Christian Borntraeger wrote: > Am 05.11.2014 20:45, schrieb Paolo Bonzini: >> >> >> On 05/11/2014 18:56, Christian Borntraeger wrote: >>>>> >>>>> Whether you want to follow that approach or do it as VM attribute >>>>> straight away, I don't mind much :). >>> given that top programmable field and epoch are available as ONEREG, lets do the same for TOD. >> >> Is the epoch per-cpu? > > two answers :-) > > - the implementation is one epoch per control block, so someone could do that per CPU...but: > - guest TOD == host TOD + epochdiff. architecture mandates that there is only one TOD per system, so all guest TODs must be synced and so must be all epochdiffs Got it. Using VM attrs or ONEREG is the same, you choose. > As a recap we have now: > #define KVM_REG_S390_TODPR (KVM_REG_S390 | KVM_REG_SIZE_U32 | 0x1) > #define KVM_REG_S390_EPOCHDIFF (KVM_REG_S390 | KVM_REG_SIZE_U64 | 0x2) > > and we would > add > #define KVM_REG_S390_TOD (KVM_REG_S390 | KVM_REG_SIZE_U64 | 0x3) > #define KVM_REG_S390_TOD_INDEX (KVM_REG_S390 | KVM_REG_SIZE_U8 | 0x4) TOD_HIGH? TOD_EXTRA? TOD_EXTRA_HIGH? Paolo