From: Alexander Graf <agraf@suse.de>
To: Pavel Fedin <p.fedin@samsung.com>,
kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org
Cc: Marc Zyngier <marc.zyngier@arm.com>,
Gleb Natapov <gleb@kernel.org>,
Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [PATCH v5 1/2] arm/arm64: KVM: Detect vGIC presence at runtime
Date: Thu, 21 Apr 2016 23:41:45 +0200 [thread overview]
Message-ID: <57194919.5080007@suse.de> (raw)
In-Reply-To: <f759b4ba37d4cacdc971d2a416cdc8ecf0c3c3d9.1448874023.git.p.fedin@samsung.com>
On 30.11.15 10:40, Pavel Fedin wrote:
> Before commit 662d9715840aef44dcb573b0f9fab9e8319c868a
> ("arm/arm64: KVM: Kill CONFIG_KVM_ARM_{VGIC,TIMER}") is was possible to
> compile the kernel without vGIC and vTimer support. Commit message says
> about possibility to detect vGIC support in runtime, but this has never
> been implemented.
>
> This patch introdices runtime check, restoring the lost functionality.
> It again allows to use KVM on hardware without vGIC. Interrupt
> controller has to be emulated in userspace in this case.
>
> -ENODEV return code from probe function means there's no GIC at all.
> -ENXIO happens when, for example, there is GIC node in the device tree,
> but it does not specify vGIC resources. Normally this means that vGIC
> hardware is defunct. Any other error code is still treated as full stop
> because it might mean some really serious problems.
>
> This patch does not touch any virtual timer code, suggesting that timer
> hardware is actually in place. Normally on boards in question it is true,
> however since vGIC is missing, it is impossible to correctly utilize
> interrupts from the virtual timer. Since virtual timer handling is in
So effectively all we'd need is to set CNTHCTL_EL2.EL1PCEN to 0 for
guests that have no in-kernel irqchip, no? We should then trap on all
timer accesses and be able to emulate them in user space where we can
inject IRQs into an emulated GIC again.
Alex
next prev parent reply other threads:[~2016-04-21 21:41 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-30 9:40 [PATCH v5 0/2] KVM: arm/arm64: Allow to use KVM without in-kernel irqchip Pavel Fedin
2015-11-30 9:40 ` [PATCH v5 1/2] arm/arm64: KVM: Detect vGIC presence at runtime Pavel Fedin
2016-04-21 21:41 ` Alexander Graf [this message]
2016-04-21 22:04 ` Peter Maydell
2016-04-21 22:35 ` Alexander Graf
2016-04-21 22:41 ` Peter Maydell
2016-04-22 7:50 ` Marc Zyngier
2015-11-30 9:40 ` [PATCH v5 2/2] KVM: Make KVM_CAP_IRQFD dependent on KVM_CAP_IRQCHIP Pavel Fedin
2015-11-30 11:26 ` Cornelia Huck
2015-11-30 11:56 ` Pavel Fedin
2015-11-30 12:13 ` Cornelia Huck
2015-11-30 12:41 ` Pavel Fedin
2015-11-30 14:38 ` Cornelia Huck
2015-11-30 14:45 ` Pavel Fedin
2015-12-01 11:07 ` Pavel Fedin
2015-12-01 16:00 ` Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=57194919.5080007@suse.de \
--to=agraf@suse.de \
--cc=gleb@kernel.org \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=marc.zyngier@arm.com \
--cc=p.fedin@samsung.com \
--cc=pbonzini@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).