diff mbox

[qemu,v2] qemu-options: Add documentation about PPC64's "-cpu compat" option

Message ID 1428485601-26482-1-git-send-email-aik@ozlabs.ru
State New
Headers show

Commit Message

Alexey Kardashevskiy April 8, 2015, 9:33 a.m. UTC
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.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
---

After the patch:

[aik@vpl2 ~]$ ./qemu-system-ppc64 --help | grep -a2 -- "-cpu cpu"
-cpu cpu[,compat=power6|power7|power8]
                select CPU ('-cpu help' for list)
                compat= processor compatibility mode


ka1:/scratch/alexey/p/qemu-build/x86_x86_64$ ./x86_64-softmmu/qemu-system-x86_64 -help | grep -a2 -- "-cpu cpu"
-cpu cpu        select CPU ('-cpu help' for list)
-smp [cpus=]n[,maxcpus=cpus][,cores=cores][,threads=threads][,sockets=sockets]
                set the number of CPUs to 'n' [default=1]

qemu-doc.html:

-cpu model[,compat=mode]
    Select CPU model (-cpu help for list and additional feature selection)

    compat=power6|power7|power8
        Enables POWER architecture compatibility mode. ‘power6’ enables PowerISA 2.05-compatibility mode, ‘power7’ - 2.06, ‘power8’ - 2.07. ‘mode’ is only supported by a PPC64-pseries machine.



---
Changes:
v2:
* only show new option for PPC
---
 qemu-options.hx | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

Comments

David Gibson April 10, 2015, 2:16 a.m. UTC | #1
On Wed, Apr 08, 2015 at 07:33:21PM +1000, 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.
> 
> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>

I've updated the previous version in spapr-next.
diff mbox

Patch

diff --git a/qemu-options.hx b/qemu-options.hx
index c513352..5214798 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -84,11 +84,22 @@  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        select CPU ('-cpu help' for list)\n", QEMU_ARCH_ALL & ~QEMU_ARCH_PPC)
+DEF("cpu", HAS_ARG, QEMU_OPTION_cpu_ppc,
+    "-cpu cpu[,compat=power6|power7|power8]\n"
+    "                select CPU ('-cpu help' for list)\n"
+    "                compat= processor compatibility mode\n", QEMU_ARCH_PPC)
 STEXI
-@item -cpu @var{model}
+@item -cpu @var{model}[,compat=@var{mode}]
 @findex -cpu
 Select CPU model (@code{-cpu help} for list and additional feature selection)
+@table @option
+@item compat=power6|power7|power8
+Enables POWER architecture compatibility mode.
+@samp{power6} enables PowerISA 2.05-compatibility mode,
+@samp{power7} - 2.06, @samp{power8} - 2.07. @samp{mode} is only supported by
+a PPC64-pseries machine.
+@end table
 ETEXI
 
 DEF("smp", HAS_ARG, QEMU_OPTION_smp,