All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrange" <berrange@redhat.com>
To: Eduardo Habkost <ehabkost@redhat.com>
Cc: libvir-list@redhat.com, "Alexander Graf" <agraf@suse.de>,
	qemu-devel@nongnu.org, "Igor Mammedov" <imammedo@redhat.com>,
	"Jiri Denemark" <jdenemar@redhat.com>,
	"Luiz Capitulino" <lcapitulino@redhat.com>,
	"Andreas Färber" <afaerber@suse.de>
Subject: Re: [Qemu-devel] libvirt<->QEMU interfaces for CPU models
Date: Mon, 4 Mar 2013 10:33:20 +0000	[thread overview]
Message-ID: <20130304103320.GC8123@redhat.com> (raw)
In-Reply-To: <20130301185818.GY8494@otherpad.lan.raisama.net>

On Fri, Mar 01, 2013 at 03:58:18PM -0300, Eduardo Habkost wrote:
> On Fri, Mar 01, 2013 at 07:31:46PM +0100, Andreas Färber wrote:
> > Am 01.03.2013 14:12, schrieb Jiri Denemark:
> > > On Thu, Feb 21, 2013 at 11:58:18 -0300, Eduardo Habkost wrote:
> > >> = Listing CPU models =
> > >>
> > >> Requirement: libvirt needs to know which CPU models are available to be used
> > >> with the "-cpu" option.
> > >>
> > >> Current problem: libvirt relies on help output parsing for that.
> > 
> > query-cpu-definitions is the QMP command to retrieve values compatible
> > with -cpu.
> > 
> > And if libvirt is not using it, I really don't understand why the work
> > of maintaining this crappy interface has been pushed onto us in the
> > first place? There is no reuse between -cpu ? and QMP implementations so
> > it's just extra work, there is no communicated or implemented way to
> > extend the arch_query_cpu_definitions() implementation to become more
> > usable for command line output implementation (e.g., associating a PVR
> > value with the model name for ppc) and, while we're at it, it uses
> > global functions plus a stub rather than a CPUState hook with a no-op
> > default implementation in qom/cpu.c...
> 
> I have the same questions you have.  :-)
> 
> But my main complaint about query-cpu-definitions is not about the
> implementation: it's that the interface was introduced without taking
> into account the requirements of libvirt regarding CPU features. It was
> found to be not appropriate for what libvirt needs[1], but somehow it
> got applied anyway.

The requirement at the time we did this was just to have a straight
adaptation of the stuff libvirt parsed from -help, into QMP format.
The query-cpu-definitions command served that purpose fine. It was
expected that some of this may be sub-optimal in the long term. This
is fine - we can either extend the existing data, or introduce brand
new commands to deal with the problems. The key thing was just to get
100% into the QMP world for capabilities at that time, and then iterate
to improve things.

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

  reply	other threads:[~2013-03-04 10:33 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20130221145818.GK16618@otherpad.lan.raisama.net>
2013-03-01 13:12 ` [Qemu-devel] libvirt<->QEMU interfaces for CPU models Jiri Denemark
2013-03-01 15:02   ` Eduardo Habkost
2013-03-01 22:56     ` Jiri Denemark
2013-03-25 20:37       ` Eduardo Habkost
2013-03-01 18:31   ` Andreas Färber
2013-03-01 18:34     ` Daniel P. Berrange
2013-03-01 19:01       ` Eduardo Habkost
2013-03-01 18:58     ` Eduardo Habkost
2013-03-04 10:33       ` Daniel P. Berrange [this message]
2013-03-01 13:28 ` Jiri Denemark
2013-03-01 15:31   ` Eduardo Habkost

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=20130304103320.GC8123@redhat.com \
    --to=berrange@redhat.com \
    --cc=afaerber@suse.de \
    --cc=agraf@suse.de \
    --cc=ehabkost@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=jdenemar@redhat.com \
    --cc=lcapitulino@redhat.com \
    --cc=libvir-list@redhat.com \
    --cc=qemu-devel@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.