Change in vdsm[master]: cpu mode support for vdsm
lhornyak at redhat.com
lhornyak at redhat.com
Tue Nov 27 10:22:08 UTC 2012
Laszlo Hornyak has uploaded a new change for review.
Change subject: cpu mode support for vdsm
......................................................................
cpu mode support for vdsm
This patch adds special hostPassthrough and hostModel as cpuType values.
If the cpuType is one of these values, the <model> tag will not be
created for libvirt, instead, a mode attribute will be crated in the
<cpu> tag with value 'host-passthrough' or 'host-model'.
Change-Id: I54fb440ef52255f0a7933b000b9b599c2d056021
Signed-off-by: Laszlo Hornyak <lhornyak at redhat.com>
---
M vdsm/libvirtvm.py
M vdsm_api/vdsmapi-schema.json
2 files changed, 14 insertions(+), 3 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/07/9507/1
diff --git a/vdsm/libvirtvm.py b/vdsm/libvirtvm.py
index f20968f..465a688 100644
--- a/vdsm/libvirtvm.py
+++ b/vdsm/libvirtvm.py
@@ -721,9 +721,17 @@
model = features[0]
cpu = self.doc.createElement('cpu')
cpu.setAttribute('match', 'exact')
- m = self.doc.createElement('model')
- m.appendChild(self.doc.createTextNode(model))
- cpu.appendChild(m)
+
+ #and now for something completely different
+ if model == 'hostPassthrough':
+ cpu.setAttribute('mode', 'host-passthrough')
+ elif model == 'hostModel':
+ cpu.setAttribute('mode', 'host-model')
+ else:
+ m = self.doc.createElement('model')
+ m.appendChild(self.doc.createTextNode(model))
+ cpu.appendChild(m)
+
if ('smpCoresPerSocket' in self.conf or
'smpThreadsPerCore' in self.conf):
topo = self.doc.createElement('topology')
diff --git a/vdsm_api/vdsmapi-schema.json b/vdsm_api/vdsmapi-schema.json
index aa45059..dbfe153 100644
--- a/vdsm_api/vdsmapi-schema.json
+++ b/vdsm_api/vdsmapi-schema.json
@@ -2383,6 +2383,9 @@
# @clientIp: The IP address of the client connected to the display
#
# @cpuType: The type of CPU being emulated
+# special values 'hostPassthrough' and 'hostModel'
+# are reserved for host-passthrough and host-mode cpu
+# mode
#
# @custom: A dictionary of custom, free-form properties
#
--
To view, visit http://gerrit.ovirt.org/9507
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I54fb440ef52255f0a7933b000b9b599c2d056021
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Laszlo Hornyak <lhornyak at redhat.com>
More information about the vdsm-patches
mailing list