All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexey Kardashevskiy <aik@ozlabs.ru>
To: Alexander Graf <agraf@suse.de>
Cc: "qemu-ppc@nongnu.org" <qemu-ppc@nongnu.org>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	David Gibson <david@gibson.dropbear.id.au>
Subject: Re: [Qemu-devel] [PATCH qemu] qemu-options: Add documentation about PPC64's "-cpu compat" option
Date: Wed, 08 Apr 2015 17:41:37 +1000	[thread overview]
Message-ID: <5524DBB1.5000304@ozlabs.ru> (raw)
In-Reply-To: <5BA6838F-B136-4DB9-8954-8CC21F64B35C@suse.de>

On 04/08/2015 04:29 PM, Alexander Graf wrote:
>
>
>
>> Am 08.04.2015 um 03:45 schrieb Alexey Kardashevskiy <aik@ozlabs.ru>:
>>
>>> 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.
>>>>
>>>> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
>>>> ---
>>>>   qemu-options.hx | 11 ++++++++++-
>>>>   1 file changed, 10 insertions(+), 1 deletion(-)
>>>>
>>>> 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=MODE]\n"
>>>> +    "                select CPU ('-cpu help' for list)\n"
>>>> +    "                compat= processor compatibility mode (PPC64 only)\n",
>>>> +        QEMU_ARCH_ALL)
>>>
>>> Shouldn't there be a way to show this only for the ppc64 target?
>>
>>
>> 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.
>
> Please dig again :).


Ok. I did. I can do as below. QEMU shows different things on "-help" on PPC 
and x86_64. But qemu-doc.html has 2 entries for "-cpu" and it does not 
mention architecture per "-cpu" instance there (unless I keep the original 
"(PPC64 only)" which I find rather ugly):

===
    -cpu model
           Select CPU model (-cpu help for list and additional feature 
selection)

    -cpu model
           Select CPU model (-cpu help for list and additional feature 
selection)

         compat=power6|power7|power8
                 Enables architecture compatibility mode. "power6" enables 
PowerISA 2.05, "power7" - 2.06, "power8" - 2.07.

====


For the sake of a nice looking html, I would stick to the original patch 
but since you seem to know this stuff better, any help is very appreciated :)




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)

  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 selection)
  ETEXI

+DEF("cpu", HAS_ARG, QEMU_OPTION_cpu_ppc,
+    "-cpu cpu,[compat=MODE]\n"
+    "                select CPU ('-cpu help' for list)\n"
+    "                compat= 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 selection)
+@table @option
+@item compat=power6|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=]n[,maxcpus=cpus][,cores=cores][,threads=threads][,sockets=sockets]\n"
      "                set the number of CPUs to 'n' [default=1]\n"



-- 
Alexey

  reply	other threads:[~2015-04-08  7:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-02  6:26 [Qemu-devel] [PATCH qemu] qemu-options: Add documentation about PPC64's "-cpu compat" option Alexey Kardashevskiy
2015-04-07 20:43 ` Alexander Graf
2015-04-08  1:45   ` Alexey Kardashevskiy
2015-04-08  6:29     ` Alexander Graf
2015-04-08  7:41       ` Alexey Kardashevskiy [this message]
2015-04-08  7:46         ` Alexander Graf
2015-04-08  9:33           ` [Qemu-devel] [PATCH qemu v2] " Alexey Kardashevskiy
2015-04-10  2:16             ` David Gibson
2015-04-28  7:25               ` Alexey Kardashevskiy
2015-04-29  1:47                 ` David Gibson
2015-04-08  2:49 ` [Qemu-devel] [PATCH qemu] " David Gibson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5524DBB1.5000304@ozlabs.ru \
    --to=aik@ozlabs.ru \
    --cc=agraf@suse.de \
    --cc=david@gibson.dropbear.id.au \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.