From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=40026 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PTAY5-0006Ip-1V for qemu-devel@nongnu.org; Thu, 16 Dec 2010 04:54:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PTAY3-0001ky-30 for qemu-devel@nongnu.org; Thu, 16 Dec 2010 04:54:56 -0500 Received: from mx1.redhat.com ([209.132.183.28]:58207) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PTAY2-0001kq-Re for qemu-devel@nongnu.org; Thu, 16 Dec 2010 04:54:55 -0500 Date: Thu, 16 Dec 2010 11:54:18 +0200 From: "Michael S. Tsirkin" Message-ID: <20101216095418.GC19495@redhat.com> References: <1290665220-26478-1-git-send-email-tamura.yoshiaki@lab.ntt.co.jp> <1290665220-26478-12-git-send-email-tamura.yoshiaki@lab.ntt.co.jp> <20101128094057.GD3342@redhat.com> <20101216092241.GA19495@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] Re: [PATCH 11/21] ioport: insert event_tap_ioport() to ioport_write(). List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Yoshiaki Tamura Cc: aliguori@us.ibm.com, dlaor@redhat.com, ananth@in.ibm.com, kvm@vger.kernel.org, ohmura.kei@lab.ntt.co.jp, mtosatti@redhat.com, qemu-devel@nongnu.org, vatsa@linux.vnet.ibm.com, avi@redhat.com, psuriset@linux.vnet.ibm.com, stefanha@linux.vnet.ibm.com On Thu, Dec 16, 2010 at 06:50:04PM +0900, Yoshiaki Tamura wrote: > 2010/12/16 Michael S. Tsirkin : > > On Thu, Dec 16, 2010 at 04:37:41PM +0900, Yoshiaki Tamura wrote: > >> 2010/11/28 Yoshiaki Tamura : > >> > 2010/11/28 Michael S. Tsirkin : > >> >> On Thu, Nov 25, 2010 at 03:06:50PM +0900, Yoshiaki Tamura wrote: > >> >>> Record ioport event to replay it upon failover. > >> >>> > >> >>> Signed-off-by: Yoshiaki Tamura > >> >> > >> >> Interesting. This will have to be extended to support ioeventfd. > >> >> Since each eventfd is really just a binary trigger > >> >> it should be enough to read out the fd state. > >> > > >> > Haven't thought about eventfd yet. =A0Will try doing it in the nex= t > >> > spin. > >> > >> Hi Michael, > >> > >> I looked into eventfd and realized it's only used with vhost now. > > > > There are patches on list to use it for block/userspace net. >=20 > Thanks. Now I understand. > In that case, inserting an even-tap function to the following code > should be appropriate? >=20 > int event_notifier_test_and_clear(EventNotifier *e) > { > uint64_t value; > int r =3D read(e->fd, &value, sizeof(value)); > return r =3D=3D sizeof(value); > } Possibly. > > > >> =A0However, I > >> believe vhost bypass the net layer in qemu, and there is no way for = Kemari to > >> detect the outputs. Then maybe you should check for this combination and either disable vhost-net on the backend when kemari is active or fail. > >> =A0To me, it doesn't make sense to extend this patch to > >> support eventfd... > >> Thanks, > >> > >> Yoshi > >> > >> > > >> > Yoshi > >> > > >> >> > >> >>> --- > >> >>> =A0ioport.c | =A0 =A02 ++ > >> >>> =A01 files changed, 2 insertions(+), 0 deletions(-) > >> >>> > >> >>> diff --git a/ioport.c b/ioport.c > >> >>> index aa4188a..74aebf5 100644 > >> >>> --- a/ioport.c > >> >>> +++ b/ioport.c > >> >>> @@ -27,6 +27,7 @@ > >> >>> > >> >>> =A0#include "ioport.h" > >> >>> =A0#include "trace.h" > >> >>> +#include "event-tap.h" > >> >>> > >> >>> =A0/***********************************************************/ > >> >>> =A0/* IO Port */ > >> >>> @@ -76,6 +77,7 @@ static void ioport_write(int index, uint32_t a= ddress, uint32_t data) > >> >>> =A0 =A0 =A0 =A0 =A0default_ioport_writel > >> >>> =A0 =A0 =A0}; > >> >>> =A0 =A0 =A0IOPortWriteFunc *func =3D ioport_write_table[index][a= ddress]; > >> >>> + =A0 =A0event_tap_ioport(index, address, data); > >> >>> =A0 =A0 =A0if (!func) > >> >>> =A0 =A0 =A0 =A0 =A0func =3D default_func[index]; > >> >>> =A0 =A0 =A0func(ioport_opaque[address], address, data); > >> >>> -- > >> >>> 1.7.1.2 > >> >>> > >> >>> -- > >> >>> To unsubscribe from this list: send the line "unsubscribe kvm" i= n > >> >>> the body of a message to majordomo@vger.kernel.org > >> >>> More majordomo info at =A0http://vger.kernel.org/majordomo-info.= html > >> >> -- > >> >> To unsubscribe from this list: send the line "unsubscribe kvm" in > >> >> the body of a message to majordomo@vger.kernel.org > >> >> More majordomo info at =A0http://vger.kernel.org/majordomo-info.h= tml > >> >> > >> > > > -- > > To unsubscribe from this list: send the line "unsubscribe kvm" in > > the body of a message to majordomo@vger.kernel.org > > More majordomo info at =A0http://vger.kernel.org/majordomo-info.html > >