All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Fedin <p.fedin@samsung.com>
To: 'Christoffer Dall' <christoffer.dall@linaro.org>
Cc: 'Marc Zyngier' <marc.zyngier@arm.com>,
	kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org
Subject: RE: [PATCH 2/2] Detect vGIC presence at runtime
Date: Thu, 09 Jul 2015 15:50:49 +0300	[thread overview]
Message-ID: <01b401d0ba45$e23be430$a6b3ac90$@samsung.com> (raw)
In-Reply-To: <20150709113721.GJ13530@cbox>

 Hello!

> why not report ENXIO as an error?  If probing the vgic fails due to
> being unable to request the irq or something similar, then surely your
> system has and error and this should be reported.

 It is reported by probe function itself.
 -ENODEV here 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 is defunct on
the machine.

> This may be more nicely implemented by letting the vgic init/probe
> functions set the vgic_present, or maybe better yet, just export a
> function from vgic.c:
> 
> bool kvm_vgic_present(void)
> {
> 	return vgic_ops != NULL;
> }

 Is it necessary? Actually this flag is not needed anywhere else except arch/arm/kvm/arm.c, only at
init time. Runtime should, i believe, use irqchip_in_kernel(), because userland can choose just not
to use vGIC for some reason (testing for example).

Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia

  reply	other threads:[~2015-07-09 12:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-07 10:38 [PATCH 0/2] Allow to use KVM without in-kernel irqchip Pavel Fedin
2015-07-07 10:38 ` [PATCH 1/2] Fix NULL pointer dereferences if KVM is used " Pavel Fedin
2015-07-09 11:11   ` Christoffer Dall
2015-07-07 10:38 ` [PATCH 2/2] Detect vGIC presence at runtime Pavel Fedin
2015-07-09 11:37   ` Christoffer Dall
2015-07-09 12:50     ` Pavel Fedin [this message]
2015-07-09 13:25       ` Christoffer Dall
2015-07-09 13:47         ` Pavel Fedin
2015-07-07 11:11 ` [PATCH 1/2] Fix NULL pointer dereferences if KVM is used without in-kernel irqchip Pavel Fedin
2015-07-07 11:11 ` [PATCH 2/2] Detect vGIC presence at runtime Pavel Fedin

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='01b401d0ba45$e23be430$a6b3ac90$@samsung.com' \
    --to=p.fedin@samsung.com \
    --cc=christoffer.dall@linaro.org \
    --cc=kvm@vger.kernel.org \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=marc.zyngier@arm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.