[libvirt] [PATCH 2/2] libxl: support enabling the HPET
Eric Blake
eblake at redhat.com
Tue May 10 22:25:11 UTC 2011
On 05/10/2011 05:24 AM, Paolo Bonzini wrote:
> 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 at redhat.com>
> ---
> src/libxl/libxl_conf.c | 8 ++++++++
> 1 files changed, 8 insertions(+), 0 deletions(-)
>
> diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c
> index 9dc35fc..6ace10e 100644
> --- a/src/libxl/libxl_conf.c
> +++ b/src/libxl/libxl_conf.c
> @@ -374,6 +374,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);
>
> @@ -399,6 +400,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;
> + }
> + }
Like you, I'm not set up to runtime test this; but I'm getting a
compilation error:
CC libvirt_driver_libxl_la-libxl_conf.lo
libxl/libxl_conf.c: In function 'libxlMakeDomBuildInfo':
libxl/libxl_conf.c:409:35: error: request for member 'hpet' in something
not a structure or union
Is this something where we need to do a configure check to see whether
libxl is new enough to support that member?
This patch will need a v2, possibly with more input from those more
familiar with libxl.
--
Eric Blake eblake at redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110510/00cec27d/attachment-0001.sig>
More information about the libvir-list
mailing list