From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christian Borntraeger Subject: Re: [PATCH v2] arm/arm64: KVM: Properly account for guest CPU time Date: Mon, 01 Jun 2015 11:21:19 +0200 Message-ID: <556C240F.5070501@de.ibm.com> References: <1432838950-28774-1-git-send-email-christoffer.dall@linaro.org> <556C0E22.9090401@de.ibm.com> <20150601090817.GA18722@cbox> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Marc Zyngier , Paolo Bonzini To: Christoffer Dall Return-path: Received: from e06smtp13.uk.ibm.com ([195.75.94.109]:42817 "EHLO e06smtp13.uk.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752332AbbFAJ22 (ORCPT ); Mon, 1 Jun 2015 05:28:28 -0400 Received: from /spool/local by e06smtp13.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 1 Jun 2015 10:28:26 +0100 Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by d06dlp03.portsmouth.uk.ibm.com (Postfix) with ESMTP id BC4C31B081D8 for ; Mon, 1 Jun 2015 10:22:15 +0100 (BST) Received: from d06av12.portsmouth.uk.ibm.com (d06av12.portsmouth.uk.ibm.com [9.149.37.247]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t519LLFC26083494 for ; Mon, 1 Jun 2015 09:21:21 GMT Received: from d06av12.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av12.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t519LJ4G023632 for ; Mon, 1 Jun 2015 03:21:21 -0600 In-Reply-To: <20150601090817.GA18722@cbox> Sender: kvm-owner@vger.kernel.org List-ID: Am 01.06.2015 um 11:08 schrieb Christoffer Dall: >>> >>> Second, looking at the ppc and mips code, they seem to also call >>> kvm_guest_exit() before enabling interrupts, so I don't understand how >>> guest CPU time accounting works on those architectures. >> >> Not an expert here, but I assume mips has the same logic as arm so if your >> patch is right for arm its probably also for mips. >> >> powerpc looks similar to what s390 does (not using the tick, instead it uses >> a hw-timer) so this should be fine. >> > I wonder if we can simply enable HAVE_VIRT_CPU_ACCOUNTING_GEN and get > this for free which would avoid the need for this patch? Asssuming that HAVE_VIRT_CPU_ACCOUNTING_GEN behaves similar to HAVE_VIRT_CPU_ACCOUNTING on s390/power in respect to not rely on ticks - yes it might work out. Can you give it a try? Christian