Received: from eggs.gnu.org ([2001:4830:134:3::10]:50412) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yfkgw-0002Aj-UE for qemu-devel@nongnu.org; Wed, 08 Apr 2015 03:46:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yfkgt-0003zC-Gd for qemu-devel@nongnu.org; Wed, 08 Apr 2015 03:46:30 -0400 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) From: Alexander Graf In-Reply-To: <5524DBB1.5000304@ozlabs.ru> Date: Wed, 8 Apr 2015 09:46:24 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <76160645-F63F-4D9E-A228-ECDB92C56CC3@suse.de> References: <1427955971-8895-1-git-send-email-aik@ozlabs.ru> <55244161.2070208@suse.de> <55248851.70009@ozlabs.ru> <5BA6838F-B136-4DB9-8954-8CC21F64B35C@suse.de> <5524DBB1.5000304@ozlabs.ru> Subject: Re: [Qemu-devel] [PATCH qemu] qemu-options: Add documentation about PPC64's "-cpu compat" option List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexey Kardashevskiy Cc: "qemu-ppc@nongnu.org" , "qemu-devel@nongnu.org" , David Gibson > Am 08.04.2015 um 09:41 schrieb Alexey Kardashevskiy : >=20 >> On 04/08/2015 04:29 PM, Alexander Graf wrote: >>=20 >>=20 >>=20 >>>> Am 08.04.2015 um 03:45 schrieb Alexey Kardashevskiy : >>>>=20 >>>>> On 04/08/2015 06:43 AM, Alexander Graf wrote: >>>>> On 04/02/2015 08:26 AM, Alexey Kardashevskiy wrote: >>>>> Since 8dfa3a5e "target-ppc: Add "compat" CPU option" (which was a part= of >>>>> client-architecture-support patchset) there is a "compat" option >>>>> of "-cpu". However it was not documented at all and this is what this >>>>> patch is trying to do. >>>>>=20 >>>>> Signed-off-by: Alexey Kardashevskiy >>>>> --- >>>>> qemu-options.hx | 11 ++++++++++- >>>>> 1 file changed, 10 insertions(+), 1 deletion(-) >>>>>=20 >>>>> diff --git a/qemu-options.hx b/qemu-options.hx >>>>> index c513352..bd15214 100644 >>>>> --- a/qemu-options.hx >>>>> +++ b/qemu-options.hx >>>>> @@ -84,11 +84,20 @@ HXCOMM Deprecated by -machine >>>>> DEF("M", HAS_ARG, QEMU_OPTION_M, "", QEMU_ARCH_ALL) >>>>> DEF("cpu", HAS_ARG, QEMU_OPTION_cpu, >>>>> - "-cpu cpu select CPU ('-cpu help' for list)\n", QEMU_ARCH_= ALL) >>>>> + "-cpu cpu,[compat=3DMODE]\n" >>>>> + " select CPU ('-cpu help' for list)\n" >>>>> + " compat=3D processor compatibility mode (PPC64 on= ly)\n", >>>>> + QEMU_ARCH_ALL) >>>>=20 >>>> Shouldn't there be a way to show this only for the ppc64 target? >>>=20 >>>=20 >>> I do not really know, I did not dig deep. I just saw "Intel IOMMU (VT-d)= " in "qemu-system-ppc64 --help" output and concluded there is no easy way. >>=20 >> Please dig again :). >=20 >=20 > Ok. I did. I can do as below. QEMU shows different things on "-help" on PP= C and x86_64. But qemu-doc.html has 2 entries for "-cpu" and it does not men= tion architecture per "-cpu" instance there (unless I keep the original "(PP= C64 only)" which I find rather ugly): Can you find some way to only extend the arch_all message with a ppc specifi= c def? Maybe restructure the layout? Alex >=20 > =3D=3D=3D > -cpu model > Select CPU model (-cpu help for list and additional feature selec= tion) >=20 > -cpu model > Select CPU model (-cpu help for list and additional feature selec= tion) >=20 > compat=3Dpower6|power7|power8 > Enables architecture compatibility mode. "power6" enables P= owerISA 2.05, "power7" - 2.06, "power8" - 2.07. >=20 > =3D=3D=3D=3D >=20 >=20 > For the sake of a nice looking html, I would stick to the original patch b= ut since you seem to know this stuff better, any help is very appreciated :)= >=20 >=20 >=20 >=20 > diff --git a/qemu-options.hx b/qemu-options.hx > index c513352..428359a 100644 > --- a/qemu-options.hx > +++ b/qemu-options.hx > @@ -84,13 +84,30 @@ HXCOMM Deprecated by -machine > DEF("M", HAS_ARG, QEMU_OPTION_M, "", QEMU_ARCH_ALL) >=20 > DEF("cpu", HAS_ARG, QEMU_OPTION_cpu, > - "-cpu cpu select CPU ('-cpu help' for list)\n", QEMU_ARCH_ALL)= > + "-cpu cpu select CPU ('-cpu help' for list)\n", > + QEMU_ARCH_ALL & ~QEMU_ARCH_PPC) > STEXI > @item -cpu @var{model} > @findex -cpu > Select CPU model (@code{-cpu help} for list and additional feature selecti= on) > ETEXI >=20 > +DEF("cpu", HAS_ARG, QEMU_OPTION_cpu_ppc, > + "-cpu cpu,[compat=3DMODE]\n" > + " select CPU ('-cpu help' for list)\n" > + " compat=3D processor compatibility mode\n", > + QEMU_ARCH_PPC) > +STEXI > +@item -cpu @var{model} > +@findex -cpu > +Select CPU model (@code{-cpu help} for list and additional feature select= ion) > +@table @option > +@item compat=3Dpower6|power7|power8 > +Enables architecture compatibility mode. "power6" enables PowerISA 2.05, > +"power7" - 2.06, "power8" - 2.07. > +@end table > +ETEXI > + > DEF("smp", HAS_ARG, QEMU_OPTION_smp, > "-smp [cpus=3D]n[,maxcpus=3Dcpus][,cores=3Dcores][,threads=3Dthreads][= ,sockets=3Dsockets]\n" > " set the number of CPUs to 'n' [default=3D1]\n" >=20 >=20 >=20 > --=20 > Alexey