mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 12:35:17 +00:00
lxc: Add HPET device into allowed devices
This commit is related to RTC timer device too. HPET is being shared from host device through `localtime` clock. This timer is available creating a new timer using `hpet` name. Signed-off-by: Julio Faracco <jcfaracco@gmail.com> Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
9132badf27
commit
7864380b19
@ -2464,7 +2464,7 @@
|
||||
The <code>name</code> 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 -
|
||||
<span class="since">since 3.2.0</span>), "hypervclock"
|
||||
(qemu - <span class="since">since 1.2.2</span>) or
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user