Hello!
> And also we could add some another boolean, which would allow to
disable in-kernel GIC
emulation
>(kernel_irqchip=off). This works with any machine type, BTW, not only with ARM.
Something
like <gic
>kvm='off'/>.
>
I don't know what that is. Is that only GIC related?
No, not only GIC. It applies to any possible irqchip. When set to off, this option
disables using
KVM acceleration for the irqchip, and qemu's software emulation is used instead.
Where could I find more details?
Something like "aarch64-system-qemu -machine virt,?" i guess. Or similar
command line for different
arch and different machine. It is implemented as machine option, but applies to any
machine, not
only to virt, and not only for ARM.
The option is also mentioned on
http://wiki.qemu.org/KVM, but information is outdated (it
defaults
to on since long ago).
If that makes sense for anything, we can sure do
that, the only reason why I would be against this, which I can come up
now, is if there is nobody using it.
Yes, this option was bitrot in the ARM kernel, but i have recently fixed it
(
https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/commit/?...
945f1765cd48eb0da). I understand that the primary use of this on e.g. x86 would be for
testing
purposes only, but for ARM it can be more useful, because you cannot run everything on
everything.
For example, if you want GICv2 system, but your host is pure GICv3 without backwards
compatibility,
you could want to use this option, so that you use software-emulated GICv2. Of course this
would not
give you the top performance, but this is still usable, i tested it. Perhaps other
systems, like
PowerPC, can also take advantage of it (from KVM code i see there are several different
irqchips for
PPC, and i'm in doubt that any of these irqchips can emulate everything else).
There is one more complication with this option - CP15 timer currently will not work,
because
virtual timer accesses cannot be intercepted by the hypervisor. I am considering fixing
this in the
future, there are at least two possible solutions. But, still, you can run, for example,
vexpress
guest with a little bit patched device tree or reconfigured kernel (arch-timer disabled),
because
this hardware has another, memory-mapped timer, which can be used with software emulation.
And it
works.
Well, if you think that this is not ready for the wide public yet, we can leave out this
part.
Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia