From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christian Ehrhardt Date: Wed, 06 Feb 2008 11:25:38 +0000 Subject: Re: [kvm-ppc-devel] [PATCH] Add print for PowerPC qemu for failed Message-Id: <47A99932.3050009@linux.vnet.ibm.com> List-Id: References: <4bbbf98ebf05ef77dbb6.1202249218@thinkpad.austin.ibm.com> In-Reply-To: <4bbbf98ebf05ef77dbb6.1202249218-Zv899e0YUSbPQpwDFJZrxKsjOiXwFzmk@public.gmane.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: Jerone Young Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, kvm-ppc-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org hi Jerone, I think this is good for debugging to find unsupported hardware, but it sho= uld not be enabled by default (you could get a printf storm if a guest work= load does stupid things). Maybe qemu has some debug/verbose options you can= use. And additionally it would be useful for the dcr_write patch to print the va= lue it tried to write. I also don't know if we really need that caps-locked in the output. Jerone Young wrote: > # HG changeset patch > # User Jerone Young > # Date 1202249136 21600 > # Node ID 4bbbf98ebf05ef77dbb68e2131b3bc0764767c99 > # Parent f8cab6a29bf3f34f1cbf4d1e6d7bd21809fd4184 > Add print for PowerPC qemu for failed DCR read/writes >=20 > This patch adds a print to notify of failed reads and rights. Currently > we will still ignore them (until development is fully done). But this mak= es > them easier to spot. >=20 > Signed-off-by: Jerone Young >=20 > diff --git a/qemu/qemu-kvm-powerpc.c b/qemu/qemu-kvm-powerpc.c > --- a/qemu/qemu-kvm-powerpc.c > +++ b/qemu/qemu-kvm-powerpc.c > @@ -178,13 +178,17 @@ int handle_powerpc_dcr_read(int vcpu, ui > int handle_powerpc_dcr_read(int vcpu, uint32_t dcrn, uint32_t *data) > { > CPUState *env =3D cpu_single_env; > - ppc_dcr_read(env->dcr_env, dcrn, data); > + if (ppc_dcr_read(env->dcr_env, dcrn, data) < 0) > + printf("DCR FAILED on READ at 0x%x\n", dcrn); > +=20 > return 0; /* XXX ignore failed DCR ops */ > } >=20 > int handle_powerpc_dcr_write(int vcpu, uint32_t dcrn, uint32_t data) > { > CPUState *env =3D cpu_single_env; > - ppc_dcr_write(env->dcr_env, dcrn, data); > + if (ppc_dcr_write(env->dcr_env, dcrn, data) < 0) > + printf("DCR FAILED on WRITE at 0x%x\n", dcrn); just a suggestion printf("%s - failed writing 0x%x @ 0x%x\n", dcrn, data); > + > return 0; /* XXX ignore failed DCR ops */ > } >=20 > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > kvm-ppc-devel mailing list > kvm-ppc-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/kvm-ppc-devel --=20 Gr=FCsse / regards,=20 Christian Ehrhardt IBM Linux Technology Center, Open Virtualization ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ kvm-ppc-devel mailing list kvm-ppc-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-ppc-devel