From: Avi Kivity <avi@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: "Yang, Sheng" <sheng.yang@intel.com>,
Marcelo Tosatti <mtosatti@redhat.com>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>
Subject: Re: Mask bit support's API
Date: Thu, 02 Dec 2010 15:56:52 +0200 [thread overview]
Message-ID: <4CF7A5A4.8040102@redhat.com> (raw)
In-Reply-To: <20101202134718.GE2454@redhat.com>
On 12/02/2010 03:47 PM, Michael S. Tsirkin wrote:
> >
> > Which case? the readl() doesn't need access to the routing table,
> > just the entry.
>
> One thing that read should do is flush in the outstanding
> interrupts and flush out the mask bit writes.
The mask bit writes are synchronous.
wrt interrupts, we can deal with assigned devices, and can poll irqfds.
But we can't force vhost-net to issue an interrupt (and I don't think
it's required).
> > Oh, I think there is a terminology problem, I was talking about
> > kvm's irq routing table, you were talking about the msix entries.
> >
> > I think treating it as a cache causes more problems, since there are
> > now two paths for reads (in cache and not in cache) and more things
> > for writes to manage.
> >
> > Here's my proposed API:
> >
> > KVM_DEFINE_MSIX_TABLE(table_id, nr_entries, msix_base_gpa,
> > pending_bitmap_base_gpa)
> >
> > - called when the guest enables msix
>
> I would add virtual addresses so that we can use swappable memory to
> store the state.
Right.
> If we do, maybe we can just keep the table there and then
> KVM_SET/GET_MSIX_ENTRY and the new exit won't be needed?
Still need to to let userspace know it needs to reprogram the irqfd or
whatever it uses to inject the interrupt.
> > KVM_REMOVE_MSIX_TABLE(table_id)
> >
> > - called when the guest disables msix
> >
> > KVM_SET_MSIX_ENTRY(table_id, entry_id, contents)
> >
> > - called when the guest enables msix (to initialize it), or after
> > live migration
>
> What is entry_id here?
Entry within the table.
> > Michael? I think that should work for virtio and vfio assigned
> > devices? Not sure about pending bits.
>
> Pending bits must be tracked in kernel, but I don't see
> how we can support polling mode if we don't exit to userspace
> on pending bit reads.
>
> This does mean that some reads will be fast and some will be
> slow, and it's a bit sad that we seem to be optimizing
> for specific guests, but I just can't come up with
> anything better.
>
If the pending bits live in userspace memory, the device model can
update them directly?
> So maybe just add an ioctl to get and to clear pending bits.
> Maybe set for symmetry.
For live migration too. But if they live in memory, no need for
get/set, just specify the address.
--
error compiling committee.c: too many arguments to function
next prev parent reply other threads:[~2010-12-02 13:56 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-23 6:09 Mask bit support's API Yang, Sheng
2010-11-23 6:17 ` Avi Kivity
2010-11-23 6:35 ` Yang, Sheng
2010-11-23 7:54 ` Avi Kivity
2010-11-23 8:30 ` Yang, Sheng
2010-11-23 12:47 ` Avi Kivity
2010-11-23 12:56 ` Michael S. Tsirkin
2010-11-23 13:57 ` Yang, Sheng
2010-11-23 14:06 ` Avi Kivity
2010-11-23 15:11 ` Michael S. Tsirkin
2010-11-23 15:24 ` Gleb Natapov
2010-11-23 16:10 ` Michael S. Tsirkin
2010-11-24 1:59 ` Yang, Sheng
2010-11-26 2:35 ` Yang, Sheng
2010-11-30 14:15 ` Avi Kivity
2010-12-01 2:36 ` Yang, Sheng
2010-12-02 13:09 ` Avi Kivity
2010-12-02 13:47 ` Michael S. Tsirkin
2010-12-02 13:56 ` Avi Kivity [this message]
2010-12-02 14:26 ` Michael S. Tsirkin
2010-12-02 14:54 ` Sheng Yang
2010-12-02 16:55 ` Michael S. Tsirkin
2010-12-03 3:03 ` Yang, Sheng
2010-11-23 12:04 ` Michael S. Tsirkin
2010-11-23 14:02 ` Yang, Sheng
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=4CF7A5A4.8040102@redhat.com \
--to=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mst@redhat.com \
--cc=mtosatti@redhat.com \
--cc=sheng.yang@intel.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