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=-8.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham 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 BBE9EC4320E for ; Thu, 29 Jul 2021 09:30:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9DB7561054 for ; Thu, 29 Jul 2021 09:30:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235587AbhG2Jan (ORCPT ); Thu, 29 Jul 2021 05:30:43 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:48906 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235141AbhG2Jam (ORCPT ); Thu, 29 Jul 2021 05:30:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1627551039; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=J23iSJURRvqOkAxJMklwOxLv8DDTdOwhOo68zLNGqb0=; b=HYpJDx39zXvFxJkye6SNZvN+BMxAJBVE3JzwYACGZQBjNadEOk7tEi7CRKN8Q7vW55/RHF BF6TREy9QEvJXR5eC82azUTKU752MUGY+okAslkvLBRLVBUs9rhsKeqMKZt+0dVrekO/RW 58TJ3cj7suC01RMFdtKXhcw6YXc8xRQ= Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-240-PHmpyreFNfS-eGGu07ySQw-1; Thu, 29 Jul 2021 05:30:38 -0400 X-MC-Unique: PHmpyreFNfS-eGGu07ySQw-1 Received: by mail-ed1-f69.google.com with SMTP id j22-20020a50ed160000b02903ab03a06e86so2647851eds.14 for ; Thu, 29 Jul 2021 02:30:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=J23iSJURRvqOkAxJMklwOxLv8DDTdOwhOo68zLNGqb0=; b=ojNY9Uffp48W9fY4Ce9c7+5IvD6gzk8OmrxEXdLaddAh7poP/rQ7DTk4kCLf9fDNdW vN7rpZGV3kYHpXdwDkTSBdlJDkrc3Y1qvLHRo41IgcfelaDs/uYjWgsgPQ5Ucupflr1O 312xqY902t5owUaj3mard5tl2CyxmR3vlc/GMRN6GwNu7JGBlWw2nd8/7XttBRgdplXr 9mCNMrdoTtPjz7ldPuiSSAII24MCLvjKV0dUJVC+oTnqmWaeNonASzzrQhOWcm6+IcIh mcf/j3t4x+SmMQ99DWIj1itHirPnT7yEfkLZ24FvAZWzKJnk3uoHkjgX3ArnMWVq7BuX mxOw== X-Gm-Message-State: AOAM530mrG14LnCrQN/j60vBCcGv9DGkQ9HvVKRHJOAhmEAuUvDSjO9G nxA2k0mzsKrbygPMAnkoUQQbBhfeEx7cGSBlgygOV3UTI73yCdxpvXDl2HXGaNmhUG6K+11T+6c cXoWjTm72aw8A X-Received: by 2002:a17:907:9d4:: with SMTP id bx20mr3676518ejc.123.1627551036980; Thu, 29 Jul 2021 02:30:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx3wIR5FM8ntRVfpyHiOWHksHokdn3YpbAIvZT7i5L+rZrnbhYwfbL3DgrDPF/a7EY6Be57TQ== X-Received: by 2002:a17:907:9d4:: with SMTP id bx20mr3676502ejc.123.1627551036834; Thu, 29 Jul 2021 02:30:36 -0700 (PDT) Received: from ?IPv6:2001:b07:6468:f312:5e2c:eb9a:a8b6:fd3e? ([2001:b07:6468:f312:5e2c:eb9a:a8b6:fd3e]) by smtp.gmail.com with ESMTPSA id v13sm768791ejh.62.2021.07.29.02.30.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 29 Jul 2021 02:30:36 -0700 (PDT) Subject: Re: [PATCH v4 03/13] KVM: x86: Expose TSC offset controls to userspace To: Oliver Upton , kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu Cc: Sean Christopherson , Marc Zyngier , Peter Shier , Jim Mattson , David Matlack , Ricardo Koller , Jing Zhang , Raghavendra Rao Anata , James Morse , Alexandru Elisei , Suzuki K Poulose , linux-arm-kernel@lists.infradead.org, Andrew Jones , Oliver Upton References: <20210729001012.70394-1-oupton@google.com> <20210729001012.70394-4-oupton@google.com> From: Paolo Bonzini Message-ID: <7cb58a33-316c-58b5-b542-671a43dea89c@redhat.com> Date: Thu, 29 Jul 2021 11:30:25 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210729001012.70394-4-oupton@google.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On 29/07/21 02:10, Oliver Upton wrote: > +6. Adjust the guest TSC offsets for every vCPU to account for (1) time > + elapsed since recording state and (2) difference in TSCs between the > + source and destination machine: > + > + new_off_n = t_0 + off_n = (k_1 - k_0) * freq - t_1 The second = should be a +. Otherwise the algorithm seems correct. > + 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=-5.2 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 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 89E0CC43214 for ; Thu, 29 Jul 2021 09:30:43 +0000 (UTC) Received: from mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by mail.kernel.org (Postfix) with ESMTP id CFA2061057 for ; Thu, 29 Jul 2021 09:30:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org CFA2061057 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.cs.columbia.edu Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 423944A4A0; Thu, 29 Jul 2021 05:30:42 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Authentication-Results: mm01.cs.columbia.edu (amavisd-new); dkim=softfail (fail, message has been altered) header.i=@redhat.com Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Wpv16kj3rt+Q; Thu, 29 Jul 2021 05:30:41 -0400 (EDT) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 573CA4A500; Thu, 29 Jul 2021 05:30:41 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id A95B74A1B0 for ; Thu, 29 Jul 2021 05:30:40 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 786geKdAPcGC for ; Thu, 29 Jul 2021 05:30:39 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mm01.cs.columbia.edu (Postfix) with ESMTP id D100740895 for ; Thu, 29 Jul 2021 05:30:39 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1627551039; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=J23iSJURRvqOkAxJMklwOxLv8DDTdOwhOo68zLNGqb0=; b=HYpJDx39zXvFxJkye6SNZvN+BMxAJBVE3JzwYACGZQBjNadEOk7tEi7CRKN8Q7vW55/RHF BF6TREy9QEvJXR5eC82azUTKU752MUGY+okAslkvLBRLVBUs9rhsKeqMKZt+0dVrekO/RW 58TJ3cj7suC01RMFdtKXhcw6YXc8xRQ= Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-207-pmCA2ygLPJSlhBoltY1J7A-1; Thu, 29 Jul 2021 05:30:38 -0400 X-MC-Unique: pmCA2ygLPJSlhBoltY1J7A-1 Received: by mail-ed1-f70.google.com with SMTP id y19-20020a0564021713b02903bbfec89ebcso2634711edu.16 for ; Thu, 29 Jul 2021 02:30:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=J23iSJURRvqOkAxJMklwOxLv8DDTdOwhOo68zLNGqb0=; b=Q2HayQ4e9nw0odIrJhGllSbNP+6T05ocUbgdJtiRKWmu1DFK2Tm+ranBWTUjzXjrY4 A+Gy1kqzMQSBfrzeXphBUO4aop1fvucSuitNjXMVo6NLlJrIZnb5gsmq3WjvhytR8l8D zbN0t7+n0tnRbUFZoq6168RlA4udrtDvw85MKw1HMT+pP3WAIy9nycU5fv7Ih3lM6Nbo 2dxSqH3KX49MFPnCAHi3R7uN+ZfXmlZIJ32q3gR0Qxm6+XbO/XUQTqVpdP3UNvNEgf1e nK9KkMU5gUwXKBF8we9CplwgZkp+eM3YpzHBSVVxML/DFZJMRXMfh2k6nLjMuHBJoLK7 R1BQ== X-Gm-Message-State: AOAM530zmnA5cJaao/n7yphtyqv1LyjuqYBzZ8lciyDu1j2P2LmLC5xV yCRDEgxYVzgIMRXPuN5r3F7BHHonsCz0A+zwilQFgYzK72nOPWjCntl01c0rFEF2ZExzLxz8V0Y P2QyR8LftaNN7A7dL8t4IiTNT X-Received: by 2002:a17:907:9d4:: with SMTP id bx20mr3676527ejc.123.1627551036997; Thu, 29 Jul 2021 02:30:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx3wIR5FM8ntRVfpyHiOWHksHokdn3YpbAIvZT7i5L+rZrnbhYwfbL3DgrDPF/a7EY6Be57TQ== X-Received: by 2002:a17:907:9d4:: with SMTP id bx20mr3676502ejc.123.1627551036834; Thu, 29 Jul 2021 02:30:36 -0700 (PDT) Received: from ?IPv6:2001:b07:6468:f312:5e2c:eb9a:a8b6:fd3e? ([2001:b07:6468:f312:5e2c:eb9a:a8b6:fd3e]) by smtp.gmail.com with ESMTPSA id v13sm768791ejh.62.2021.07.29.02.30.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 29 Jul 2021 02:30:36 -0700 (PDT) Subject: Re: [PATCH v4 03/13] KVM: x86: Expose TSC offset controls to userspace To: Oliver Upton , kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu References: <20210729001012.70394-1-oupton@google.com> <20210729001012.70394-4-oupton@google.com> From: Paolo Bonzini Message-ID: <7cb58a33-316c-58b5-b542-671a43dea89c@redhat.com> Date: Thu, 29 Jul 2021 11:30:25 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210729001012.70394-4-oupton@google.com> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Cc: Sean Christopherson , Raghavendra Rao Anata , Peter Shier , Marc Zyngier , David Matlack , Oliver Upton , linux-arm-kernel@lists.infradead.org, Jim Mattson X-BeenThere: kvmarm@lists.cs.columbia.edu X-Mailman-Version: 2.1.14 Precedence: list List-Id: Where KVM/ARM decisions are made List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu On 29/07/21 02:10, Oliver Upton wrote: > +6. Adjust the guest TSC offsets for every vCPU to account for (1) time > + elapsed since recording state and (2) difference in TSCs between the > + source and destination machine: > + > + new_off_n = t_0 + off_n = (k_1 - k_0) * freq - t_1 The second = should be a +. Otherwise the algorithm seems correct. > + _______________________________________________ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm 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=-6.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 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 1221CC4338F for ; Thu, 29 Jul 2021 09:32:57 +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 CE57A61057 for ; Thu, 29 Jul 2021 09:32:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org CE57A61057 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:Cc:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=+2ZR2pbhjEpm1Qe9dNSDYVT3Tp7gnQNZLzwuh3ZE5Xw=; b=ZBX/8Q7cjS02iO5QyGPxIKVOe9 JLEKcZjkZ/VWAxwwKoVzLR3cDWBA+OZbBv2UA1IDuR9V+aefsohx9Zkd4qsm2Wn0bpthqHiDjF9/5 9Z4mbHUWfSAqyjfcPH1iQ0aoBCWvnWZ2Pc4hZspH5GTgj2VRWsleY0dp24qGDuXzDdKkSVvzuI4/D Tw6a0GkjLkc6Sfhzs9WYQk3MHs7uwGVkCxebEdoZw4lkhETZsdTRIUgxJUDS4+W672puVDomeaBgo n12L+9mq6J41mf1iLZXFeWT4ctwEVOE6iOnDihFSnzTQk5cSwqymRyVoDdaawl7LS0VDWVp1HLyFX AlLJ6maA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m92NJ-003eEk-Go; Thu, 29 Jul 2021 09:30:45 +0000 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m92NF-003eE2-MM for linux-arm-kernel@lists.infradead.org; Thu, 29 Jul 2021 09:30:42 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1627551039; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=J23iSJURRvqOkAxJMklwOxLv8DDTdOwhOo68zLNGqb0=; b=HYpJDx39zXvFxJkye6SNZvN+BMxAJBVE3JzwYACGZQBjNadEOk7tEi7CRKN8Q7vW55/RHF BF6TREy9QEvJXR5eC82azUTKU752MUGY+okAslkvLBRLVBUs9rhsKeqMKZt+0dVrekO/RW 58TJ3cj7suC01RMFdtKXhcw6YXc8xRQ= Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-267-rUcLS01qPe6i4tEZojZ4zA-1; Thu, 29 Jul 2021 05:30:38 -0400 X-MC-Unique: rUcLS01qPe6i4tEZojZ4zA-1 Received: by mail-ed1-f72.google.com with SMTP id ay20-20020a0564022034b02903bc515b673dso2669313edb.3 for ; Thu, 29 Jul 2021 02:30:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=J23iSJURRvqOkAxJMklwOxLv8DDTdOwhOo68zLNGqb0=; b=fEcpt1e4ZAlNoV0Vto7MXDXNIOud62SasV260tJU8Xwc1VRBLIDJV/Mxt0j8siFdy2 qEb2K0G0j86S72CU3+HcGZxtZVbiKVtF1QATCAeCBrGFy9vzZzadw9ThWNvQvcBW7AxI v+TqUyhWu0PfTd1yyiEgn4B/K1spBICSjho5h125niZaUYgr3yP+FS4BX1EVDURD0Y5t AMolBnfuabZPUL87bLxH5uYGXXXM0zdbNVt3h/nL5Fqf+o00TJLyxiLg3vmn6L5JLZr+ BFByQXj8LchOt1Q+2573njdv7o0nyX1ZV3bkVEzj+Y9mt9eU1WtvjY9Cfhvx/gcLgDmx ZcLg== X-Gm-Message-State: AOAM530Gal2lbV/IouRF3Rrf8UbX5jld8hH9IDRwr94WwvvCyvf8Luxw 1omQ78wD3sgSMca9Fh08OYg6m0zqvXJ1D8zArZFR+o+lNk/NM+zPHrQ5xX1RzY0ceJx97d57bcL UAuAxz2e77Xm7RZhreu1IcdyJVpV+RiIei8g= X-Received: by 2002:a17:907:9d4:: with SMTP id bx20mr3676526ejc.123.1627551036987; Thu, 29 Jul 2021 02:30:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx3wIR5FM8ntRVfpyHiOWHksHokdn3YpbAIvZT7i5L+rZrnbhYwfbL3DgrDPF/a7EY6Be57TQ== X-Received: by 2002:a17:907:9d4:: with SMTP id bx20mr3676502ejc.123.1627551036834; Thu, 29 Jul 2021 02:30:36 -0700 (PDT) Received: from ?IPv6:2001:b07:6468:f312:5e2c:eb9a:a8b6:fd3e? ([2001:b07:6468:f312:5e2c:eb9a:a8b6:fd3e]) by smtp.gmail.com with ESMTPSA id v13sm768791ejh.62.2021.07.29.02.30.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 29 Jul 2021 02:30:36 -0700 (PDT) Subject: Re: [PATCH v4 03/13] KVM: x86: Expose TSC offset controls to userspace To: Oliver Upton , kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu Cc: Sean Christopherson , Marc Zyngier , Peter Shier , Jim Mattson , David Matlack , Ricardo Koller , Jing Zhang , Raghavendra Rao Anata , James Morse , Alexandru Elisei , Suzuki K Poulose , linux-arm-kernel@lists.infradead.org, Andrew Jones , Oliver Upton References: <20210729001012.70394-1-oupton@google.com> <20210729001012.70394-4-oupton@google.com> From: Paolo Bonzini Message-ID: <7cb58a33-316c-58b5-b542-671a43dea89c@redhat.com> Date: Thu, 29 Jul 2021 11:30:25 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210729001012.70394-4-oupton@google.com> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210729_023041_903003_4B49E1F1 X-CRM114-Status: GOOD ( 10.52 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 29/07/21 02:10, Oliver Upton wrote: > +6. Adjust the guest TSC offsets for every vCPU to account for (1) time > + elapsed since recording state and (2) difference in TSCs between the > + source and destination machine: > + > + new_off_n = t_0 + off_n = (k_1 - k_0) * freq - t_1 The second = should be a +. Otherwise the algorithm seems correct. > + _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel