All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcel Apfelbaum <marcel@redhat.com>
To: Eric Blake <eblake@redhat.com>, Markus Armbruster <armbru@redhat.com>
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
	"Tony Krowiak" <akrowiak@linux.vnet.ibm.com>,
	qemu-devel@nongnu.org, "Andreas Färber" <afaerber@suse.de>
Subject: Re: [Qemu-devel] [qemu devel] disable shared memory is not available with this QEMU binary
Date: Wed, 01 Apr 2015 19:31:19 +0300	[thread overview]
Message-ID: <551C1D57.7000705@redhat.com> (raw)
In-Reply-To: <551C1ADD.50809@redhat.com>

On 04/01/2015 07:20 PM, Eric Blake wrote:
> On 04/01/2015 10:11 AM, Marcel Apfelbaum wrote:
>> On 04/01/2015 06:53 PM, Markus Armbruster wrote:
>>> Marcel Apfelbaum <marcel@redhat.com> writes:
>> [...]
>>>> I noticed something weird. I cannot actually create an instance of
>>>> machine
>>>> or get a reference to current_machine in order to query its properties!
>>>>
>>>> It seems that util/qemu-config is used by qemu-img which obviously
>>>> does not have a current machine nor the means to create it.
>>>>
>>>> So I have no way to create QOM objects for introspection :(.
>>>
>>> You'd have to do something like
>>>
>>>     desc[] = generic entries + the machine's entries
>>>
>>> where the latter is empty outside qemu proper.
>> Hmm! So I will loose with some dignity.
>> I'll keep the properties of the base "machine" on a static array
>> and *only* per-machine properties dynamic and I loose them.
>>
>>>
>>> For 2.3, I recommend to do *only* generic entries.  Specifically,
>>> *exactly* the entries we had before we cleared out
>>> qemu_machine_opts.desc[].
>> I submitted:
>>    [PATCH for-2.3] util/qemu-config" fix regression of
>> qmp_query_command_line_options
>> which includes both base-machine/per-machine properties.
>> Is it that bad? qmp can query it and even the new options will work
>> if qmp decides to set them. Can you have a look?
>
> The problem is that the per-machine properties are ALSO advertised even
> on machines where they do not work, which means you could be lying to
> libvirt if it needs to know if a specific per-machine option is present.
>   It would indeed be more conservative for 2.3 to advertise ONLY the
> generic options, so even though I already reviewed your patch, you may
> want to respin to incorporate the more conservative approach by dropping
> the advertising of any machine-specific option (as that is no worse than
> what we had before - better to not advertise a feature than to advertise
> something we don't actually support).
OK I'll send it shortly

Thanks,
Marcel
>
>
>>> 1. You have a QemuOpts problem that is actually pretty common: how to
>>> accept a few fixed parameters plus a bunch of parameters that are
>>> specific to the value of one of the fixed parameters (the
>>> discriminator, in your case "type").
>> Yes, but is more than that:
>> per-type properties are not static, you cannot find them before creating
>> an actual QOM object, and that is not possible.
>>
>> We could have a per-machine static options array that will be loaded
>> at init time into object properties... ugly.
>
> But we can avoid worrying about the ugliness or alternatives for solving
> that until 2.4.  For 2.3, all we need to focus on is avoiding the
> regression.
>

      reply	other threads:[~2015-04-01 16:31 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-31 14:21 [Qemu-devel] [qemu devel] disable shared memory is not available with this QEMU binary Tony Krowiak
2015-04-01  6:54 ` Marcel Apfelbaum
2015-04-01  8:01   ` Paolo Bonzini
2015-04-01  8:06     ` Marcel Apfelbaum
2015-04-01  8:20       ` Paolo Bonzini
2015-04-01  8:42     ` Markus Armbruster
2015-04-01  9:07       ` Paolo Bonzini
2015-04-01  9:14         ` Marcel Apfelbaum
2015-04-01  9:23           ` Paolo Bonzini
2015-04-01  9:27             ` Marcel Apfelbaum
2015-04-01  8:28   ` Markus Armbruster
2015-04-01 14:51     ` Marcel Apfelbaum
2015-04-01 15:53       ` Markus Armbruster
2015-04-01 16:11         ` Marcel Apfelbaum
2015-04-01 16:20           ` Eric Blake
2015-04-01 16:31             ` Marcel Apfelbaum [this message]

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=551C1D57.7000705@redhat.com \
    --to=marcel@redhat.com \
    --cc=afaerber@suse.de \
    --cc=akrowiak@linux.vnet.ibm.com \
    --cc=armbru@redhat.com \
    --cc=eblake@redhat.com \
    --cc=pbonzini@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.