Laszlo Hornyak has uploaded a new change for review. Change subject: [WIP] add host-cpu to api ......................................................................
[WIP] add host-cpu to api work in progress Change-Id: Ie9d107deec2f00912878161348ba639eaa6c4f07 Signed-off-by: Laszlo Hornyak <[email protected]> --- M vdsm/libvirtvm.py M vdsm_api/vdsmapi-schema.json 2 files changed, 12 insertions(+), 2 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/67/9367/1 diff --git a/vdsm/libvirtvm.py b/vdsm/libvirtvm.py index 3439dc3..52a45b4 100644 --- a/vdsm/libvirtvm.py +++ b/vdsm/libvirtvm.py @@ -748,6 +748,11 @@ cputune.appendChild(vcpupin) self.dom.appendChild(cputune) + #cpu-host support + # see http://wiki.ovirt.org/wiki/Features/Cpu-host_Support + if 'useHostCpuFlags' in self.conf: + cpu.setAttribute('model', 'host-passthrough') + # This hack is for backward compatibility as the libvirt does not allow # 'qemu64' guest on intel hardware if model == 'qemu64' and not '+svm' in features: diff --git a/vdsm_api/vdsmapi-schema.json b/vdsm_api/vdsmapi-schema.json index 843cbc7..b7bed35 100644 --- a/vdsm_api/vdsmapi-schema.json +++ b/vdsm_api/vdsmapi-schema.json @@ -2412,6 +2412,8 @@ # # @vmType: The type of VM # +# @useHostCpuFlags: use host CPU flags (host-passthrough) in the vcpus +# # Since: 4.10.0 ## {'type': 'VmDefinition', @@ -2425,7 +2427,8 @@ 'pid': 'uint', 'smp': 'uint', '*smpCoresPerSocket': 'uint', '*smpThreadsPerCore': 'uint', 'status': 'VmStatus', 'timeOffset': 'uint', 'transparentHugePages': 'bool', - 'vmId': 'UUID', 'vmName': 'str', 'vmType': 'VmType'}} + 'vmId': 'UUID', 'vmName': 'str', 'vmType': 'VmType', + 'useHostCpuFlags' : 'bool'}} ## # @VmParameters: @@ -2463,6 +2466,8 @@ # # @vmType: The type of VM # +# @useHostCpuFlags: use host CPU flags (host-passthrough) in the vcpus +# # Since: 4.10.0 ## {'type': 'VmParameters', @@ -2472,7 +2477,7 @@ 'nice': 'int', 'smp': 'uint', 'smpCoresPerSocket': 'uint', 'smpThreadsPerCore': 'uint', 'timeOffset': 'uint', 'transparentHugePages': 'bool', 'vmId': 'UUID', 'vmName': 'str', - 'vmType': 'VmType'}} + 'vmType': 'VmType', 'useHostCpuFlags' : 'true'}} ## # @VmInfo: -- To view, visit http://gerrit.ovirt.org/9367 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie9d107deec2f00912878161348ba639eaa6c4f07 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Laszlo Hornyak <[email protected]> _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
