[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC][PATCH 08/45] Introduce MSIMessage structure
From: |
Michael S. Tsirkin |
Subject: |
Re: [Qemu-devel] [RFC][PATCH 08/45] Introduce MSIMessage structure |
Date: |
Mon, 17 Oct 2011 15:01:46 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Mon, Oct 17, 2011 at 02:09:46PM +0200, Jan Kiszka wrote:
> On 2011-10-17 14:04, Michael S. Tsirkin wrote:
> > On Mon, Oct 17, 2011 at 01:51:00PM +0200, Jan Kiszka wrote:
> >> On 2011-10-17 13:46, Michael S. Tsirkin wrote:
> >>> On Mon, Oct 17, 2011 at 11:27:42AM +0200, Jan Kiszka wrote:
> >>>> Will be used for generating and distributing MSI messages, both in
> >>>> emulation mode and under KVM.
> >>>>
> >>>> Signed-off-by: Jan Kiszka <address@hidden>
> >>>
> >>> I would add
> >>>
> >>> uint64_t msix_get_address(dev, vector)
> >>> uint64_t msix_get_data(dev, vector)
> >>>
> >>> and same for msi.
> >>>
> >>> this would minimise the changes while still making it
> >>> possible to avoid code duplication in kvm.
> >>
> >> I'm introducing msi[x]_message_from_vector for that purpose later on. Or
> >> what do you mean?
> >>
> >> Jan
> >
> > It does not look like everyone actually wants the structure,
> > users seem to put it on stack and then immediately
> > unwrap it to get at the address/data.
> > So two accessorts get_data + get_address instead of one, will
> > remove the need to rework all code to use the structure.
>
> The idea of this patch is to start handling MSI messages as a single
> blob. There should be no need to ask a device for parts of that blobs
> this way.
There should be no need to look at the message at all.
devices really only care about vector numbers.
So we are left with msix.c msi.c and kvm as the only users.
kvm has a cache of messages so it needs a struct of these,
msix/msi don't.
> If you see use cases in this series, though, let me know.
>
> Jan
Yes, I see them. msix_notify is one example. msi_notify is another.
E.g. msi_notify would IMO look nicer as:
stl_le_phys(msi_get_address(dev, vector), msi_get_data(dev, vector));
> --
> Siemens AG, Corporate Technology, CT T DE IT 1
> Corporate Competence Center Embedded Linux
- [Qemu-devel] [RFC][PATCH 04/45] msi: Invoke msi/msix_reset from PCI core, (continued)
- [Qemu-devel] [RFC][PATCH 04/45] msi: Invoke msi/msix_reset from PCI core, Jan Kiszka, 2011/10/17
- [Qemu-devel] [RFC][PATCH 25/45] qemu-kvm: Update MSI cache on kvm_msi_irqfd_set, Jan Kiszka, 2011/10/17
- [Qemu-devel] [RFC][PATCH 20/45] qemu-kvm: msix: Only invoke msix_handle_mask_update on changes, Jan Kiszka, 2011/10/17
- [Qemu-devel] [RFC][PATCH 14/45] qemu-kvm: Drop useless kvm_clear_gsi_routes, Jan Kiszka, 2011/10/17
- [Qemu-devel] [RFC][PATCH 34/45] qemu-kvm: Factor out kvm_device_msi_assign, Jan Kiszka, 2011/10/17
- [Qemu-devel] [RFC][PATCH 08/45] Introduce MSIMessage structure, Jan Kiszka, 2011/10/17
[Qemu-devel] [RFC][PATCH 16/45] qemu-kvm: Use MSIMessage and MSIRoutingCache, Jan Kiszka, 2011/10/17
[Qemu-devel] [RFC][PATCH 12/45] msi: Introduce MSIRoutingCache, Jan Kiszka, 2011/10/17
Re: [Qemu-devel] [RFC][PATCH 12/45] msi: Introduce MSIRoutingCache, Michael S. Tsirkin, 2011/10/17
Re: [Qemu-devel] [RFC][PATCH 12/45] msi: Introduce MSIRoutingCache, Jan Kiszka, 2011/10/18