mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-25 07:05:28 +00:00
libxl: support emulate mode of tsc timer
While at it, use members of libxl_tsc_mode enum instead of literal int values.
This commit is contained in:
parent
6e4759d069
commit
87df87e06b
@ -318,13 +318,16 @@ libxlMakeDomBuildInfo(virDomainDefPtr def,
|
|||||||
case VIR_DOMAIN_TIMER_NAME_TSC:
|
case VIR_DOMAIN_TIMER_NAME_TSC:
|
||||||
switch (def->clock.timers[i]->mode) {
|
switch (def->clock.timers[i]->mode) {
|
||||||
case VIR_DOMAIN_TIMER_MODE_NATIVE:
|
case VIR_DOMAIN_TIMER_MODE_NATIVE:
|
||||||
b_info->tsc_mode = 2;
|
b_info->tsc_mode = LIBXL_TSC_MODE_NATIVE;
|
||||||
break;
|
break;
|
||||||
case VIR_DOMAIN_TIMER_MODE_PARAVIRT:
|
case VIR_DOMAIN_TIMER_MODE_PARAVIRT:
|
||||||
b_info->tsc_mode = 3;
|
b_info->tsc_mode = LIBXL_TSC_MODE_NATIVE_PARAVIRT;
|
||||||
|
break;
|
||||||
|
case VIR_DOMAIN_TIMER_MODE_EMULATE:
|
||||||
|
b_info->tsc_mode = LIBXL_TSC_MODE_ALWAYS_EMULATE;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
b_info->tsc_mode = 1;
|
b_info->tsc_mode = LIBXL_TSC_MODE_DEFAULT;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user