From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54936) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a0sNs-0007lW-Ke for qemu-devel@nongnu.org; Mon, 23 Nov 2015 09:46:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a0sNp-0001mK-BX for qemu-devel@nongnu.org; Mon, 23 Nov 2015 09:46:24 -0500 Received: from mx1.redhat.com ([209.132.183.28]:37803) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a0sNp-0001mG-4i for qemu-devel@nongnu.org; Mon, 23 Nov 2015 09:46:21 -0500 From: Markus Armbruster References: <87si401wpf.fsf@blackfin.pond.sub.org> <874mggo3yc.fsf@blackfin.pond.sub.org> <243512039.12566588.1448050691647.JavaMail.zimbra@redhat.com> <87oael587p.fsf@blackfin.pond.sub.org> <802808837.15238786.1448280956337.JavaMail.zimbra@redhat.com> <87r3jg26fw.fsf@blackfin.pond.sub.org> <1032710289.15307566.1448286512454.JavaMail.zimbra@redhat.com> <87610sx0zd.fsf@blackfin.pond.sub.org> <560475200.15358637.1448288207922.JavaMail.zimbra@redhat.com> Date: Mon, 23 Nov 2015 15:46:18 +0100 In-Reply-To: <560475200.15358637.1448288207922.JavaMail.zimbra@redhat.com> (=?utf-8?Q?=22Marc-Andr=C3=A9?= Lureau"'s message of "Mon, 23 Nov 2015 09:16:47 -0500 (EST)") Message-ID: <87mvu4srid.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] ivshmem property size should be a size, not a string List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?utf-8?Q?Marc-Andr=C3=A9?= Lureau Cc: marcandre lureau , Claudio Fontana , qemu-devel@nongnu.org, Luiz Capitulino Marc-Andr=C3=A9 Lureau writes: > Hi > > ----- Original Message ----- >> > >> > You can't migrate the peers. >>=20 >> Then explain the case N'=3D0 to me: how can you migrate the master so th= at >> it's connected to a server afterwards? > > Dest qemu: -incoming.. -chardev socket,path=3Ddest-server=20 > > That is, start your destination qemu with a destination server. The master > origin qemu will migrate the shared memory, and the dest memory will be s= ync > when the migration is done. Got it! >> > It works fine in the tests. Feel free to point out races or other issu= es. >>=20 >> I think I did: doorbell detection is inherently racy. >>=20 >> If you think it isn't, please refute my reasoning. > > I gave you some clues on how I did it in ivshmem-test.c: waiting for a > signature on the memory to be mapped (and also checking that peers > received ids) > >> If it's not broken, please explain to me how the guest should find out >> whether its ivshmem device sports a doorbell. > > If you have received ID, you should be good to use the doorbell. That's not a complete answer, so let me try a different tack. What value will a read of register IVPosition yield * if the device has no doorbell: I think the answer is -1. * if the device has a doorbell, but it isn't ready, yet: I think the answer is -1. * if the device has a doorbell, and it is ready. This is the part you answered already: >=3D 0. Please correct mistakes.