<domainCapabilities>
...
<cpu>
- <mode name='host-passthrough' supported='yes'/>
+ <mode name='host-passthrough' supported='yes'>
+ <enum name='hostPassthroughMigratable'>
+ <value>on</value>
+ <value>off</value>
+ </enum>
+ </mode>
<mode name='host-model' supported='yes'>
<model fallback='allow'>Broadwell</model>
<vendor>Intel</vendor>
<dl>
<dt><code>host-passthrough</code></dt>
- <dd>No mode specific details are provided.</dd>
+ <dd>
+ The <code>hostPassthroughMigratable</code> enum shows possible values
+ of the <code>migratable</code> attribute for the <cpu> element
+ with <code>mode='host-passthrough'</code> in the domain XML.
+ </dd>
<dt><code>host-model</code></dt>
<dd>
virBufferAddLit(buf, "<cpu>\n");
virBufferAdjustIndent(buf, 2);
- virBufferAsprintf(buf, "<mode name='%s' supported='%s'/>\n",
+ virBufferAsprintf(buf, "<mode name='%s' supported='%s'",
virCPUModeTypeToString(VIR_CPU_MODE_HOST_PASSTHROUGH),
cpu->hostPassthrough ? "yes" : "no");
+ if (cpu->hostPassthrough && cpu->hostPassthroughMigratable.report) {
+ virBufferAddLit(buf, ">\n");
+ virBufferAdjustIndent(buf, 2);
+ ENUM_PROCESS(cpu, hostPassthroughMigratable,
+ virTristateSwitchTypeToString);
+ virBufferAdjustIndent(buf, -2);
+ virBufferAddLit(buf, "</mode>\n");
+ } else {
+ virBufferAddLit(buf, "/>\n");
+ }
+
virBufferAsprintf(buf, "<mode name='%s' ",
virCPUModeTypeToString(VIR_CPU_MODE_HOST_MODEL));
if (cpu->hostModel) {
typedef virDomainCapsCPU *virDomainCapsCPUPtr;
struct _virDomainCapsCPU {
bool hostPassthrough;
+ virDomainCapsEnum hostPassthroughMigratable;
virCPUDefPtr hostModel;
virDomainCapsCPUModelsPtr custom;
};