Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp866154ybe; Wed, 4 Sep 2019 08:54:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqwewzR3TW/3J+TDvELMd3gwywT0/VJYHSr4EdFT7gOZUXe7n4f6FGpKGxOpiD22WMAsEPY5 X-Received: by 2002:a17:90a:5d98:: with SMTP id t24mr5707759pji.94.1567612456781; Wed, 04 Sep 2019 08:54:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567612456; cv=none; d=google.com; s=arc-20160816; b=byeAd3rlWOGKlNKd0/FY+rhJ+91UA0bQG9kdacv2Fsv24ZmFUr7cbf5tIvotvYu6eX gTyOFl23WkBDcXR3X1DjiJUoOp+MnCMfL4/5qYnMgAv0qHBujK/CUI5d9kgSl+GQAbwc D7fh2uJwAt7RF6+bMBjNw2MhjPfxH2eWndhjzzWOil3ZT+aWOtGXPdd0WMMXO7bC9TRP iQhAMSS79t3BZSXQCsSXm7aXXbDkQGH7++W14oeUS22nVDOJFQno6PSxidBpFMbXwWlj iWHEXjbxXXV5vu7Zg6j9JQHaHpQBP3vE0w3eVUKUg48X80kRGJ8a+Q4otxFKOeIazfrR whvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=mAJ5+m3rUOmN8uP9/yHiQz4dua6s7gpZdIEtsaO+k40=; b=wRGW0ivlE9cJ81xLOxf/azjDjTwS9aPGrcQnDYwaUnfTVhBk1hhenBrp6XXBCDgEtK 3yKJO1mudIHgMg2ssfqkkIspsKrJeBZQhKWwop7+WMwwWNoiwnIUt5311LfeLSb8lAdW WAfKz51FtwScZstf8y7PT/TO9QvQSgHUD2ux0zA4nH6KBAbZRGhidPDsFGXn99seKovR iY3HVgTYGPa911BgGdKd47YlOQAkHOQlsgdJ80Zjfw92y6k3zmBhP0CgArbQ1D9LmvWQ 48mvY+lACgJF3dzRR2SYVIwHxcF3fREI4yXDvHJEV8bvWm/eNaGKE3KNpo+fq/Omkc6h wZnQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 14si17516102pga.452.2019.09.04.08.54.01; Wed, 04 Sep 2019 08:54:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731468AbfIDPxG (ORCPT + 99 others); Wed, 4 Sep 2019 11:53:06 -0400 Received: from foss.arm.com ([217.140.110.172]:57552 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730277AbfIDPxG (ORCPT ); Wed, 4 Sep 2019 11:53:06 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 6BB8728; Wed, 4 Sep 2019 08:53:05 -0700 (PDT) Received: from [10.1.196.133] (e112269-lin.cambridge.arm.com [10.1.196.133]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C969A3F246; Wed, 4 Sep 2019 08:53:03 -0700 (PDT) Subject: Re: [PATCH v4 05/10] KVM: arm64: Support stolen time reporting via shared structure To: Zenghui Yu , Marc Zyngier , Will Deacon , linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Catalin Marinas , linux-doc@vger.kernel.org, Russell King , Paolo Bonzini References: <20190830084255.55113-1-steven.price@arm.com> <20190830084255.55113-6-steven.price@arm.com> From: Steven Price Message-ID: Date: Wed, 4 Sep 2019 16:53:02 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/09/2019 10:14, Zenghui Yu wrote: > On 2019/8/30 16:42, Steven Price wrote: >> Implement the service call for configuring a shared structure between a >> VCPU and the hypervisor in which the hypervisor can write the time >> stolen from the VCPU's execution time by other tasks on the host. >> >> The hypervisor allocates memory which is placed at an IPA chosen by user >> space. > > It seems that no allocation happens in the hypervisor code.  User space > will do it instead? Ah, yes I should update the commit message. User space does now allocate the memory. Thanks for spotting that. Steve >> The hypervisor then updates the shared structure using >> kvm_put_guest() to ensure single copy atomicity of the 64-bit value >> reporting the stolen time in nanoseconds. >> >> Whenever stolen time is enabled by the guest, the stolen time counter is >> reset. >> >> The stolen time itself is retrieved from the sched_info structure >> maintained by the Linux scheduler code. We enable SCHEDSTATS when >> selecting KVM Kconfig to ensure this value is meaningful. >> >> Signed-off-by: Steven Price > > Thanks, > zenghui >