mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-11-09 23:10:08 +00:00
libxl: support enabling the HPET
libxl accepts hpet configuration in its domain info struct. Parse the domain definition's <clock> element in order to set the value. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
e547e44cb0
commit
0fd3fac537
@ -377,6 +377,7 @@ libxlMakeDomBuildInfo(virDomainDefPtr def, libxl_domain_config *d_config)
|
||||
{
|
||||
libxl_domain_build_info *b_info = &d_config->b_info;
|
||||
int hvm = STREQ(def->os.type, "hvm");
|
||||
int i;
|
||||
|
||||
libxl_init_build_info(b_info, &d_config->c_info);
|
||||
|
||||
@ -402,6 +403,13 @@ libxlMakeDomBuildInfo(virDomainDefPtr def, libxl_domain_config *d_config)
|
||||
b_info->u.hvm.pae = def->features & (1 << VIR_DOMAIN_FEATURE_PAE);
|
||||
b_info->u.hvm.apic = def->features & (1 << VIR_DOMAIN_FEATURE_APIC);
|
||||
b_info->u.hvm.acpi = def->features & (1 << VIR_DOMAIN_FEATURE_ACPI);
|
||||
for (i = 0; i < def->clock.ntimers; i++) {
|
||||
if (def->clock.timers[i]->name == VIR_DOMAIN_TIMER_NAME_HPET &&
|
||||
def->clock.timers[i]->present == 1) {
|
||||
b_info->u.hvm.acpi.hpet = 1;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* The following comment and calculation were taken directly from
|
||||
* libxenlight's internal function libxl_get_required_shadow_memory():
|
||||
|
Loading…
Reference in New Issue
Block a user