From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefano Stabellini Subject: [PATCH 1/5] arm/vtimer: do not let the guest interact with the physical timer Date: Wed, 6 Jun 2012 12:22:06 +0100 Message-ID: <1338981730-14816-1-git-send-email-stefano.stabellini@eu.citrix.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xensource.com Cc: Tim.Deegan@citrix.com, david.vrabel@citrix.com, Ian.Campbell@citrix.com, Stefano Stabellini List-Id: xen-devel@lists.xenproject.org The guest can read the physical counter but it shouldn't be able to cause interrupts of the physical timer to go to the hypervisor. Trap physical timer reads/writes in vtimer.c instead. Signed-off-by: Stefano Stabellini --- xen/arch/arm/time.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/arch/arm/time.c b/xen/arch/arm/time.c index 1587fa2..d5b71d7 100644 --- a/xen/arch/arm/time.c +++ b/xen/arch/arm/time.c @@ -160,8 +160,8 @@ void __cpuinit init_timer_interrupt(void) WRITE_CP64(0, CNTVOFF); /* No VM-specific offset */ WRITE_CP32(0, CNTKCTL); /* No user-mode access */ #if USE_HYP_TIMER - /* Let the VMs read the physical counter and timer so they can tell time */ - WRITE_CP32(CNTHCTL_PA|CNTHCTL_TA, CNTHCTL); + /* Do not the VMs program the physical timer, only read the physical counter */ + WRITE_CP32(CNTHCTL_PA, CNTHCTL); #else /* Cannot let VMs access physical counter if we are using it */ WRITE_CP32(0, CNTHCTL); -- 1.7.2.5