
On 2013年02月28日 19:39, Jiri Denemark wrote:
On Thu, Feb 28, 2013 at 10:39:56 +0800, Li Zhang wrote:
On Thu, Feb 28, 2013 at 10:06 AM, Li Zhang <zhlcindy@gmail.com> wrote:
I also hope that QEMU capabilities depend on the binary by QMP. But the flags in virQEMUCapsObjectTypes are all set in virQEMUCapsInitQMP.
virQEMUCapsInitQMP -> virQEMUCapsProbeQMPObjects -> virQEMUCapsProcessStringFlags(qemuCaps,
ARRAY_CARDINALITY(virQEMUCapsObjectTypes), virQEMUCapsObjectTypes, nvalues, values); Yes, but that's fine, virQEMUCapsObjectTypes is just a lookup table between qom objects and our internal qemu capabilities flags. virQEMUCapsProcessStringFlags will only set flags corresponding to the qom objects reported by qemu.
More information from QEMU:
I tried to execute "qom-list-types" command, I get a lot of return values including X86 and other platforms. I think this is the real problem. QEMU binary emulating PPC architecture should not advertise x86-specific objects.
It seems that command "qom-list-types" just give all architectures' list, not related with architecture. qemu-system-x86_64 also can get all information of other architectures. I think it is not right way to getting capabilities by "qom-list-types". To fix this problem can be either way of the following: 1. Specify the architectures in Libvirt as my patch. 2. Specify the architectures in QEMU by modifying "qom-list-types" command. In my opinion, it may be better to fix it in libvirt. :)
Jirka