[libvirt] [PATCH v3 08/20] Refactor guest init to support qemu-system-i386 binary too
Jiri Denemark
jdenemar at redhat.com
Wed Sep 26 10:12:41 UTC 2012
On Tue, Sep 25, 2012 at 19:00:01 +0100, Daniel P. Berrange wrote:
> From: "Daniel P. Berrange" <berrange at redhat.com>
>
> Signed-off-by: Daniel P. Berrange <berrange at redhat.com>
> ---
> src/qemu/qemu_capabilities.c | 163 +++++++++++++++++++++++--------------------
> 1 file changed, 89 insertions(+), 74 deletions(-)
>
> diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
> index 0a203c5..c173286 100644
> --- a/src/qemu/qemu_capabilities.c
> +++ b/src/qemu/qemu_capabilities.c
> @@ -227,53 +227,6 @@ static int qemuCapsOnceInit(void)
>
> VIR_ONCE_GLOBAL_INIT(qemuCaps)
>
> -struct qemu_feature_flags {
> - const char *name;
> - const int default_on;
> - const int toggle;
> -};
> -
> -struct qemu_arch_info {
> - const char *arch;
> - int wordsize;
> - const char *binary;
> - const char *altbinary;
> - const struct qemu_feature_flags *flags;
> - int nflags;
> -};
> -
> -/* Feature flags for the architecture info */
> -static const struct qemu_feature_flags const arch_info_i686_flags [] = {
> - { "pae", 1, 0 },
> - { "nonpae", 1, 0 },
> - { "acpi", 1, 1 },
> - { "apic", 1, 0 },
> -};
> -
> -static const struct qemu_feature_flags const arch_info_x86_64_flags [] = {
> - { "acpi", 1, 1 },
> - { "apic", 1, 0 },
> -};
> -
> -/* The archicture tables for supported QEMU archs */
> -static const struct qemu_arch_info const arch_info_hvm[] = {
> - { "i686", 32, "qemu",
> - "qemu-system-x86_64", arch_info_i686_flags, 4 },
> - { "x86_64", 64, "qemu-system-x86_64",
> - NULL, arch_info_x86_64_flags, 2 },
> - { "arm", 32, "qemu-system-arm", NULL, NULL, 0 },
> - { "microblaze", 32, "qemu-system-microblaze", NULL, NULL, 0 },
> - { "microblazeel", 32, "qemu-system-microblazeel", NULL, NULL, 0 },
> - { "mips", 32, "qemu-system-mips", NULL, NULL, 0 },
> - { "mipsel", 32, "qemu-system-mipsel", NULL, NULL, 0 },
> - { "sparc", 32, "qemu-system-sparc", NULL, NULL, 0 },
> - { "ppc", 32, "qemu-system-ppc", NULL, NULL, 0 },
> - { "ppc64", 64, "qemu-system-ppc64", NULL, NULL, 0 },
> - { "itanium", 64, "qemu-system-ia64", NULL, NULL, 0 },
> - { "s390x", 64, "qemu-system-s390x", NULL, NULL, 0 },
> -};
> -
> -
> static virCommandPtr
> qemuCapsProbeCommand(const char *qemu,
> qemuCapsPtr caps)
> @@ -348,6 +301,7 @@ qemuCapsParseMachineTypesStr(const char *output,
> caps->machineAliases[caps->nmachineTypes-1] = name;
> } else {
> caps->machineTypes[caps->nmachineTypes-1] = name;
> + caps->machineAliases[caps->nmachineTypes-1] = NULL;
> }
> } while ((p = next));
>
Looks like a hunk that should go into 6/20.
> @@ -367,7 +321,7 @@ qemuCapsParseMachineTypesStr(const char *output,
>
> return 0;
>
> - no_memory:
> +no_memory:
> virReportOOMError();
> return -1;
> }
And this one too.
...
ACK
Jirka
More information about the libvir-list
mailing list