From: Gregory Haskins <ghaskins@novell.com>
To: Avi Kivity <avi@redhat.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 22:31:28 -0400 [thread overview]
Message-ID: <4A10C880.9020903@novell.com> (raw)
In-Reply-To: <4A106F2E.4010601@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1098 bytes --]
Avi Kivity wrote:
> 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().
Hmm..I was assuming the in-kernel stuff would have completed in early
init before the dynamic stuff could even get in there. But thinking
about it some more, you are right. Theres no reason why something like
a iosignalfd ioctl couldnt come down before, for instance, enabling the
in-kernel PIC. My bad.
>
> Need to handle the failure gracefully, more or less.
>
Yeah, agreed. Will fix in next rev.
-Greg
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 266 bytes --]
next prev parent reply other threads:[~2009-05-18 2:31 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
2009-05-18 2:31 ` Gregory Haskins [this message]
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=4A10C880.9020903@novell.com \
--to=ghaskins@novell.com \
--cc=avi@redhat.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