xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* ARM Generic Timer interrupt
@ 2014-05-26 15:26 Oleksandr Tyshchenko
  2014-05-27 12:11 ` Stefano Stabellini
  0 siblings, 1 reply; 18+ messages in thread
From: Oleksandr Tyshchenko @ 2014-05-26 15:26 UTC (permalink / raw)
  To: xen-devel@lists.xen.org; +Cc: Julien Grall, Ian Campbell, Stefano Stabellini


[-- Attachment #1.1: Type: text/plain, Size: 1677 bytes --]

Hello, all.

I am trying to run QNX as domU under XEN (4.4.0) on OMAP5 platform (ARM32).
For this purposes I have made some changes to origin TI OMAP5 BSP.
Also I have created QNX IFS loader for Xen domain builder.

Currently, dom0 (Linux Kernel) loads QNX as domU. The QNX boots without
crashes,
and I have console (I left only one hw block in QNX - UART,
I need it for debug output while HVC is not implemented).

During bringing up I have encountered with next problem.
1. QNX (our BSP) uses ARM Generic Timer as system timer:
QNX doesn't mask/unmask timer interrupt. Of course the QNX doesn't know
that interrupt mask may be set by someone else
and that it should be reset for timer interrupt to occur again.

2. XEN handles the firing ARM Generic Timer:
Before injecting irq to the guest the XEN sets interrupt mask for the
virtual timer.

.../xen/arch/arm/time.c

static void vtimer_interrupt(int irq, void *dev_id, struct cpu_user_regs
*regs)
{
    current->arch.virt_timer.ctl = READ_SYSREG32(CNTV_CTL_EL0);
    WRITE_SYSREG32(current->arch.virt_timer.ctl | CNTx_CTL_MASK,
CNTV_CTL_EL0);
    vgic_vcpu_inject_irq(current, current->arch.virt_timer.irq, 1);
}

And as result of run under XEN we don't have timer interrupts in QNX.
I have changed interrupt handler in QNX to unmask timer interrupt before
return.
But, I have question:
Should the Hypervisor masks virtual timer IRQ on his own?
It is a guest's resource and the guest itself should decide what to do.
For example, I see that Linux Kernel (3.8) sets and clears timer interrupt
mask by itself.

Thank you.

-- 

Oleksandr Tyshchenko | Embedded Dev
GlobalLogic
www.globallogic.com
<http://www.globallogic.com/>

[-- Attachment #1.2: Type: text/html, Size: 3429 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

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

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2014-05-29  8:38 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-26 15:26 ARM Generic Timer interrupt Oleksandr Tyshchenko
2014-05-27 12:11 ` Stefano Stabellini
2014-05-27 15:00   ` Julien Grall
2014-05-27 16:05     ` Stefano Stabellini
2014-05-27 16:12       ` Julien Grall
2014-05-27 16:53         ` Oleksandr Tyshchenko
2014-05-28 10:10   ` Ian Campbell
2014-05-28 11:32     ` Julien Grall
2014-05-28 11:34       ` Ian Campbell
2014-05-28 11:37         ` Julien Grall
2014-05-28 11:51         ` Stefano Stabellini
2014-05-28 11:54           ` Ian Campbell
2014-05-28 12:11             ` Stefano Stabellini
2014-05-28 12:20               ` Ian Campbell
2014-05-28 12:33                 ` Stefano Stabellini
2014-05-28 12:36                   ` Ian Campbell
2014-05-28 13:21                     ` Stefano Stabellini
2014-05-29  8:38                       ` Oleksandr Tyshchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).