From: Anthony Liguori <anthony@codemonkey.ws>
To: Mark McLoughlin <markmc@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [PATCH 0/5] Add "info capabilities" monitor command
Date: Thu, 13 Nov 2008 21:28:15 -0600 [thread overview]
Message-ID: <491CF04F.5020408@codemonkey.ws> (raw)
In-Reply-To: <1226594763-2304-1-git-send-email-markmc@redhat.com>
Mark McLoughlin wrote:
> Hi,
>
> Management tools need to be able to handle different versions of qemu
> equally well. Such a tool might need to know whether a given version
> supports a recently added command line option, whether it was built
> with kqemu support or who many vcpus is allowed.
>
> One example of this is libvirt which does "qemu -help" and looks at
> the version string and which command line options are included in
> the output. That's a hack that works pretty well, but clearly
> "qemu -help" shouldn't be considered a stable interface.
>
> This came up recently in the context of GSO support the KVM virtio
> network device. Essentially, libvirt needs to know whether qemu will
> be able to handle a tapfd with the IFF_VNET_HDR flag set. Adding
> something about IFF_VNET_HDR to the -help output was rejected as
> taking an ugly hack way too far :-)
>
> The proposed solution is to add a new monitor command which will
> list exactly what this qemu binary is capable of. Rather than include
> every possible capability, I've limited it to:
>
> 1) New features; if a version of qemu supports the capabilities
> info command, you can assume that it also supports features
> that were added before that.
>
> 2) Compile time configurables which affect what features can be
> requested on the command line - e.g. kqemu support
>
> 3) Magic numbers; a managment tool might know that qemu only
> supports 2 IDE devices - and that may never change - but
> it's much nicer if the tool can be coded generically rather
> than hardcoding a magic number.
>
> The patch implementing this isn't perfect by any means, but since
> this could be implemented in so many different ways I thought I'd
> post it and get people's feedback.
>
> Cheers,
> Mark.
>
> Example output:
>
There are really two types of features/options in QEMU. There are
features/options of the emulated hardware and there are features/options
for how we present this hardware to the user. The former is guest
visible and part of the save/restore state whereas the later is
transparent to the guest.
When enumerating capabilities, there really ought to be a clean split
between the two. The former should just describe the variety of
hardware that can be presented to the guest. This is important for
determining things like whether a migration target's QEMU instance is
compatible with the source.
With respect to limits, there are two types of limits. There are
architectural limits of the emulated hardware which are intrinsic to the
hardware and vary for every machine. Then there are the stupid QEMU
limits. The stupid QEMU limits should always be high enough such that
it is greater than the architectural limits of any possible emulated
hardware. If not, that is a bug and should be fixed.
So there really is no need to expose limits because they have very
little relationship to reality. The stupid QEMU limits should
effectively be infinite. You need to look at the machine definition to
determine what the real limits of the machine type are. I don't
necessarily think this should be explicitly described by QEMU either. I
don't mind a management tool having to be smart enough to know that an
IDE controller can only support 4 disks.
As a general piece of advise, I think where you are starting from is a
bit ambitious and far too open for bike shedding to be productive. You
may find it easier to start with something simpler, that has a real
practical utility to libvirt, and then building on that incrementally.
Regards,
Anthony Liguori
next prev parent reply other threads:[~2008-11-14 3:28 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-13 16:45 [Qemu-devel] [PATCH 0/5] Add "info capabilities" monitor command Mark McLoughlin
2008-11-13 16:45 ` [Qemu-devel] [PATCH 1/5] Re-factor nic model listing Mark McLoughlin
2008-11-13 16:46 ` [Qemu-devel] [PATCH 2/5] Add cpu_list() for any targets that don't already have it Mark McLoughlin
2008-11-13 16:46 ` [Qemu-devel] [PATCH 3/5] Rename xxx_cpu_list() to cpu_xxx_list() Mark McLoughlin
2008-11-13 16:46 ` [Qemu-devel] [PATCH 4/5] Add new cpu_names() function Mark McLoughlin
2008-11-13 16:46 ` [Qemu-devel] [PATCH 5/5] monitor: add "info capabilities" command Mark McLoughlin
2008-11-13 19:50 ` [Qemu-devel] " Anthony Liguori
2008-11-14 16:02 ` Mark McLoughlin
2008-11-14 10:07 ` [Qemu-devel] " Avi Kivity
2008-11-14 15:58 ` Mark McLoughlin
2008-11-16 7:17 ` Avi Kivity
2008-11-14 10:13 ` Daniel P. Berrange
2008-11-13 19:47 ` [Qemu-devel] Re: [PATCH 4/5] Add new cpu_names() function Anthony Liguori
2008-11-14 15:36 ` Mark McLoughlin
2008-11-13 18:35 ` [Qemu-devel] [PATCH 1/5] Re-factor nic model listing Paul Brook
2008-11-13 19:45 ` Anthony Liguori
2008-11-13 22:50 ` Paul Brook
2008-11-14 2:31 ` Jamie Lokier
2008-11-14 2:49 ` Anthony Liguori
2008-11-13 19:44 ` [Qemu-devel] " Anthony Liguori
2008-11-14 15:34 ` Mark McLoughlin
2008-11-13 17:49 ` [Qemu-devel] [PATCH 0/5] Add "info capabilities" monitor command Blue Swirl
2008-11-14 2:50 ` Jamie Lokier
2008-11-14 16:09 ` Mark McLoughlin
2008-11-14 3:28 ` Anthony Liguori [this message]
2008-11-14 3:51 ` [Qemu-devel] " Jamie Lokier
2008-11-14 15:56 ` Mark McLoughlin
2008-11-14 22:54 ` Jamie Lokier
2008-11-14 15:51 ` Mark McLoughlin
2008-11-14 22:52 ` Jamie Lokier
2008-11-14 10:16 ` [Qemu-devel] " Daniel P. Berrange
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=491CF04F.5020408@codemonkey.ws \
--to=anthony@codemonkey.ws \
--cc=markmc@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).