From: Sheng Yang <sheng@linux.intel.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Avi Kivity <avi@redhat.com>,
Marcelo Tosatti <mtosatti@redhat.com>,
Alex Williamson <alex.williamson@redhat.com>,
kvm@vger.kernel.org
Subject: Re: [PATCH 3/4] KVM: Emulate MSI-X table in kernel
Date: Tue, 1 Mar 2011 21:01:09 +0800 [thread overview]
Message-ID: <20110301130109.GA23877@syang10-desktop> (raw)
In-Reply-To: <20110301122002.GA13990@redhat.com>
On Tue, Mar 01, 2011 at 02:20:02PM +0200, Michael S. Tsirkin wrote:
> On Tue, Mar 01, 2011 at 02:10:37PM +0800, Sheng Yang wrote:
> > On Monday 28 February 2011 19:27:29 Michael S. Tsirkin wrote:
> > > On Mon, Feb 28, 2011 at 03:20:04PM +0800, Sheng Yang wrote:
> > > > @@ -1877,6 +1879,24 @@ static long kvm_vm_ioctl(struct file *filp,
> > > >
> > > > mutex_unlock(&kvm->lock);
> > > > break;
> > > >
> > > > #endif
> > > >
> > > > + case KVM_REGISTER_MSIX_MMIO: {
> > > > + struct kvm_msix_mmio_user mmio_user;
> > > > +
> > > > + r = -EFAULT;
> > > > + if (copy_from_user(&mmio_user, argp, sizeof mmio_user))
> > > > + goto out;
> > > > + r = kvm_vm_ioctl_register_msix_mmio(kvm, &mmio_user);
> > > > + break;
> > > > + }
> > > > + case KVM_UNREGISTER_MSIX_MMIO: {
> > > > + struct kvm_msix_mmio_user mmio_user;
> > > > +
> > > > + r = -EFAULT;
> > > > + if (copy_from_user(&mmio_user, argp, sizeof mmio_user))
> > > > + goto out;
> > > > + r = kvm_vm_ioctl_unregister_msix_mmio(kvm, &mmio_user);
> > > > + break;
> > > > + }
> > > >
> > > > default:
> > > > r = kvm_arch_vm_ioctl(filp, ioctl, arg);
> > > > if (r == -ENOTTY)
> > > >
> > > > @@ -1988,6 +2008,12 @@ static int kvm_dev_ioctl_create_vm(void)
> > > >
> > > > return r;
> > > >
> > > > }
> > > >
> > > > #endif
> > > >
> > > > + r = kvm_register_msix_mmio_dev(kvm);
> > > > + if (r < 0) {
> > > > + kvm_put_kvm(kvm);
> > > > + return r;
> > > > + }
> > > > +
> > >
> > > Need to fix error handling below as well?
> > > Better do it with chained gotos if yes.
> >
> > Let's make it another separate patch.
>
> Well you add a new failure mode, you need to cleanup
> properly ...
Oh, I think kvm_put_kvm() should take care of this?
--
regards
Yang, Sheng
next prev parent reply other threads:[~2011-03-01 12:58 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-28 7:20 [PATCH 0/4 v11] MSI-X MMIO support for KVM Sheng Yang
2011-02-28 7:20 ` [PATCH 1/4] KVM: Move struct kvm_io_device to kvm_host.h Sheng Yang
2011-02-28 7:20 ` [PATCH 2/4] KVM: Add kvm_io_ext_data to IO handler Sheng Yang
2011-02-28 7:20 ` [PATCH 3/4] KVM: Emulate MSI-X table in kernel Sheng Yang
2011-02-28 11:27 ` Michael S. Tsirkin
2011-03-01 6:10 ` Sheng Yang
2011-03-01 12:20 ` Michael S. Tsirkin
2011-03-01 12:37 ` Sheng Yang
2011-03-01 13:01 ` Sheng Yang [this message]
2011-02-28 7:20 ` [PATCH 4/4] KVM: Add documents for MSI-X MMIO API Sheng Yang
-- strict thread matches above, loose matches on Subject: below --
2011-03-02 7:26 [PATCH 0/4 v12] MSI-X MMIO support for KVM Sheng Yang
2011-03-02 7:26 ` [PATCH 3/4] KVM: Emulate MSI-X table in kernel Sheng Yang
2011-02-24 9:51 [PATCH 0/4 v10] MSI-X MMIO support for KVM Sheng Yang
2011-02-24 9:51 ` [PATCH 3/4] KVM: Emulate MSI-X table in kernel Sheng Yang
2011-02-24 10:45 ` Michael S. Tsirkin
2011-02-25 6:28 ` Sheng Yang
2011-02-25 8:29 ` Michael S. Tsirkin
2011-02-28 5:18 ` Sheng Yang
2011-03-01 20:18 ` Marcelo Tosatti
2011-03-01 20:59 ` Michael S. Tsirkin
2011-03-02 1:23 ` Sheng Yang
2011-02-25 6:50 ` Sheng Yang
2011-02-18 8:53 [PATCH 0/4 v9] MSI-X MMIO support for KVM Sheng Yang
2011-02-18 8:53 ` [PATCH 3/4] KVM: Emulate MSI-X table in kernel Sheng Yang
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=20110301130109.GA23877@syang10-desktop \
--to=sheng@linux.intel.com \
--cc=alex.williamson@redhat.com \
--cc=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mst@redhat.com \
--cc=mtosatti@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).