]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Fix /domain/features setting in qemuParseCommandLine
authorChristophe Fergeau <cfergeau@redhat.com>
Tue, 10 Jul 2012 10:02:10 +0000 (12:02 +0200)
committerChristophe Fergeau <cfergeau@redhat.com>
Wed, 11 Jul 2012 07:10:21 +0000 (09:10 +0200)
commit626dd5180e472c0b4c0c5fb7072358743ca63653
tree05909421b916e99dc5994a1aee3c8999908c4675
parent0867a87721cc2a6be1ddb90363703f842b687bb3
Fix /domain/features setting in qemuParseCommandLine

Commit 5e6ce1 moved down detection of the ACPI feature in
qemuParseCommandLine. However, when ACPI is detected, it clears
all feature flags in def->features to only set ACPI. This used to
be fine because this was the first place were def->features was set,
but after the move this is no longer necessarily true because this
block comes before the ACPI check:

if (strstr(def->emulator, "kvm")) {
    def->virtType = VIR_DOMAIN_VIRT_KVM;
    def->features |= (1 << VIR_DOMAIN_FEATURE_PAE);
}

Since def is allocated in qemuParseCommandLine using VIR_ALLOC, we
can always use |= when modifying def->features
src/qemu/qemu_command.c
tests/qemuxml2argvdata/qemuxml2argv-kvmclock.xml