From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54148) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WxkfO-0003Hv-6p for qemu-devel@nongnu.org; Thu, 19 Jun 2014 18:18:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WxkfJ-0001yD-9T for qemu-devel@nongnu.org; Thu, 19 Jun 2014 18:18:46 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46779) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WxkfJ-0001xn-1L for qemu-devel@nongnu.org; Thu, 19 Jun 2014 18:18:41 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s5JMIehl016745 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 19 Jun 2014 18:18:40 -0400 Message-ID: <53A361BE.2060209@redhat.com> Date: Thu, 19 Jun 2014 16:18:38 -0600 From: Eric Blake MIME-Version: 1.0 References: <1401972839-25213-1-git-send-email-pbonzini@redhat.com> <1401972839-25213-2-git-send-email-pbonzini@redhat.com> In-Reply-To: <1401972839-25213-2-git-send-email-pbonzini@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="pKJLFeqwUjh4owqjIs0nSrmObDpOFlt5d" Subject: Re: [Qemu-devel] [PATCH v2 1/2] vl: allow other threads to do qemu_system_vmstop_request List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , qemu-devel@nongnu.org Cc: kwolf@redhat.com, famz@redhat.com, stefanha@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --pKJLFeqwUjh4owqjIs0nSrmObDpOFlt5d Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 06/05/2014 06:53 AM, Paolo Bonzini wrote: > There patch protects vmstop_requested with a lock and introduces s/There/This/ ? > qemu_system_vmstop_request_prepare. >=20 > Together with the new call to qemu_vmstop_requested in vm_start, > qemu_system_vmstop_request_prepare avoids a race where the VM could rem= ain > stopped even though the iostatus of a block device has already been set= > (for example). >=20 > qemu_system_vmstop_request_prepare however also lets the caller thread > delay observation of the state change until it has itself communicated > that change to the user. This delay avoids any possibility of a wrong > reordering of the BLOCK_IO_ERROR event and the subsequent STOP event. >=20 > Signed-off-by: Paolo Bonzini > --- > cpus.c | 1 + > include/sysemu/sysemu.h | 1 + > target-lm32/op_helper.c | 2 +- > vl.c | 85 +++++++++++++++++++++++++++++++----------= -------- > 4 files changed, 57 insertions(+), 32 deletions(-) >=20 Not my area of code expertise, so take this with a grain of salt: Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --pKJLFeqwUjh4owqjIs0nSrmObDpOFlt5d Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJTo2G+AAoJEKeha0olJ0NqmJkH/1C6hmJeU5U1WCWxG6Eu06iv 6rkiwJ8tTt+ZP4yX8i9nK3VWzaqZ+HjxigGoacEHOwG0ujqGs+BCF3Lk9l/Jjrq5 YoOO32nA4ACmRQvWbaFlwrcA4xNR0GxqZTeniT6KcYuIsERoaJUr7AtcsKeAZMUG Myxiog3Yqp63k+pZZ/FEcKS1sDn2y4hKMGDfn7xeVDL0Jh5gVxgL0GdbEuw3DU/r bwgAEznBCqJg6SkKbMUbs2VnwJIHx5u5SUjoM0669X7ojGRetIy85QqeTNRdcoEb tbQjT2ad7om9y9GDULRCOgpGEN2doq4xz+4vp0Qh8H+NMGwlfz1w/Qi7FLn6r38= =fSNi -----END PGP SIGNATURE----- --pKJLFeqwUjh4owqjIs0nSrmObDpOFlt5d--