From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33281) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aNUM5-0006QC-Pd for qemu-devel@nongnu.org; Sun, 24 Jan 2016 18:46:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aNUM1-0000rO-VL for qemu-devel@nongnu.org; Sun, 24 Jan 2016 18:46:01 -0500 Date: Mon, 25 Jan 2016 10:24:24 +1100 From: David Gibson Message-ID: <20160124232424.GS27454@voom.redhat.com> References: <1453581610-23179-1-git-send-email-hpoussin@reactos.org> <1453581610-23179-7-git-send-email-hpoussin@reactos.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="XMM+kVNHGkMezEqK" Content-Disposition: inline In-Reply-To: <1453581610-23179-7-git-send-email-hpoussin@reactos.org> Subject: Re: [Qemu-devel] [PATCH 06/13] cuda: port POWERDOWN 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 --XMM+kVNHGkMezEqK Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Jan 23, 2016 at 09:40:03PM +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 9af8e1d..df4797f 100644 > --- a/hw/misc/macio/cuda.c > +++ b/hw/misc/macio/cuda.c > @@ -601,10 +601,23 @@ static bool cuda_cmd_set_device_list(CUDAState *s, > return true; > } > =20 > +static bool cuda_cmd_powerdown(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_shutdown_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 }, > }; > =20 > static void cuda_receive_packet(CUDAState *s, > @@ -656,10 +669,6 @@ static void cuda_receive_packet(CUDAState *s, > case CUDA_SET_POWER_MESSAGES: > cuda_send_packet_to_host(s, obuf, 3); > return; > - case CUDA_POWERDOWN: > - cuda_send_packet_to_host(s, obuf, 3); > - qemu_system_shutdown_request(); > - return; > case CUDA_RESET_SYSTEM: > cuda_send_packet_to_host(s, obuf, 3); > qemu_system_reset_request(); --=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 --XMM+kVNHGkMezEqK Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJWpV0oAAoJEGw4ysog2bOSJM0P/2NoPEY7t9ObogQvBPWbekiL +QBipmGpUzjQVjQKwPeu6vZNLjE9SdrWR6PJL10nWnpI6PmcwShTvQNttfnH7Nka a3a5T4iFnCC/mplb++bnusw6J4KiJb3aFESEwBr1orll54aCuyWtedSlhRxMksIU g2pKJmxreCuPa0XxLaV590ZPtWotlZVY/+TNLKvFkGLpEciutmgmIEHkODSfj4Bz UKBe/lH2fShQ8SPnCidX6WgXIXqut9JgQiK5/3DOTj2fNNvUUGEDCUqOwpSdAaJR zX9NrQLoOR/6dFV4vDDAtYY0j65R1tfdDN8cc+D0ZC3LP43WEzbkIqAzw/sdgZ44 /KTjdO625Omj4aNJdIB3z00vaXV6mfZQWYjmJFTsRibKxKROxIIx9h48qOQNmhsJ qI4qsYgw46Hu4Kgx0oPaxRwKN3iOZKOJJfxWgkMj6fbY4HYtvuP5imtA0aqIl/LL PQUMzO7TXG1YoWek3s23esS1IShD7sa0HT3Kp5KXtdmfg3gwH4L50LQ9OIu7Y39X h1lZIpokJnWhjw5Ra4u7lWf8vNF7P1rPzDfJkr7mw5JwsEFmvJBpL4J0Pdy6b0Y+ NuzAU2EdsJRlYiQ72QCOi2IfYQop0jDTdqe8YzPSv/lkZrtnKNCA4EE+Q5/RBMgN 7yEsfhgHwrsRMPHdHuiN =30lI -----END PGP SIGNATURE----- --XMM+kVNHGkMezEqK--