From: Pekka Enberg <penberg@iki.fi>
To: Ying-Shiuan Pan <yingshiuan.pan@gmail.com>
Cc: kvm@vger.kernel.org, yspan@itri.org.tw,
Asias He <asias.hejun@gmail.com>,
Sasha Levin <sasha.levin@oracle.com>,
Will Deacon <will.deacon@arm.com>,
Marc Zyngier <marc.zyngier@arm.com>
Subject: Re: [PATCH] kvm tools: virtio-mmio: init_ioeventfd should use MMIO for ioeventfd__add_event()
Date: Wed, 04 Sep 2013 12:21:26 +0300 [thread overview]
Message-ID: <5226FB96.1040001@iki.fi> (raw)
In-Reply-To: <1377871094-7253-1-git-send-email-yingshiuan.pan@gmail.com>
On 8/30/13 4:58 PM, Ying-Shiuan Pan wrote:
> From: Ying-Shiuan Pan <yingshiuan.pan@gmail.com>
>
> This patch fixes a bug that vtirtio_mmio_init_ioeventfd() passed a wrong
> value when it invoked ioeventfd__add_event(). True value of 2nd parameter
> indicates the eventfd uses PIO bus which is used by virito-pci, however,
> for virtio-mmio, the value should be false.
>
> Signed-off-by: Ying-Shiuan Pan <yspan@itri.org.tw>
Will, Marc? It would probably be good to change the two boolean
arguments into one "flags" argument to avoid future bugs.
> ---
> tools/kvm/virtio/mmio.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tools/kvm/virtio/mmio.c b/tools/kvm/virtio/mmio.c
> index afa2692..3838774 100644
> --- a/tools/kvm/virtio/mmio.c
> +++ b/tools/kvm/virtio/mmio.c
> @@ -55,10 +55,10 @@ static int virtio_mmio_init_ioeventfd(struct kvm *kvm,
> * Vhost will poll the eventfd in host kernel side,
> * no need to poll in userspace.
> */
> - err = ioeventfd__add_event(&ioevent, true, false);
> + err = ioeventfd__add_event(&ioevent, false, false);
> else
> /* Need to poll in userspace. */
> - err = ioeventfd__add_event(&ioevent, true, true);
> + err = ioeventfd__add_event(&ioevent, false, true);
> if (err)
> return err;
>
next prev parent reply other threads:[~2013-09-04 9:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-30 13:58 [PATCH] kvm tools: virtio-mmio: init_ioeventfd should use MMIO for ioeventfd__add_event() Ying-Shiuan Pan
2013-09-04 9:21 ` Pekka Enberg [this message]
2013-09-04 10:07 ` Will Deacon
2013-09-04 10:13 ` Pekka Enberg
2013-09-04 10:20 ` Will Deacon
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=5226FB96.1040001@iki.fi \
--to=penberg@iki.fi \
--cc=asias.hejun@gmail.com \
--cc=kvm@vger.kernel.org \
--cc=marc.zyngier@arm.com \
--cc=sasha.levin@oracle.com \
--cc=will.deacon@arm.com \
--cc=yingshiuan.pan@gmail.com \
--cc=yspan@itri.org.tw \
/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.