提交 626dd518 编写于 作者: C Christophe Fergeau

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
上级 0867a877
......@@ -7553,7 +7553,7 @@ virDomainDefPtr qemuParseCommandLine(virCapsPtr caps,
goto no_memory;
if (STREQ(def->os.arch, "i686")||STREQ(def->os.arch, "x86_64"))
def->features = (1 << VIR_DOMAIN_FEATURE_ACPI)
def->features |= (1 << VIR_DOMAIN_FEATURE_ACPI)
/*| (1 << VIR_DOMAIN_FEATURE_APIC)*/;
#define WANT_VALUE() \
const char *val = progargv[++i]; \
......
......@@ -8,6 +8,9 @@
<type arch='i686' machine='pc'>hvm</type>
<boot dev='network'/>
</os>
<features>
<pae/>
</features>
<clock offset='utc'>
<timer name='kvmclock' present='no'/>
</clock>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册