From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33201) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aNUM3-0006NX-T3 for qemu-devel@nongnu.org; Sun, 24 Jan 2016 18:46:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aNUM2-0000sD-GD for qemu-devel@nongnu.org; Sun, 24 Jan 2016 18:45:59 -0500 Date: Mon, 25 Jan 2016 10:24:58 +1100 From: David Gibson Message-ID: <20160124232458.GT27454@voom.redhat.com> References: <1453581610-23179-1-git-send-email-hpoussin@reactos.org> <1453581610-23179-8-git-send-email-hpoussin@reactos.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="PLOb/g6AMdJ1vPHZ" Content-Disposition: inline In-Reply-To: <1453581610-23179-8-git-send-email-hpoussin@reactos.org> Subject: Re: [Qemu-devel] [PATCH 07/13] cuda: port RESET_SYSTEM command to new framework List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?iso-8859-1?Q?Herv=E9?= Poussineau Cc: qemu-ppc@nongnu.org, Alyssa Milburn , Mark Cave-Ayland , qemu-devel@nongnu.org, Alexander Graf --PLOb/g6AMdJ1vPHZ Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Jan 23, 2016 at 09:40:04PM +0100, Herv=E9 Poussineau wrote: > Signed-off-by: Herv=E9 Poussineau Reviewed-by: David Gibson > --- > hw/misc/macio/cuda.c | 17 +++++++++++++---- > 1 file changed, 13 insertions(+), 4 deletions(-) >=20 > diff --git a/hw/misc/macio/cuda.c b/hw/misc/macio/cuda.c > index df4797f..70a5d0c 100644 > --- a/hw/misc/macio/cuda.c > +++ b/hw/misc/macio/cuda.c > @@ -613,11 +613,24 @@ static bool cuda_cmd_powerdown(CUDAState *s, > return true; > } > =20 > +static bool cuda_cmd_reset_system(CUDAState *s, > + const uint8_t *in_data, int in_len, > + uint8_t *out_data, int *out_len) > +{ > + if (in_len !=3D 0) { > + return false; > + } > + > + qemu_system_reset_request(); > + return true; > +} > + > static const CudaCommand handlers[] =3D { > { CUDA_AUTOPOLL, "AUTOPOLL", cuda_cmd_autopoll }, > { CUDA_SET_AUTO_RATE, "SET_AUTO_RATE", cuda_cmd_set_autorate }, > { CUDA_SET_DEVICE_LIST, "SET_DEVICE_LIST", cuda_cmd_set_device_list = }, > { CUDA_POWERDOWN, "POWERDOWN", cuda_cmd_powerdown }, > + { CUDA_RESET_SYSTEM, "RESET_SYSTEM", cuda_cmd_reset_system }, > }; > =20 > static void cuda_receive_packet(CUDAState *s, > @@ -669,10 +682,6 @@ static void cuda_receive_packet(CUDAState *s, > case CUDA_SET_POWER_MESSAGES: > cuda_send_packet_to_host(s, obuf, 3); > return; > - case CUDA_RESET_SYSTEM: > - cuda_send_packet_to_host(s, obuf, 3); > - qemu_system_reset_request(); > - return; > case CUDA_COMBINED_FORMAT_IIC: > obuf[0] =3D ERROR_PACKET; > obuf[1] =3D 0x5; --=20 David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson --PLOb/g6AMdJ1vPHZ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJWpV1KAAoJEGw4ysog2bOSBYQQAK1Uk65MxV3qywMd9VMBDMU0 iuWogO1YVk27v+YkrjIrhvMqTvbPIQ0xNxGxMephwlWCDA/lFJ3SS9clr7dbWvqP rJpogN7uKTi+fOHgHdhVFDW/hmjZ6ybhk0Y92Wc6i9vFdf78DaC5hNCGbFiTQrOD R+e07FLQPFyuhYyCIIxMMZSPIbS4P79kfcBGqAmgLI/Elcv+y+YquDjJRBNaia02 osxWoVjxcCEqhYVv4h8Xn4jl56rlQnYPamPvnhzKnQTPfCcMeTJkxb+rL8t6q4Ox JROTt9vMMN5DwG4i5LTM870w68vkdM0+nHUKKVIQ/TNd/dpnr/IoBw3b6qkk5saR wHgN0jeD5DU1m53WBERr3+KTcz71iAxeZhIr8vKw5C/IPleThZ4e2YBDoSKLtFXC mpQgtozQMGjjrWK61Zu8HfXwJLoB9BuKOUiliB8WMarKs369UVfd2ukJpbDkYzbS rjjTVCiRHfPJmSPpMDVirEmOGhycLigd24qdws8pgb3VlDE6mZP4GJhne9xgWw7k 5jWsdDPrfpi7RWyLGzJnQhqHK4y83ALiBIup5RoiveirX36Cys0t9w3GA4/r+hrp YLrNcYxVveqSPADc23McOeqKF5zSPKIeuxVyYtwQN4iMWNlSbgdLodmFFUDMGE1P /GfEQvcG22CbE2Nnf7qp =7N5T -----END PGP SIGNATURE----- --PLOb/g6AMdJ1vPHZ--