[adding qemu]
On 07/23/2013 10:19 AM, Daniel P. Berrange wrote:
On Tue, Jul 23, 2013 at 06:11:35PM +0200, Jiri Denemark wrote:
> Since QEMU and kvm may filter some host CPU features or add efficiently
> emulated features, asking QEMU binary for host CPU data provides
> better results when we later use the data for building guest CPUs.
> ---
> + virCommandAddArg(cmd, "-machine");
> + virCommandAddArgFormat(cmd, "%s,accel=kvm",
> + qemuCaps->machineTypes[0]);
> +
This code is causing us to invoke the QEMU binary multiple times,
which is something we worked really hard to get away from. I really,
really don't like this as an approach. QEMU needs to be able to
give us the data we need here without multiple invocations.
eg, by allowing the monitor command to specify 'kvm' vs 'qemu'
when asking for data, so you can interrogate it without having
to re-launch it with different accel=XXX args.
We don't know if -machine accel=kvm is a valid option until after
issuing some QMP commands, but now we are forced to reinvoke a new qemu
with -machine accel=kvm enabled in order to get the query to give us
accurate answers. I agree that this is less than desirable; hopefully
the qemu folks can help us figure out a solution, now that we are
bringing attention to the issue.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library
http://libvirt.org