public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Gregory Haskins <ghaskins@novell.com>
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [KVM PATCH v2 2/4] kvm: add return value to kvm_io_bus_register_dev
Date: Sun, 17 May 2009 23:10:22 +0300	[thread overview]
Message-ID: <4A106F2E.4010601@redhat.com> (raw)
In-Reply-To: <20090515162813.26209.49515.stgit@dev.haskins.net>

Gregory Haskins wrote:
> Today this function returns void and will internally BUG_ON if it fails.
> We want to create dynamic MMIO/PIO entries driven from userspace later in
> the series, so enhance this API to return an error code on failure.
>
> We also fix up all the callsites to check the return code and BUG_ON if
> it fails.
>
> The net result should be identical behavior both before and after this
> patch.  We are simply laying the groundwork for the dynamic usage
>   

What happens if the dynamic user gets in there first, then the internal 
device (which is set up by userspace)?  We'll just BUG().

Need to handle the failure gracefully, more or less.

-- 
Do not meddle in the internals of kernels, for they are subtle and quick to panic.


  reply	other threads:[~2009-05-17 20:10 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-15 16:28 [KVM PATCH v2 0/4] iosignalfd Gregory Haskins
2009-05-15 16:28 ` [KVM PATCH v2 1/4] eventfd: export eventfd interfaces for module use Gregory Haskins
2009-05-15 16:28 ` [KVM PATCH v2 2/4] kvm: add return value to kvm_io_bus_register_dev Gregory Haskins
2009-05-17 20:10   ` Avi Kivity [this message]
2009-05-18  2:31     ` Gregory Haskins
2009-05-15 16:28 ` [KVM PATCH v2 3/4] kvm: add io_bus unregister function Gregory Haskins
2009-05-15 16:28 ` [KVM PATCH v2 4/4] kvm: add iosignalfd support Gregory Haskins
2009-05-17 20:15   ` Avi Kivity
2009-05-18  2:37     ` Gregory Haskins
2009-05-15 16:35 ` [KVM PATCH v2 0/4] iosignalfd Gregory Haskins

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=4A106F2E.4010601@redhat.com \
    --to=avi@redhat.com \
    --cc=ghaskins@novell.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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