diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 180afe4333..0d229386eb 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -2464,7 +2464,7 @@ The name attribute selects which timer is being modified, and can be one of "platform" (currently unsupported), - "hpet" (libxl, xen, qemu), "kvmclock" (qemu), + "hpet" (libxl, xen, qemu, lxc), "kvmclock" (qemu), "pit" (qemu), "rtc" (qemu, lxc), "tsc" (libxl, qemu - since 3.2.0), "hypervclock" (qemu - since 1.2.2) or diff --git a/src/lxc/lxc_cgroup.c b/src/lxc/lxc_cgroup.c index 06605cb9ba..7df723a4da 100644 --- a/src/lxc/lxc_cgroup.c +++ b/src/lxc/lxc_cgroup.c @@ -350,13 +350,15 @@ static int virLXCCgroupSetupDeviceACL(virDomainDefPtr def, case VIR_DOMAIN_TIMER_NAME_KVMCLOCK: case VIR_DOMAIN_TIMER_NAME_HYPERVCLOCK: case VIR_DOMAIN_TIMER_NAME_PIT: - case VIR_DOMAIN_TIMER_NAME_HPET: case VIR_DOMAIN_TIMER_NAME_ARMVTIMER: case VIR_DOMAIN_TIMER_NAME_LAST: break; case VIR_DOMAIN_TIMER_NAME_RTC: dev = "/dev/rtc0"; break; + case VIR_DOMAIN_TIMER_NAME_HPET: + dev = "/dev/hpet"; + break; } if (!dev) diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c index 85986babb8..453b435dd6 100644 --- a/src/lxc/lxc_controller.c +++ b/src/lxc/lxc_controller.c @@ -1557,7 +1557,6 @@ virLXCControllerSetupTimers(virLXCControllerPtr ctrl) case VIR_DOMAIN_TIMER_NAME_KVMCLOCK: case VIR_DOMAIN_TIMER_NAME_HYPERVCLOCK: case VIR_DOMAIN_TIMER_NAME_PIT: - case VIR_DOMAIN_TIMER_NAME_HPET: case VIR_DOMAIN_TIMER_NAME_ARMVTIMER: case VIR_DOMAIN_TIMER_NAME_LAST: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, @@ -1569,6 +1568,11 @@ virLXCControllerSetupTimers(virLXCControllerPtr ctrl) path = g_strdup_printf("/%s/%s.dev/%s", LXC_STATE_DIR, def->name, "/rtc"); break; + case VIR_DOMAIN_TIMER_NAME_HPET: + timer_dev = "/dev/hpet"; + path = g_strdup_printf("/%s/%s.dev/%s", LXC_STATE_DIR, + ctrl->def->name, "/hpet"); + break; } if (!timer_dev)