All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Andreas Färber" <afaerber@suse.de>
To: Cole Robinson <crobinso@redhat.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
	qemu-ppc <qemu-ppc@nongnu.org>,
	qemu-devel@nongnu.org, Alexander Graf <agraf@suse.de>
Subject: Re: [Qemu-devel] [PATCH] target-arm: Implement qmp query-cpu-definitions
Date: Thu, 05 Sep 2013 17:02:35 +0200	[thread overview]
Message-ID: <52289D0B.8080906@suse.de> (raw)
In-Reply-To: <c0bdcd6c7ea6a085a6902ccaa73180fd771c8267.1378303555.git.crobinso@redhat.com>

Hi,

Am 04.09.2013 17:23, schrieb Cole Robinson:
> Libvirt uses this to introspect available CPU models.
> 
> Signed-off-by: Cole Robinson <crobinso@redhat.com>
> ---
> Maybe this will be centrally handled after the QOM CPU work is done?

No, this API is about a pre-QOM command line switch, whose
implementation is target-specific. What got standardized for multiple
targets was the CPUClass::class_by_name() hook for the opposite
direction of -cpu to ObjectClass lookup (with the goal of obsoleting
cpu_init()). It is not wrong to implement query-cpus for arm, but -cpu
is considered deprecated.

And personally especially for arm I would rather welcome someone
contributing a proper, e.g., Raspberry Pi board (with clean separation
of what is on the SoC and what on the board to avoid duplication among
boards) than tweaking some other unrelated board with -cpu and then
complaining that it doesn't work as expected. ;) For machines that use
soft-core CPUs (FPGAs) or for mach-virt as non-physical machine it does
make sense, but query-cpus gives us a list irrespective of whether they
are compatible with the board. Same for ppc btw - plugging, e.g., a 440
CPU into pseries or mac99 won't work.
Short-term my view is to use fixed CPU types, ignoring -cpu, where the
CPU cannot be exchanged (e.g., DIGIC patch series) and a suitable link<>
type otherwise.

The long-term goal is to have machines be config files (thereby
user-creatable) assembling QOM objects by specifying memory mapping and
IRQ routing. The latter two parts don't work with the old qdev and
SysBusDevice APIs.

That said, patch itself looks correct,

Reviewed-by: Andreas Färber <afaerber@suse.de>

Regards,
Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

  reply	other threads:[~2013-09-05 15:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-04 15:23 [Qemu-devel] [PATCH] target-arm: Implement qmp query-cpu-definitions Cole Robinson
2013-09-05 15:02 ` Andreas Färber [this message]
2013-09-05 17:09 ` Peter Maydell

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=52289D0B.8080906@suse.de \
    --to=afaerber@suse.de \
    --cc=agraf@suse.de \
    --cc=crobinso@redhat.com \
    --cc=peter.maydell@linaro.org \
    --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.