[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] boards: add a 'none' machine type to all platfo
From: |
Anthony Liguori |
Subject: |
Re: [Qemu-devel] [PATCH] boards: add a 'none' machine type to all platforms |
Date: |
Wed, 22 Aug 2012 16:29:19 -0500 |
User-agent: |
Notmuch/0.13.2+93~ged93d79 (http://notmuchmail.org) Emacs/23.3.1 (x86_64-pc-linux-gnu) |
Eric Blake <address@hidden> writes:
> On 08/22/2012 02:24 PM, Anthony Liguori wrote:
>> This allows any QEMU binary to be executed with:
>>
>> $QEMU_BINARY -qmp stdio
>
> Don't you mean:
>
> $QEMU_BINARY -M none -qmp stdio
I did, thanks.
>
> I agree with including this in 1.2, as otherwise your new query-target
> and other commands are incomplete (that is, this is a 'bug fix' of
> rounding out a feature already promised at hard freeze, and not a new
> feature on its own).
>
>> +static QEMUMachine machine_none = {
>> + .name = "none",
>> + .desc = "empty machine",
>> + .init = machine_none_init,
>> + .max_cpus = 0,
>> +};
>
> I guess libvirt just blindly tries '-S -M none'; if it works, we must be
> talking to new enough qemu (and all the other QMP commands that we want
> to probe are then immediately available);
Correct. '-M none' will fail with a non-zero exit status in all old
versions of QEMU.
-S isn't really needed FWIW but it certainly doesn't hurt. There aren't
any VCPUs created with -M none so strictly speaking, -S doesn't do
anything.
No ram is allocated with -M none either which is another nice touch
(less resource usage).
> if it doesn't work, then we
> must be talking to older qemu and can fall back to -help scraping (since
> older versions won't be further modifying their -help output now that
> they are released).
Correct.
Regards,
Anthony Liguori
> I like the idea, although I'm not familiar enough
> with this part of the code to know if my review counts for anything:
>
> Reviewed-by: Eric Blake <address@hidden>
>
> --
> Eric Blake address@hidden +1-919-301-3266
> Libvirt virtualization library http://libvirt.org