From: Sheng Yang <yasker@gmail.com>
To: Avi Kivity <avi@redhat.com>
Cc: Sheng Yang <sheng@linux.intel.com>,
Marcelo Tosatti <mtosatti@redhat.com>,
kvm@vger.kernel.org
Subject: Re: [PATCH 1/7] KVM: Add a route layer to convert MSI message to GSI
Date: Sat, 10 Jan 2009 19:12:14 +0800 [thread overview]
Message-ID: <20090110111214.GA14678@yukikaze> (raw)
In-Reply-To: <49679209.1030600@redhat.com>
On Fri, Jan 09, 2009 at 08:06:01PM +0200, Avi Kivity wrote:
> Sheng Yang wrote:
>>>> +struct kvm_gsi_route_entry_guest {
>>>>
>>> what does _guest mean here? almost all kvm stuff is _guest related.
>>>
>>
>> Because I can't think of a good name... kvm_gsi_route_entry_guest?
>> kvm_gsi_kernel_route_entry? What's your favorite? :)
>>
>>
>
> kvm_gsi_route_entry?
Which is used for kernel one now...
>
>>>
>>> Since we replace the entire table every time, how do ioapic/pic gsis work?
>>>
>
> Missed this question...
My comments below...
>
>>> Why not throw everything and set the new table?
>>>
>>
>> Userspace to maintain a big route table? Just for MSI/MSI-X it's easy,
>> but for others, a global one is needed, and need follow up more
>> maintain functions. For kernel, a little more effect can archive this,
>> like this. So I do it in this way.
>>
>
> Sorry, I don't understand the reply.
>
>>> I didn't see where you respond the new KVM_CAP. It looks like a good
>>> place to return the maximum size of the table.
>>>
>>
>> I just use it as #ifdef in userspace now, for no user other than
>> MSI/MSI-X now. And if we keep maintaining it in kernel, we would return
>> free size instead of maximum size..
>>
>
> We need to allow userspace to change pic/ioapic routing for the HPET.
>
> There are two styles of maintaining the table:
>
> 1. add/remove ioctls
>
> The advantage is that very little work needs to be done when something
> changes, but the code size (and bug count) doubles.
>
> 2. replace everything ioctl
>
> Smaller code size, but slower if there are high frequency changes
>
> I don't think we'll see high frequency interrupt routing changes; we'll
> probably have one on setup (for HPET), another when switching from ACPI
> PIC mode to ACPI APIC mode, and one for every msi initialized.
I come to option 2 mix with option 1 now. What I meant is, MSI part is in
device-assignment part, and HPET and others are in some other place, so a
global table should be maintained for these three across the parts of
userspace. I don't like the global gsi route table, and especially we
already got one in kernel space. We have to do some maintain work in the
kernel space, e.g. looking up a entry, so I think a little add-on can take
the job.
And now I think you original purpose is three different tables for MSI, HPET
and ACPI APIC mode? This also avoid global big table in userspace. But it
seems like a waste, and also too specific...
So how about this? One ioctl to replace everything, another(maybe two,
transfer entry number then table, or one with maximum entries number in
userspace) can export current gsi route table? This can avoid the global
route table, as well as reduce the complexity.
How do you think?
--
regards
Yang, Sheng |Intel Opensource Technology Center
next prev parent reply other threads:[~2009-01-10 11:12 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-08 10:45 [PATCH 0/7][v5] GSI route layer for MSI/MSI-X Sheng Yang
2009-01-08 10:45 ` [PATCH 1/7] KVM: Add a route layer to convert MSI message to GSI Sheng Yang
2009-01-08 14:20 ` Marcelo Tosatti
2009-01-09 1:51 ` Sheng Yang
2009-01-08 15:08 ` Avi Kivity
2009-01-09 2:50 ` Sheng Yang
2009-01-09 18:06 ` Avi Kivity
2009-01-10 11:12 ` Sheng Yang [this message]
2009-01-11 9:34 ` Avi Kivity
2009-01-10 12:28 ` Sheng Yang
2009-01-11 9:38 ` Avi Kivity
2009-01-12 6:53 ` Sheng Yang
2009-01-11 9:40 ` Avi Kivity
2009-01-08 10:45 ` [PATCH 2/7] KVM: Using gsi route for MSI device assignment Sheng Yang
2009-01-08 15:11 ` Avi Kivity
2009-01-08 10:45 ` [PATCH 3/7] KVM: Improve MSI dispatch function Sheng Yang
2009-01-08 10:45 ` [PATCH 4/7] KVM: Using ioapic_irqchip() macro for kvm_set_irq Sheng Yang
2009-01-08 10:45 ` [PATCH 5/7] KVM: Merge MSI handling to kvm_set_irq Sheng Yang
2009-01-08 10:45 ` [PATCH 6/7] KVM: Split IOAPIC structure Sheng Yang
2009-01-08 15:27 ` Marcelo Tosatti
2009-01-09 5:55 ` Sheng Yang
2009-01-08 10:45 ` [PATCH 7/7] KVM: Unified the delivery of IOAPIC and MSI Sheng Yang
-- strict thread matches above, loose matches on Subject: below --
2009-01-13 9:58 [PATCH 0/7][v6] GSI route layer for MSI/MSI-X Sheng Yang
2009-01-13 9:58 ` [PATCH 1/7] KVM: Add a route layer to convert MSI message to GSI 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=20090110111214.GA14678@yukikaze \
--to=yasker@gmail.com \
--cc=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
--cc=sheng@linux.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 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.