提交 87df87e0 编写于 作者: J Jim Fehlig

libxl: support emulate mode of tsc timer

While at it, use members of libxl_tsc_mode enum instead of literal
int values.
上级 6e4759d0
...@@ -318,13 +318,16 @@ libxlMakeDomBuildInfo(virDomainDefPtr def, ...@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册