From: Pekka Enberg <penberg@kernel.org>
To: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: Sasha Levin <levinsasha928@gmail.com>,
kvm@vger.kernel.org, mingo@elte.hu, asias.hejun@gmail.com,
prasadjoshi124@gmail.com
Subject: Re: [PATCH 3/4] kvm tools: Add a void ptr to be passed to mmio callback
Date: Thu, 28 Jul 2011 12:43:46 +0300 [thread overview]
Message-ID: <CAOJsxLH1shsF1SNmnB2uEpkPxji46P+gTK_SAnpv1hB-LF7kqA@mail.gmail.com> (raw)
In-Reply-To: <20110728094241.GK27137@sun>
On Thu, Jul 28, 2011 at 12:42 PM, Cyrill Gorcunov <gorcunov@gmail.com> wrote:
> On Thu, Jul 28, 2011 at 12:01:54PM +0300, Sasha Levin wrote:
> ...
>>
>> struct mmio_mapping {
>> struct rb_int_node node;
>> - void (*kvm_mmio_callback_fn)(u64 addr, u8 *data, u32 len, u8 is_write);
>> + void (*kvm_mmio_callback_fn)(u64 addr, u8 *data, u32 len, u8 is_write, void *ptr);
>> + void *ptr;
>> };
>
> I guess no need to name it *that* long, probably simple
>
> struct mmio_mapping {
> struct rb_int_node node;
> void (*mmio_fn)(u64 addr, u8 *data, u32 len, u8 is_write, void *ptr);
> void *ptr;
> };
> ...
>>
>> if (mmio)
>> - mmio->kvm_mmio_callback_fn(phys_addr, data, len, is_write);
>> + mmio->kvm_mmio_callback_fn(phys_addr, data, len, is_write, mmio->ptr);
>
> So this would be
>
> if (mmio)
> mmio->mmio_fn(phys_addr, data, len, is_write, mmio->ptr);
>
> no?
Makes sense, yes.
next prev parent reply other threads:[~2011-07-28 9:43 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-28 9:01 [PATCH 1/4] kvm tools: Use GSI routing Sasha Levin
2011-07-28 9:01 ` [PATCH 2/4] kvm tools: Fix PCI probing Sasha Levin
2011-07-28 9:31 ` Pekka Enberg
2011-07-28 9:38 ` Cyrill Gorcunov
2011-07-28 9:43 ` Pekka Enberg
2011-07-28 9:01 ` [PATCH 3/4] kvm tools: Add a void ptr to be passed to mmio callback Sasha Levin
2011-07-28 9:42 ` Cyrill Gorcunov
2011-07-28 9:43 ` Pekka Enberg [this message]
2011-07-28 9:01 ` [PATCH 4/4] kvm tools: Implement MSI-X for virtio-rng Sasha Levin
2011-07-28 9:33 ` Pekka Enberg
2011-07-28 9:27 ` [PATCH 1/4] kvm tools: Use GSI routing Pekka Enberg
2011-07-28 9:43 ` Cyrill Gorcunov
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=CAOJsxLH1shsF1SNmnB2uEpkPxji46P+gTK_SAnpv1hB-LF7kqA@mail.gmail.com \
--to=penberg@kernel.org \
--cc=asias.hejun@gmail.com \
--cc=gorcunov@gmail.com \
--cc=kvm@vger.kernel.org \
--cc=levinsasha928@gmail.com \
--cc=mingo@elte.hu \
--cc=prasadjoshi124@gmail.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.