[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Querying possible -cpu variants
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] Querying possible -cpu variants |
Date: |
Fri, 25 Jan 2019 10:04:34 +0000 |
On Fri, 25 Jan 2019 at 09:59, Pavel Dovgalyuk <address@hidden> wrote:
> To fill the combo box in CPU selection form we run QEMU with "-cpu help"
> command and parse its
> output.
>
> The format of this list depends on target. Therefore our parsing code does
> not look good (and also
> may corrupt someday).
>
> Is there a better way of requesting this information?
Yes, and you list it below...
> Or we should do one of the following:
>
> 1. Patch all targets and make the uniform "-cpu help" output format
>
> 2. Add QMP command for requesting this list.
...you should use QMP. The whole point of that protocol is to
be a guaranteed-not-to-break-or-change-format machine readable
way to query properties of QEMU. Don't try to hand-parse
the human-readable help output, please.
thanks
-- PMM