Re: [RFC] Handling CP15 timer without in-kernel irqchip

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

 



On 2 October 2015 at 10:30, Paolo Bonzini <pbonzini@xxxxxxxxxx> wrote:
>
>
> On 02/10/2015 09:28, Pavel Fedin wrote:
>>  2. Another possible approach, based on how device tree binding is handled by Linux. It is possible
>> to remove virtual timer IRQ from the device tree, in this case the kernel reverts to using physical
>> timer. When running under hypervisor, accesses to physical CP15 timer are trapped into HYP,
>> therefore we can forward them to userspace using new exit code, something like KVM_EXIT_REG_ACCESS.
>> In this case the timer would be also emulated by the userspace, which is slower, but allows better
>> emulation. Also, this could be used in order to run some other guests which just expect physical
>> timer to be there.
>>
>>  Both approaches have their own limitations, but anyway this is much better than nothing. What do
>> you think, and which approach do you like more?
>
> I like the latter.  But I guess one could even do both?

I definitely dislike the latter -- userspace ends up having to
emulate part of the CPU even though that CPU support is really
there in hardware. Also it requires us to edit the device tree,
which means it won't work at all on boards other than 'virt'
where we use the kernel's device tree rather than creating our
own. Better for the kernel to forward the timer
interrupts back out to userspace's irq controller.

-- PMM
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux