From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934449AbdBVT3F (ORCPT ); Wed, 22 Feb 2017 14:29:05 -0500 Received: from mail-wm0-f42.google.com ([74.125.82.42]:34655 "EHLO mail-wm0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934309AbdBVT2y (ORCPT ); Wed, 22 Feb 2017 14:28:54 -0500 Date: Wed, 22 Feb 2017 20:28:38 +0100 From: Christoffer Dall To: Jintack Lim Cc: christoffer.dall@linaro.org, marc.zyngier@arm.com, pbonzini@redhat.com, rkrcmar@redhat.com, linux@armlinux.org.uk, catalin.marinas@arm.com, will.deacon@arm.com, vladimir.murzin@arm.com, suzuki.poulose@arm.com, mark.rutland@arm.com, james.morse@arm.com, lorenzo.pieralisi@arm.com, kevin.brodsky@arm.com, wcohen@redhat.com, shankerd@codeaurora.org, geoff@infradead.org, andre.przywara@arm.com, eric.auger@redhat.com, anna-maria@linutronix.de, shihwei@cs.columbia.edu, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC 54/55] KVM: arm/arm64: Adjust virtual offset considering nesting Message-ID: <20170222192838.GY26976@cbox> References: <1483943091-1364-1-git-send-email-jintack@cs.columbia.edu> <1483943091-1364-55-git-send-email-jintack@cs.columbia.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1483943091-1364-55-git-send-email-jintack@cs.columbia.edu> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jintack, On Mon, Jan 09, 2017 at 01:24:50AM -0500, Jintack Lim wrote: > The guest hypervisor sets cntvoff_el2 for its VM (i.e. nested VM). Note > that physical/virtual counter value in the guest hypervisor's point of > view is already offsetted by the virtual offset set by the host > hypervisor. Therefore, the correct offset we need to write to the > cntvoff_el2 is the sum of offset the host hypervisor initially has for > the VM and virtual offset the guest hypervisor sets for the nested VM. This appears to be the only timer patch in the series. Should we not also expose the EL2 timer to the VM and emulate that in software? Thanks, -Christoffer