From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5C60CC433FF for ; Mon, 5 Aug 2019 16:41:12 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2C2DA2064A for ; Mon, 5 Aug 2019 16:41:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="fR8d8wIq"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Jf1TsCUn" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2C2DA2064A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Date:In-reply-to: Message-ID:Subject:To:References:From:Reply-To:Content-ID:Content-Description :Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=WFDMxqgpyQASynKvRUKyAR/5s1Gbr7gFpvmjJ6CrJXs=; b=fR8d8wIqmzDi4A ttsQaLUcQRIMcPsEB6+dHEwZYFAdN6nJ8ZGH7nyVc6TBeFh/r8uwJTaj4WT110GVo6Maa4uUVpgqE g3cHpnp40LRgn+xn2xnjeNsxAGOjJyP1Q3fdvWAWU9sCk8l6kjxG9OGoHP2/BlNN0DsUhTjKZ+GG/ XMzfleKnE3EGvow4ZpGzzrVqUXt5eeN7A96yPbY1PEkoCTVPGy7oWrNeVj9YfQYm/k1yhY7wHp18b b+LR5vXnIxT+hR8XEGXoUhGgCYJ8uLvcq0UC4oXnhkOY3vEIJHk8sTL3BdSmZK5+QQ2wtBQdR2bTA sdMpoFVG25xmZZgW1Jyw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hug2k-0002bw-Pm; Mon, 05 Aug 2019 16:41:06 +0000 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hug2h-0002bE-Qj for linux-arm-kernel@lists.infradead.org; Mon, 05 Aug 2019 16:41:05 +0000 Received: by mail-wr1-x441.google.com with SMTP id n4so85156449wrs.3 for ; Mon, 05 Aug 2019 09:41:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:references:user-agent:to:cc:subject:message-id:in-reply-to :date:mime-version; bh=ABajkI5eExlI/xSitmeiji8gDOSYLzGBroq8lVBwkdg=; b=Jf1TsCUn3vg9vZIttQpRDxQyLLdSkih/m9y3kA3yWVwK1tHBcluvzb64DtQ25oH1/V xc+QogvPb9pckGM5vfsy43/UEaWPZWupWkE5UPXHzZT5A7/7Ma3dw/KrHAyWf+SIQ5pr Dcvq5iH0eSbCNiujtHHwUJZ240xv7Qi/eds7T8oztvpIBx2XrJ5va7rgiLI/SzDbk43Q Z9ORvjpxuJo5BgjdcSStKB849ChK0G8vPO2yzLZGaqzz0g6WR36X48+GBvCQz9Tay6xs czQE6+3WjSb7nz9cH1JuMb4iiT+97q5c2zuu/BUbeRroBVjCzNGInLsmtjQPkR05iWcK 8OZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:references:user-agent:to:cc:subject :message-id:in-reply-to:date:mime-version; bh=ABajkI5eExlI/xSitmeiji8gDOSYLzGBroq8lVBwkdg=; b=jAOhKc5Qf2o4INrIfS3eVd7FF6gMHw1KsL1v1hNmdeIC19vHw987Q95yKP20BKyLHn viu0zGbaMqYklWbfOBbXExHemf5/TVMeNF8ypnXaIUIbly78sVDFiNpKEsvs2KCvI3FJ ryttGDLrhbUskZrQ7ArLyRgi5pIJOJ8GIpAAtobfTNEsiEMMqssCnO3hkoLmU9MLw9EZ Jh2hzsRnXpfSkicxYtPO9C2nFtt2QMmuXlUkbhT3Ey2VDbZJhdN+THEhihq9cFaDSenO 8yG5YEZpy46ycc9UF+QxPcBVXuvrSV9vJcD3quW1UuybNp+GmF6JzsZ0/Sgh61dyqZxj zZeA== X-Gm-Message-State: APjAAAV1K61trwnEgB12Ayd7BZ2EKXZXYf1bxdivCVhHQ7NDI8OMqR+E m87QIPKkoxLnh+JuWn2tnko= X-Google-Smtp-Source: APXvYqz/Y6nmSCAzfJUUyNSVsxAyHbqu5I0RQoLKZMj78OsAAfjqWRVGFPKFfORnGY8ls5vKuqHU6Q== X-Received: by 2002:adf:f050:: with SMTP id t16mr791943wro.99.1565023259727; Mon, 05 Aug 2019 09:40:59 -0700 (PDT) Received: from ptitpuce ([2a01:e35:8b6a:1220:5461:8d4f:b809:4bf8]) by smtp.gmail.com with ESMTPSA id i12sm99839220wrx.61.2019.08.05.09.40.56 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 05 Aug 2019 09:40:59 -0700 (PDT) From: Christophe de Dinechin X-Google-Original-From: Christophe de Dinechin References: <20190802145017.42543-1-steven.price@arm.com> <20190802145017.42543-2-steven.price@arm.com> User-agent: mu4e 1.3.2; emacs 26.2 To: Steven Price Subject: Re: [PATCH 1/9] KVM: arm64: Document PV-time interface Message-ID: In-reply-to: <20190802145017.42543-2-steven.price@arm.com> Date: Mon, 05 Aug 2019 18:40:54 +0200 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190805_094103_872166_BC5AB65F X-CRM114-Status: GOOD ( 12.85 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kvm@vger.kernel.org, Radim =?utf-8?B?S3LEjW3DocWZ?= , Catalin Marinas , Suzuki K Pouloze , linux-doc@vger.kernel.org, Russell King , linux-kernel@vger.kernel.org, James Morse , linux-arm-kernel@lists.infradead.org, Marc Zyngier , Paolo Bonzini , Will Deacon , kvmarm@lists.cs.columbia.edu, Julien Thierry Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Steven Price writes: > Introduce a paravirtualization interface for KVM/arm64 based on the > "Arm Paravirtualized Time for Arm-Base Systems" specification DEN 0057A. > > This only adds the details about "Stolen Time" as the details of "Live > Physical Time" have not been fully agreed. > [...] > + > +Stolen Time > +----------- > + > +The structure pointed to by the PV_TIME_ST hypercall is as follows: > + > + Field | Byte Length | Byte Offset | Description > + ----------- | ----------- | ----------- | -------------------------- > + Revision | 4 | 0 | Must be 0 for version 0.1 > + Attributes | 4 | 4 | Must be 0 > + Stolen time | 8 | 8 | Stolen time in unsigned > + | | | nanoseconds indicating how > + | | | much time this VCPU thread > + | | | was involuntarily not > + | | | running on a physical CPU. I know very little about the topic, but I don't understand how the spec as proposed allows an accurate reading of the relation between physical time and stolen time simultaneously. In other words, could you draw Figure 1 of the spec from within the guest? Or is it a non-objective? For example, if you read the stolen time before you read CNTVCT_EL0, isn't it possible for a lengthy event like a migration to occur between the two reads, causing the stolen time to be obsolete and off by seconds? -- Cheers, Christophe de Dinechin (IRC c3d) _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel