From: Stefano Stabellini Date: Tue, 17 Jul 2012 16:22:04 +0000 (+0100) Subject: arm/vtimer: do not let the guest interact with the physical timer X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~8196 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=5ddc8ef0f89c08e705e047b97296146d87a284aa;p=xen.git arm/vtimer: do not let the guest interact with the physical timer 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 Acked-by: Tim Deegan Committed-by: Ian Campbell --- diff --git a/xen/arch/arm/time.c b/xen/arch/arm/time.c index 1587fa2fb5..b6d701535d 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 let 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);