[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-users] Debugging DomU



Hi Ian,

On 03/06/2015 10:28, Ian Campbell wrote:
On Tue, 2015-06-02 at 22:46 +0000, Chris (Christopher) Brand wrote:
Hi Julien,

For DOMU, the timer frequency is retrieved from CNTFRQ_EL0.
This register has to be setup correctly by the firmware/bootloader.

Do you know if the timer node in the device tree for your platform has a property 
"clock-frequency"? If yes, it will be very likely CNTFRQ_EL0 is not correctly 
set.

It does indeed. I think I understand what's happening, then.
Bootloader is running only on core 0, and is setting CNTFRQ. When DomU
runs, its vcpu0 runs on a random physical core. If it happens to run
on core0, everything is fine. If it happens to run on any other core,
though, it fails because CNTFRQ is zero. So I need to ensure that
CNTFRQ is set for the other cores.

Perhaps on secondary pCPU bring up Xen should check that either the
clock frequency was overridden by the DT or that the new CPU's CNTFRQ
says the same as the boot CPU?

I was thinking about the same. To add a warning if the "clock-frequency" property is checked and verifying that the CNTFRQ is not empty.


Anyone care to send such a patch?

I will do it. I have another patch related to debug registers based on this thread too.

--
Julien Grall

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxx
http://lists.xen.org/xen-users


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.