All of lore.kernel.org
 help / color / mirror / Atom feed
From: Scott Wood <scottwood@freescale.com>
To: Andre Przywara <andre.przywara@arm.com>
Cc: <kvm@vger.kernel.org>, <will.deacon@arm.com>,
	<kvmarm@lists.cs.columbia.edu>
Subject: Re: [RFC PATCH] KVM: introduce kvm_check_device
Date: Tue, 6 Jan 2015 14:52:48 -0600	[thread overview]
Message-ID: <1420577568.4961.23.camel@freescale.com> (raw)
In-Reply-To: <1420560724-5345-1-git-send-email-andre.przywara@arm.com>

On Tue, 2015-01-06 at 16:12 +0000, Andre Przywara wrote:
> While we can easily register and unregister KVM devices, there is
> currently no easy way of checking whether a device has been
> registered.
> Introduce kvm_check_device() for that purpose and use it in two
> existing functions. Also change the return code for an invalid
> type number from ENOSPC to EINVAL.
> This function will be later used by another patch set to check
> whether a KVM_CREATE_IRQCHIP ioctl is valid.

You're checking whether a device type has been registered, not the
device itself -- so could you make it kvm_check_device_type()?

> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> ---
> Hi,
> 
> can people comment whether there is an easier way to detect KVM
> device registration _outside_ of virt/kvm/kvm_main.c? Using the
> KVM_CREATE_DEVICE_TEST flag sounds like a fit, but
> kvm_ioctl_create_device() isn't exported.

Out of curiosity, why do you need to test it from inside the kernel but
outside kvm_main.c?

-Scott



  reply	other threads:[~2015-01-06 20:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-06 16:12 [RFC PATCH] KVM: introduce kvm_check_device Andre Przywara
2015-01-06 20:52 ` Scott Wood [this message]
2015-01-07 10:55   ` Andre Przywara
2015-01-07 17:45     ` Scott Wood
2015-01-07 18:11       ` Andre Przywara
2015-01-07 18:16         ` Scott Wood
2015-01-08 17:41           ` Andre Przywara

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=1420577568.4961.23.camel@freescale.com \
    --to=scottwood@freescale.com \
    --cc=andre.przywara@arm.com \
    --cc=kvm@vger.kernel.org \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=will.deacon@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.